From adffb10cbe67bbafe654944519cc92f796dbaced Mon Sep 17 00:00:00 2001 From: Alison Hodges Date: Wed, 30 Sep 2015 13:48:23 -0400 Subject: [PATCH] Updates the description provided for a new enrollment report https://github.com/edx/edx-platform/pull/9345 --- common/djangoapps/enrollment/views.py | 17 ++++++++++------- docs/en_us/platform_api/source/conf.py | 3 ++- .../source/enrollment/enrollment.rst | 6 +++--- .../platform_api/source/enrollment/overview.rst | 14 +++++--------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/common/djangoapps/enrollment/views.py b/common/djangoapps/enrollment/views.py index 53cd91585f..d3aa42eab2 100644 --- a/common/djangoapps/enrollment/views.py +++ b/common/djangoapps/enrollment/views.py @@ -457,15 +457,18 @@ class EnrollmentListView(APIView, ApiKeyPermissionMixIn): """Gets a list of all course enrollments for a user. Returns a list for the currently logged in user, or for the user named by the 'user' GET - parameter. If the username does not match the currently logged in user, only courses the - requesting user has staff permissions for are listed. + parameter. If the username does not match that of the currently logged in user, only + courses for which the currently logged in user has the Staff or Admin role are listed. + As a result, a course team member can find out which of his or her own courses a particular + learner is enrolled in. - Only staff or instructor permissions on individual courses are taken into account when - deciding whether the requesting user is permitted to see a particular enrollment, i.e. - organizational staff access doesn't grant permission to see the enrollments in all courses - of the organization. This may change in the future. + Only the Staff or Admin role (granted on the Django administrative console as the staff + or instructor permission) in individual courses gives the requesting user access to + enrollment data. Permissions granted at the organizational level do not give a user + access to enrollment data for all of that organization's courses. - However, users with global staff access can see all enrollments of all students. + Users who have the global staff permission can access all enrollment data for all + courses. """ username = request.GET.get('user', request.user.username) try: diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 01f2e59a4a..675bd07c51 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -193,7 +193,8 @@ MOCK_MODULES = [ 'student.auth', 'ccx_keys', 'ccx_keys.locator', - 'user_api.preferences.api' + 'user_api.preferences.api', + 'rest_framework_oauth.authentication' ] for mod_name in MOCK_MODULES: diff --git a/docs/en_us/platform_api/source/enrollment/enrollment.rst b/docs/en_us/platform_api/source/enrollment/enrollment.rst index 2630b77004..02c6d3a5a6 100644 --- a/docs/en_us/platform_api/source/enrollment/enrollment.rst +++ b/docs/en_us/platform_api/source/enrollment/enrollment.rst @@ -57,7 +57,7 @@ Get the User's Enrollment Status in a Course Get the User's Enrollment Information for a Course ************************************************** -.. .. autoclass:: enrollment.views.EnrollmentCourseDetailView +.. autoclass:: enrollment.views.EnrollmentCourseDetailView **Example response showing a user's course enrollment information** @@ -160,7 +160,7 @@ View a User's Enrollments or Enroll a User in a Course .. code-block:: json { - “course_details”: { - “course_id”: “edX/DemoX/Demo_Course” + "course_details": { + "course_id": "edX/DemoX/Demo_Course" } } \ No newline at end of file diff --git a/docs/en_us/platform_api/source/enrollment/overview.rst b/docs/en_us/platform_api/source/enrollment/overview.rst index 010c9a36fc..a3c3a6ff2a 100644 --- a/docs/en_us/platform_api/source/enrollment/overview.rst +++ b/docs/en_us/platform_api/source/enrollment/overview.rst @@ -31,20 +31,16 @@ The Enrollment API supports the following tasks, methods, and endpoints. * - Task - Method - Endpoint - * - :ref:`Get the user's enrollment status in a course - ` + * - :ref:`Get the user's enrollment status in a course ` - GET - /api/enrollment/v1/enrollment/{user_id},{course_id} - * - :ref:`Get the user's enrollment information for a course - ` + * - :ref:`Get the user's enrollment information for a course ` - GET - /api/enrollment/v1/course/{course_id} - * - :ref:`View a user's enrollments - ` + * - :ref:`View a user's enrollments ` - GET - /api/enrollment/v1/enrollment - * - :ref:`Enroll a user in a course - ` + * - :ref:`Enroll a user in a course ` - POST - - /api/enrollment/v1/enrollment{“course_details”:{“course_id”:“*course_id*”}} + - /api/enrollment/v1/enrollment{"course_details":{"course_id":"{course_id}"}}