Closed pdpinch closed 8 years ago
This story follows on #118
fyi @amir-qayyum-khan
@ShawnMilo can you update this with the endpoint and the fields necessary?
@pdpinch: So this augments the data at the top of #121, right?
That's correct.
Do we need to post all the course info and course structure, or can we rely on the connector calling back to edX's course structure API.
It'd be nice from a testing perspective if we had a bunch of stuff like:
{
"title": "Quantum Mechanics",
"author": "Bilbo Baggins",
"overview": "Quarks and photons and lots of other stuff.",
"description": "test description",
"video_url": "https://www.youtube.com/watch?v=ROor6_NGIWU",
"modules": [
{
"title": "Quarks are Crazy!!",
"subchapters": ["test", "titles", "go", "here"]
}
]
}
Then we minimize the dependency upon edx.
I'm not sure what you mean. Are you looking for sample data? If so, how much is a bunch?
And you're looking for JSON that would be used for a POST for creating a course in the ccx_connector, yes?
On Nov 2, 2015, at 1:35 PM, Justin Abrahms notifications@github.com wrote:
It'd be nice from a testing perspective if we had a bunch of stuff like:
{ "title": "Quantum Mechanics", "author": "Bilbo Baggins", "overview": "Quarks and photons and lots of other stuff.", "description": "test description", "video_url": "https://www.youtube.com/watch?v=ROor6_NGIWU", "modules": [ { "title": "Gandalf comes to see Bilbo", "subchapters": ["test", "titles", "go", "here"] ] }
Then we minimize the dependency upon edx.
— Reply to this email directly or view it on GitHub https://github.com/mitocw/edx-platform/issues/128#issuecomment-153118903.
Sorry, no. I typed that during the meeting and didn't properly proofread. That is what I'd really like to get as a payload to the create endpoint. Then we could make the course and it's modules in one pass, which would be nice.
edX Needs to authenticate to CCX connector.
according to the ccxcon apiary description, edx has to post to the url
http://teachers.odl.mit.edu/api/v1/coursexs/
with a body like
{
"title": "Introductory Physics: Classical Mechanics",
"author_name": "David E. Pritchard",
"edx_instance": "https://edx.org",
"overview": "This is the course overview.",
"description": "This is a college level Introductory Newtonian Mechanics",
"video_url": "https://www.youtube.com/watch?v=ROor6_NGIWU",
"instructors": [
"2d133482b3214a119f55c3060d882ceb"
]
}
title
I suppose is the edx display_name
, instructors
is a list of anonymous IDs, edx_instance
is the base url of the current instance, but what is the rest?
title => course.display_name author_name => None (this doesn't exist in edX, as such) edx_instance => pull from SETTINGS overview => I think this is course.description. It's an HTML blob description => course.short_description, I believe video_url => this should have been a course_image URL Instructors has been discussed elsewhere
@pdpinch @giocalitri Added post call to ccx_connector https://github.com/mitocw/edx-platform/pull/123/files#diff-461736c08928fe2e89e3776a671fc5b1R10
Can you guys suggest me how to test it?
opened at edx/edx-platform#10931
As a course author, when I set a value for
ccx_connector
in the Advanced Settings, I want information about my course to be published into the CCX connectorTo start with, the POST can be made when the setting is changed. Later we may want to make a POST every time a course is published.
Whenever a course is published and it has a value for
ccx_connector
we should create a POST to the CCX connector endpoint. The post should contain everything necessary to create a new course in the ccx_connector.