Merge pull request #7791 from edx/markhoeber-doc1904

Updated enrollment api doc for new response fields
This commit is contained in:
Mark Hoeber
2015-04-24 09:23:00 -04:00
3 changed files with 48 additions and 57 deletions

View File

@@ -241,8 +241,8 @@ class EnrollmentListView(APIView, ApiKeyPermissionMixIn):
If honor mode is not supported for the course, the request fails and returns the available modes.
A server-to-server call can be used by this command to enroll a user in other modes, such as "verified"
or "professional". If the mode is not supposed for the course, the request will fail and return the
available modes.
or "professional". If the mode is not supported for the course, the request will fail and return the
available modes.
**Example Requests**:
@@ -255,14 +255,14 @@ class EnrollmentListView(APIView, ApiKeyPermissionMixIn):
* user: The user ID of the currently logged in user. Optional. You cannot use the command to enroll a different user.
* mode: The Course Mode for the enrollment. Individual users cannot upgrade their enrollment mode from
'honor'. Only server to server requests can enroll with other modes. Optional.
'honor'. Only server to server requests can enroll with other modes. Optional.
* course details: A collection that contains:
* course_id: The unique identifier for the course.
* email_opt_in: A boolean indicating whether the user
wishes to opt into email from the organization running this course. Optional
wishes to opt into email from the organization running this course. Optional.
**Response Values**

View File

@@ -12,6 +12,11 @@ Change Log
* - Date
- Change
* - 23 April 2015
- Updated the example responses in :ref:`Get the Users Enrollment Status
in a Course`, :ref:`Get Enrollment Details for a Course`, and :ref:`View
and add to a Users Course Enrollments` to include new
``enrollment_start`` and ``enrollment_end fields``.
* - 2 April 2015
- Added the :ref:`EdX Platform Course Structure API Version 0`, :ref:`edX
Platform Enrollment API Version 1.0` and :ref:`edX Platform User API

View File

@@ -33,23 +33,26 @@ Get the User's Enrollment Status in a Course
"mode": "honor",
"is_active": true,
"course_details": {
"course_id": "edX/DemoX/Demo_Course",
"enrollment_end": null,
"course_modes": [
{
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
}
],
"enrollment_start": null,
"invite_only": false
},
"user": "staff"
"course_end": "2015-06-30T05:00:00Z",
"course_start": "2015-02-05T05:00:00Z",
"course_modes": [
{
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null,
"sku": null
}
],
"enrollment_start": "2015-01-01T05:00:00Z",
"enrollment_end": "2015-02-13T05:00:00Z",
"invite_only": false,
"course_id": "edX/DemoX/Demo_Course"
},
"user": "staff"
}
.. _Get Enrollment Details for a Course:
@@ -70,8 +73,8 @@ Get Enrollment Details for a Course
Allow: GET, HEAD, OPTIONS
{
"course_id": "edX/DemoX/Demo_Course",
"enrollment_end": null,
"course_end": "2015-06-30T05:00:00Z",
"course_start": "2015-02-05T05:00:00Z",
"course_modes": [
{
"slug": "honor",
@@ -80,11 +83,14 @@ Get Enrollment Details for a Course
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
"description": null,
"sku": null
}
],
"enrollment_start": null,
"invite_only": false
"enrollment_start": "2015-01-01T05:00:00Z",
"enrollment_end": "2015-02-13T05:00:00Z",
"invite_only": false,
"course_id": "edX/DemoX/Demo_Course"
}
@@ -108,12 +114,12 @@ View and Add to a User's Course Enrollments
[
{
"created": "2014-09-19T18:08:37Z",
"created": "2014-11-19T04:06:55Z",
"mode": "honor",
"is_active": true,
"course_details": {
"course_id": "edX/DemoX/Demo_Course",
"enrollment_end": null,
"course_end": "2015-06-30T05:00:00Z",
"course_start": "2015-02-05T05:00:00Z",
"course_modes": [
{
"slug": "honor",
@@ -122,37 +128,17 @@ View and Add to a User's Course Enrollments
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
"description": null,
"sku": null
}
],
"enrollment_start": null,
"invite_only": false
},
"user": "honor"
"enrollment_start": "2015-01-01T05:00:00Z",
"enrollment_end": "2015-02-13T05:00:00Z",
"invite_only": false,
"course_id": "edX/DemoX/Demo_Course"
},
{
"created": "2014-09-19T18:09:35Z",
"mode": "honor",
"is_active": true,
"course_details": {
"course_id": "ArbisoftX/BulkyEmail101/2014-15",
"enrollment_end": null,
"course_modes": [
{
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": [],
"currency": "usd",
"expiration_datetime": null,
"description": null
}
],
"enrollment_start": "2014-05-01T04:00:00Z",
"invite_only": false
},
"user": "honor"
}
"user": "staff"
}
]