cancel
Showing results for 
Search instead for 
Did you mean: 
alexei-bezpaltc
Community Participant

Course is not published

Jump to solution

Hello!

I'm using API to create courses.

 

string command = "/api/v1/accounts/:account_id/courses";
string courseData = new { name=courseName, offer="true", start_at =startDate, ends_at=endDate};

 

after this call I add a teacher, and create migration to copy template into this course.

At the end course is 'Unpublished" IE students can not access it. According to documentation offer="true" should set course to "Published" state but it doesn't. Even if I update the course later

            string command = "/api/v1/courses/:id";
            var courseData = new { offer = "true" };

It is still doesn't become "Published"

Have something changed in the API? Is documentation incorrect?

What I need to do to set course to "Published"?

Thank yo very much!

Labels (3)
0 Kudos
1 Solution

Accepted Solutions
alexei-bezpaltc
Community Participant

Offer is a separate object, not part of the course.

JsonConvert.SerializeObject(new { course = courseData, offer="true" });

then it works.

View solution in original post

0 Kudos
1 Reply
alexei-bezpaltc
Community Participant

Offer is a separate object, not part of the course.

JsonConvert.SerializeObject(new { course = courseData, offer="true" });

then it works.

View solution in original post

0 Kudos