From 1c3c70258371aeba8bc2b35049f9c96912a142b2 Mon Sep 17 00:00:00 2001 From: Kshitij Sobti Date: Thu, 30 Mar 2023 13:36:35 +0530 Subject: [PATCH] chore: Switch from edx-sphinx-theme to sphinx-book-theme The edx-sphinx theme is being deprecated, and replaced with sphinx-book-theme. This removes references to the deprecated theme and replaces them with the new standard theme for the platform. See https://github.com/openedx/edx-sphinx-theme/issues/184 --- docs/api/conf.py | 48 +- docs/guides/conf.py | 48 +- docs/swagger.yaml | 3556 +++++++++++++++++++++++---- docs/technical/conf.py | 43 +- requirements/common_constraints.txt | 1 - requirements/edx/base.txt | 1 + requirements/edx/doc.in | 2 +- requirements/edx/doc.txt | 33 +- requirements/edx/testing.txt | 1 + 9 files changed, 3252 insertions(+), 481 deletions(-) diff --git a/docs/api/conf.py b/docs/api/conf.py index 1bc7cc9878..b0f6a436f3 100644 --- a/docs/api/conf.py +++ b/docs/api/conf.py @@ -9,7 +9,7 @@ import os -import edx_theme +from datetime import datetime # -- Path setup -------------------------------------------------------------- @@ -25,8 +25,8 @@ import edx_theme # -- Project information ----------------------------------------------------- project = 'Open edX REST APIs' -copyright = edx_theme.COPYRIGHT # lint-amnesty, pylint: disable=redefined-builtin -author = edx_theme.AUTHOR +copyright = f'{datetime.now().year}, Axim Collaborative, Inc' # pylint: disable=redefined-builtin +author = 'Axim Collaborative, Inc' # The short X.Y version version = '' @@ -83,19 +83,49 @@ pygments_style = None # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'edx_theme' +html_theme = 'sphinx_book_theme' -html_theme_path = [edx_theme.get_html_theme_path()] +# html_theme_path = [] -html_theme_options = {'navigation_depth': 3} - -html_favicon = os.path.join(edx_theme.get_html_theme_path(), 'edx_theme', 'static', 'css', 'favicon.ico') +html_logo = "https://logos.openedx.org/open-edx-logo-color.png" +html_favicon = "https://logos.openedx.org/open-edx-favicon.ico" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = { + "repository_url": "https://github.com/openedx/edx-platform", + "repository_branch": "master", + "path_to_docs": "docs/api", + "home_page_in_toc": True, + "use_repository_button": True, + "use_issues_button": True, + "use_edit_page_button": True, + "navigation_depth": 3, + # Please don't change unless you know what you're doing. + "extra_footer": """ + + Creative Commons License + +
+ These works by + Axim Collaborative, Inc + are licensed under a + Creative Commons Attribution-ShareAlike 4.0 International License. + """ +} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/docs/guides/conf.py b/docs/guides/conf.py index fa6e8c3dab..64b38a283a 100644 --- a/docs/guides/conf.py +++ b/docs/guides/conf.py @@ -8,10 +8,10 @@ import os import sys +from datetime import datetime from subprocess import check_call import django -import edx_theme from path import Path root = Path('../..').abspath() @@ -33,8 +33,8 @@ django.setup() # -- Project information ----------------------------------------------------- project = 'edx-platform' -copyright = edx_theme.COPYRIGHT # lint-amnesty, pylint: disable=redefined-builtin -author = edx_theme.AUTHOR +copyright = f'{datetime.now().year}, Axim Collaborative, Inc' # pylint: disable=redefined-builtin +author = 'Axim Collaborative, Inc' # The short X.Y version version = '' @@ -93,19 +93,49 @@ pygments_style = None # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'edx_theme' +html_theme = 'sphinx_book_theme' -html_theme_path = [edx_theme.get_html_theme_path()] +# html_theme_path = [] -html_theme_options = {'navigation_depth': 3} - -html_favicon = os.path.join(edx_theme.get_html_theme_path(), 'edx_theme', 'static', 'css', 'favicon.ico') +html_logo = "https://logos.openedx.org/open-edx-logo-color.png" +html_favicon = "https://logos.openedx.org/open-edx-favicon.ico" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = { + "repository_url": "https://github.com/openedx/edx-platform", + "repository_branch": "master", + "path_to_docs": "docs/guides", + "home_page_in_toc": True, + "use_repository_button": True, + "use_issues_button": True, + "use_edit_page_button": True, + "navigation_depth": 3, + # Please don't change unless you know what you're doing. + "extra_footer": """ + + Creative Commons License + +
+ These works by + Axim Collaborative, Inc + are licensed under a + Creative Commons Attribution-ShareAlike 4.0 International License. + """ +} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index e5e2246288..63b4d3a0f0 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -420,7 +420,7 @@ paths: /certificates/v0/certificates/{username}/: get: operationId: certificates_v0_certificates_read - summary: Get a paginated list of bookmarks for a user. + summary: Get a paginated list of certificates for a user. description: |- **Use Case** @@ -489,7 +489,8 @@ paths: /certificates/v0/certificates/{username}/courses/{course_id}/: get: operationId: certificates_v0_certificates_courses_read - description: Gets a certificate information. + description: Retrieves certificate information for a user in a specified course + run. parameters: [] responses: '200': @@ -505,6 +506,17 @@ paths: in: path required: true type: string + /change_email_settings: + post: + operationId: change_email_settings_create + description: Modify logged-in user's setting for receiving emails from a course. + parameters: [] + responses: + '201': + description: '' + tags: + - change_email_settings + parameters: [] /cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}: get: operationId: cohorts_v1_courses_cohorts_read @@ -809,9 +821,9 @@ paths: tags: - completion parameters: [] - /completion/v1/subsection-completion/{username}/{course_key}/(P{subsection_id}[/]*): + /completion/v1/subsection-completion/{username}/{course_key}/{subsection_id}: get: - operationId: completion_v1_subsection-completion_]*)_list + operationId: completion_v1_subsection-completion_read description: Returns completion for a (user, subsection, course). parameters: [] responses: @@ -832,9 +844,9 @@ paths: in: path required: true type: string - ? /course_experience/v1/course_deadlines_info/(P{course_key_string}[/+]+{var}[/+]+api/course_experience/v1/course_deadlines_info/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: course_experience_v1_course_deadlines_info_+]+api_course_experience_v1_course_deadlines_info_+]+(_|+)[_]+)_read + /course_experience/v1/course_deadlines_info/{course_key_string}: + get: + operationId: course_experience_v1_course_deadlines_info_read summary: '**Use Cases**' description: |- Request course deadline info for mobile @@ -871,10 +883,6 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string /course_experience/v1/reset_course_deadlines: post: operationId: course_experience_v1_reset_course_deadlines_create @@ -896,196 +904,9 @@ paths: tags: - course_experience parameters: [] - /course_goals/v0/course_goals/: + /course_home/course_metadata/{course_key_string}: get: - operationId: course_goals_v0_course_goals_list - summary: API calls to create and update a course goal. - description: |- - Validates incoming data to ensure that course_key maps to an actual - course and that the goal_key is a valid option. - - **Use Case** - * Create a new goal for a user. - * Update an existing goal for a user - - **Example Requests** - POST /api/course_goals/v0/course_goals/ - Request data: {"course_key": , "goal_key": "", "user": ""} - - Returns Http400 response if the course_key does not map to a known - course or if the goal_key does not map to a valid goal key. - parameters: - - name: page - in: query - description: A page number within the paginated result set. - required: false - type: integer - - name: page_size - in: query - description: Number of results to return per page. - required: false - type: integer - responses: - '200': - description: '' - schema: - required: - - count - - results - type: object - properties: - count: - type: integer - next: - type: string - format: uri - x-nullable: true - previous: - type: string - format: uri - x-nullable: true - results: - type: array - items: - $ref: '#/definitions/CourseGoal' - tags: - - course_goals - post: - operationId: course_goals_v0_course_goals_create - description: Create a new goal if one does not exist, otherwise update the existing - goal. - parameters: - - name: data - in: body - required: true - schema: - $ref: '#/definitions/CourseGoal' - responses: - '201': - description: '' - schema: - $ref: '#/definitions/CourseGoal' - tags: - - course_goals - parameters: [] - /course_goals/v0/course_goals/{id}/: - get: - operationId: course_goals_v0_course_goals_read - summary: API calls to create and update a course goal. - description: |- - Validates incoming data to ensure that course_key maps to an actual - course and that the goal_key is a valid option. - - **Use Case** - * Create a new goal for a user. - * Update an existing goal for a user - - **Example Requests** - POST /api/course_goals/v0/course_goals/ - Request data: {"course_key": , "goal_key": "", "user": ""} - - Returns Http400 response if the course_key does not map to a known - course or if the goal_key does not map to a valid goal key. - parameters: [] - responses: - '200': - description: '' - schema: - $ref: '#/definitions/CourseGoal' - tags: - - course_goals - put: - operationId: course_goals_v0_course_goals_update - summary: API calls to create and update a course goal. - description: |- - Validates incoming data to ensure that course_key maps to an actual - course and that the goal_key is a valid option. - - **Use Case** - * Create a new goal for a user. - * Update an existing goal for a user - - **Example Requests** - POST /api/course_goals/v0/course_goals/ - Request data: {"course_key": , "goal_key": "", "user": ""} - - Returns Http400 response if the course_key does not map to a known - course or if the goal_key does not map to a valid goal key. - parameters: - - name: data - in: body - required: true - schema: - $ref: '#/definitions/CourseGoal' - responses: - '200': - description: '' - schema: - $ref: '#/definitions/CourseGoal' - tags: - - course_goals - patch: - operationId: course_goals_v0_course_goals_partial_update - summary: API calls to create and update a course goal. - description: |- - Validates incoming data to ensure that course_key maps to an actual - course and that the goal_key is a valid option. - - **Use Case** - * Create a new goal for a user. - * Update an existing goal for a user - - **Example Requests** - POST /api/course_goals/v0/course_goals/ - Request data: {"course_key": , "goal_key": "", "user": ""} - - Returns Http400 response if the course_key does not map to a known - course or if the goal_key does not map to a valid goal key. - parameters: - - name: data - in: body - required: true - schema: - $ref: '#/definitions/CourseGoal' - responses: - '200': - description: '' - schema: - $ref: '#/definitions/CourseGoal' - tags: - - course_goals - delete: - operationId: course_goals_v0_course_goals_delete - summary: API calls to create and update a course goal. - description: |- - Validates incoming data to ensure that course_key maps to an actual - course and that the goal_key is a valid option. - - **Use Case** - * Create a new goal for a user. - * Update an existing goal for a user - - **Example Requests** - POST /api/course_goals/v0/course_goals/ - Request data: {"course_key": , "goal_key": "", "user": ""} - - Returns Http400 response if the course_key does not map to a known - course or if the goal_key does not map to a valid goal key. - parameters: [] - responses: - '204': - description: '' - tags: - - course_goals - parameters: - - name: id - in: path - description: A unique integer value identifying this course goal. - required: true - type: integer - ? /course_home/v1/course_metadata/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/course_metadata/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: course_home_v1_course_metadata_+]+api_course_home_v1_course_metadata_+]+(_|+)[_]+)_read + operationId: course_home_course_metadata_read summary: '**Use Cases**' description: |- Request Course metadata details for the Course Home MFE that every page needs. @@ -1115,6 +936,8 @@ paths: url: (str) The url to view the tab title: (str) The Course's display title celebrations: (dict) a dict of celebration data + user_timezone: (str) The timezone of the given user + can_view_certificate: Flag to determine whether or not the learner can view their course certificate. **Returns** @@ -1133,13 +956,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - ? /course_home/v1/dates/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/dates/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: course_home_v1_dates_+]+api_course_home_v1_dates_+]+(_|+)[_]+)_read + /course_home/dates/{course_key_string}: + get: + operationId: course_home_dates_read summary: '**Use Cases**' description: |- Request details for the Dates Tab @@ -1189,13 +1008,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - /course_home/v1/dismiss_welcome_message: + /course_home/dismiss_welcome_message: post: - operationId: course_home_v1_dismiss_welcome_message_create + operationId: course_home_dismiss_welcome_message_create description: '' parameters: [] responses: @@ -1204,9 +1019,9 @@ paths: tags: - course_home parameters: [] - ? /course_home/v1/outline/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/outline/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: course_home_v1_outline_+]+api_course_home_v1_outline_+]+(_|+)[_]+)_read + /course_home/outline/{course_key_string}: + get: + operationId: course_home_outline_read summary: '**Use Cases**' description: |- Request details for the Outline Tab @@ -1223,7 +1038,7 @@ paths: expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) - upgrade_url: (str) Upgrade linke (or None if can't upgrade anymore) + upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) course_blocks: blocks: List of serialized Course Block objects. Each serialization has the following fields: id: (str) The usage ID of the block. @@ -1237,11 +1052,12 @@ paths: children: (list) If the block has child blocks, a list of IDs of the child blocks. resume_block: (bool) Whether the block is the resume block + has_scheduled_content: (bool) Whether the block has more content scheduled for the future course_goals: - goal_options: (list) A list of goals where each goal is represented as a tuple (goal_key, goal_string) selected_goal: - key: (str) The unique id given to the user's selected goal. - text: (str) The display text for the user's selected goal. + days_per_week: (int) The number of days the learner wants to learn per week + subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal + weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call course_tools: List of serialized Course Tool objects. Each serialization has the following fields: analytics_id: (str) The unique id given to the tool. title: (str) The display title of the tool. @@ -1267,6 +1083,7 @@ paths: enroll_alert: can_enroll: (bool) Whether the user can enroll in the given course extra_text: (str) + enrollment_mode: (str) Current enrollment mode. Null if the user is not enrolled. handouts_html: (str) Raw HTML for the handouts section of the course info has_ended: (bool) Indicates whether course has ended offer: An object detailing upgrade discount information @@ -1280,6 +1097,7 @@ paths: has_visited_course: (bool) Whether the user has ever visited the course url: (str) The display name of the course block to resume welcome_message_html: (str) Raw HTML for the course updates banner + user_has_passing_grade: (bool) Whether the user currently is passing the course **Returns** @@ -1298,13 +1116,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - ? /course_home/v1/progress/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/progress/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: course_home_v1_progress_+]+api_course_home_v1_progress_+]+(_|+)[_]+)_read + /course_home/progress/{course_key_string}: + get: + operationId: course_home_progress_read summary: '**Use Cases**' description: |- Request details for the Progress Tab @@ -1312,14 +1126,17 @@ paths: **Example Requests** GET api/course_home/v1/progress/{course_key} + GET api/course_home/v1/progress/{course_key}/{student_id}/ **Response Values** Body consists of the following fields: - end: (date) end date of the course - user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course - has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future + access_expiration: An object detailing when access to this course will expire + expiration_date: (str) When the access expires, in ISO 8601 notation + masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user + upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) + upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) certificate_data: Object containing information about the user's certificate status cert_status: (str) the status of a user's certificate (full list of statuses are defined in lms/djangoapps/certificates/models.py) @@ -1334,31 +1151,51 @@ paths: letter_grade: (str) the user's letter grade based on the set grade range. If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none percent: (float) the user's total graded percent in the course - section_scores: List of serialized Chapters. Each Chapter has the following fields: - display_name: (str) a str of what the name of the Chapter is for displaying on the site - subsections: List of serialized Subsections, each has the following fields: - assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) - display_name: (str) a str of what the name of the Subsection is for displaying on the site - has_graded_assignment: (bool) whether or not the Subsection is a graded assignment - num_points_earned: (int) the amount of points the user has earned for the given subsection - num_points_possible: (int) the total amount of points possible for the given subsection - percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection - show_correctness: (str) a str representing whether to show the problem/practice scores based on due date - ('always', 'never', 'past_due', values defined in - xmodule/modulestore/inheritance.py) - show_grades: (bool) a bool for whether to show grades based on the access the user has - url: (str) the absolute path url to the Subsection + credit_course_requirements: Object containing credit course requirements with the following fields: + eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be + "eligible", "not_eligible", or "partial_eligible" + requirements: List of requirements that must be fulfilled to be eligible to receive credit. See + `get_credit_requirement_status` for details on the fields + end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) grading_policy: assignment_policies: List of serialized assignment grading policy objects, each has the following fields: - num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final grade + num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final + grade short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they - range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is present, - 'Pass' is not included. + range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is + present, 'Pass' is not included. + has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future + section_scores: List of serialized Chapters. Each Chapter has the following fields: + display_name: (str) a str of what the name of the Chapter is for displaying on the site + subsections: List of serialized Subsections, each has the following fields: + assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) + block_key: (str) the key of the given subsection block + display_name: (str) a str of what the name of the Subsection is for displaying on the site + has_graded_assignment: (bool) whether or not the Subsection is a graded assignment + learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) + num_points_earned: (int) the amount of points the user has earned for the given subsection + num_points_possible: (int) the total amount of points possible for the given subsection + override: Optional object if grade has been overridden by proctor or grading change + system: (str) either GRADING or PROCTORING + reason: (str) a comment on the grading override + percent_graded: (float) the percentage of total points the user has received a grade for in a given + subsection + problem_scores: List of objects that represent individual problem scores with the following fields: + earned: (float) number of earned points + possible: (float) number of possible points + show_correctness: (str) a str representing whether to show the problem/practice scores based on due date + ('always', 'never', 'past_due', values defined in + xmodule/modulestore/inheritance.py) + show_grades: (bool) a bool for whether to show grades based on the access the user has + url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer + accessible to the learner due to a hide_after_due course team setting studio_url: (str) a str of the link to the grading in studio for the course + user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course + username: (str) username of the student whose progress information is being displayed. verification_data: an object containing link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification @@ -1382,7 +1219,572 @@ paths: in: path required: true type: string - - name: var + /course_home/progress/{course_key_string}/{student_id}: + get: + operationId: course_home_progress_read + summary: '**Use Cases**' + description: |- + Request details for the Progress Tab + + **Example Requests** + + GET api/course_home/v1/progress/{course_key} + GET api/course_home/v1/progress/{course_key}/{student_id}/ + + **Response Values** + + Body consists of the following fields: + + access_expiration: An object detailing when access to this course will expire + expiration_date: (str) When the access expires, in ISO 8601 notation + masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user + upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) + upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) + certificate_data: Object containing information about the user's certificate status + cert_status: (str) the status of a user's certificate (full list of statuses are defined in + lms/djangoapps/certificates/models.py) + cert_web_view_url: (str) the url to view the certificate + download_url: (str) the url to download the certificate + completion_summary: Object containing unit completion counts with the following fields: + complete_count: (float) number of complete units + incomplete_count: (float) number of incomplete units + locked_count: (float) number of units where contains_gated_content is True + course_grade: Object containing the following fields: + is_passing: (bool) whether the user's grade is above the passing grade cutoff + letter_grade: (str) the user's letter grade based on the set grade range. + If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none + percent: (float) the user's total graded percent in the course + credit_course_requirements: Object containing credit course requirements with the following fields: + eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be + "eligible", "not_eligible", or "partial_eligible" + requirements: List of requirements that must be fulfilled to be eligible to receive credit. See + `get_credit_requirement_status` for details on the fields + end: (date) end date of the course + enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) + grading_policy: + assignment_policies: List of serialized assignment grading policy objects, each has the following fields: + num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final + grade + short_label: (str) the abbreviated name given to the assignment type + type: (str) the assignment type + weight: (float) the percent weight the given assigment type has on the overall grade + grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they + range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is + present, 'Pass' is not included. + has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future + section_scores: List of serialized Chapters. Each Chapter has the following fields: + display_name: (str) a str of what the name of the Chapter is for displaying on the site + subsections: List of serialized Subsections, each has the following fields: + assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) + block_key: (str) the key of the given subsection block + display_name: (str) a str of what the name of the Subsection is for displaying on the site + has_graded_assignment: (bool) whether or not the Subsection is a graded assignment + learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) + num_points_earned: (int) the amount of points the user has earned for the given subsection + num_points_possible: (int) the total amount of points possible for the given subsection + override: Optional object if grade has been overridden by proctor or grading change + system: (str) either GRADING or PROCTORING + reason: (str) a comment on the grading override + percent_graded: (float) the percentage of total points the user has received a grade for in a given + subsection + problem_scores: List of objects that represent individual problem scores with the following fields: + earned: (float) number of earned points + possible: (float) number of possible points + show_correctness: (str) a str representing whether to show the problem/practice scores based on due date + ('always', 'never', 'past_due', values defined in + xmodule/modulestore/inheritance.py) + show_grades: (bool) a bool for whether to show grades based on the access the user has + url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer + accessible to the learner due to a hide_after_due course team setting + studio_url: (str) a str of the link to the grading in studio for the course + user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course + username: (str) username of the student whose progress information is being displayed. + verification_data: an object containing + link: (str) the link to either start or retry ID verification + status: (str) the status of the ID verification + status_date: (str) the date time string of when the ID verification status was set + + **Returns** + + * 200 on success with above fields. + * 401 if the user is not authenticated or not enrolled. + * 404 if the course is not available or cannot be seen. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/ProgressTab' + tags: + - course_home + parameters: + - name: course_key_string + in: path + required: true + type: string + - name: student_id + in: path + required: true + type: string + /course_home/save_course_goal: + post: + operationId: course_home_save_course_goal_create + description: '' + parameters: [] + responses: + '201': + description: '' + tags: + - course_home + parameters: [] + /course_home/unsubscribe_from_course_goal/{token}: + post: + operationId: course_home_unsubscribe_from_course_goal_create + summary: API calls to unsubscribe from course goal reminders. + description: |- + Note that this does not require authentication - this view may be hit from an email on a different device than + normal or whatever. We should still be able to unsubscribe the user. Instead, we use a token in the email to + validate that they have permission to unsubscribe. + + This endpoint is very tightly scoped (only unsubscribe: no subscribing, no PII) because it is unauthenticated. + + **Example Requests** + POST api/course_home/v1/unsubscribe_from_course_goal/{token} + + **Example Response Data** + {'course_title': 'Cats & Dogs In Canadian Media'} + + Returns a 404 response if the token was not found. Otherwise, returns some basic course info. But no PII. + parameters: [] + responses: + '201': + description: '' + tags: + - course_home + parameters: + - name: token + in: path + required: true + type: string + /course_home/v1/course_metadata/{course_key_string}: + get: + operationId: course_home_v1_course_metadata_read + summary: '**Use Cases**' + description: |- + Request Course metadata details for the Course Home MFE that every page needs. + + **Example Requests** + + GET api/course_home/v1/course_metadata/{course_key} + + **Response Values** + + Body consists of the following fields: + + course_id: (str) The Course's id (Course Run key) + username: (str) The requesting (or masqueraded) user. Returns None for an + unauthenticated user. + is_enrolled: (bool) Indicates if the user is enrolled in the course + is_self_paced: (bool) Indicates if the course is self paced + is_staff: (bool) Indicates if the user is staff + original_user_is_staff: (bool) Indicates if the original user has staff access + Used for when masquerading to distinguish between the original requesting user + and the user being masqueraded as. + number: (str) The Course's number + org: (str) The Course's organization + tabs: List of Course Tabs to display. They are serialized as: + tab_id: (str) The tab's id + title: (str) The title of the tab to display + url: (str) The url to view the tab + title: (str) The Course's display title + celebrations: (dict) a dict of celebration data + user_timezone: (str) The timezone of the given user + can_view_certificate: Flag to determine whether or not the learner can view their course certificate. + + **Returns** + + * 200 on success with above fields. + * 404 if the course is not available or cannot be seen. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CourseHomeMetadata' + tags: + - course_home + parameters: + - name: course_key_string + in: path + required: true + type: string + /course_home/v1/dates/{course_key_string}: + get: + operationId: course_home_v1_dates_read + summary: '**Use Cases**' + description: |- + Request details for the Dates Tab + + **Example Requests** + + GET api/course_home/v1/dates/{course_key} + + **Response Values** + + Body consists of the following fields: + + course_date_blocks: List of serialized DateSummary objects. Each serialization has the following fields: + complete: (bool) Meant to only be used by assignments. Indicates completeness for an + assignment. + date: (datetime) The date time corresponding for the event + date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) + description: (str) The description for the date event + learner_has_access: (bool) Indicates if the learner has access to the date event + link: (str) An absolute link to content related to the date event + (ex. verified link or link to assignment) + title: (str) The title of the date event + dates_banner_info: (obj) + content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. + missed_deadlines: (bool) Indicates whether the user missed any graded content deadlines + missed_gated_content: (bool) Indicates whether the user missed gated content + verified_upgrade_link: (str) The link for upgrading to the Verified track in a course + has_ended: (bool) Indicates whether course has ended + learner_is_full_access: (bool) Indicates if the user is verified in the course + user_timezone: (str) The user's preferred timezone + + **Returns** + + * 200 on success with above fields. + * 401 if the user is not authenticated. + * 404 if the course is not available or cannot be seen. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/DatesTab' + tags: + - course_home + parameters: + - name: course_key_string + in: path + required: true + type: string + /course_home/v1/dismiss_welcome_message: + post: + operationId: course_home_v1_dismiss_welcome_message_create + description: '' + parameters: [] + responses: + '201': + description: '' + tags: + - course_home + parameters: [] + /course_home/v1/outline/{course_key_string}: + get: + operationId: course_home_v1_outline_read + summary: '**Use Cases**' + description: |- + Request details for the Outline Tab + + **Example Requests** + + GET api/course_home/v1/outline/{course_key} + + **Response Values** + + Body consists of the following fields: + + access_expiration: An object detailing when access to this course will expire + expiration_date: (str) When the access expires, in ISO 8601 notation + masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user + upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) + upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) + course_blocks: + blocks: List of serialized Course Block objects. Each serialization has the following fields: + id: (str) The usage ID of the block. + type: (str) The type of block. Possible values the names of any + XBlock type in the system, including custom blocks. Examples are + course, chapter, sequential, vertical, html, problem, video, and + discussion. + display_name: (str) The display name of the block. + lms_web_url: (str) The URL to the navigational container of the + xBlock on the web LMS. + children: (list) If the block has child blocks, a list of IDs of + the child blocks. + resume_block: (bool) Whether the block is the resume block + has_scheduled_content: (bool) Whether the block has more content scheduled for the future + course_goals: + selected_goal: + days_per_week: (int) The number of days the learner wants to learn per week + subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal + weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call + course_tools: List of serialized Course Tool objects. Each serialization has the following fields: + analytics_id: (str) The unique id given to the tool. + title: (str) The display title of the tool. + url: (str) The link to access the tool. + dates_banner_info: (obj) + content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. + missed_deadlines: (bool) Whether the user has missed any graded content deadlines for the given course. + missed_gated_content: (bool) Whether the user has missed any gated content for the given course. + verified_upgrade_link: (str) The URL to ecommerce IDA for purchasing the verified upgrade. + dates_widget: + course_date_blocks: List of serialized Course Dates objects. Each serialization has the following fields: + complete: (bool) Meant to only be used by assignments. Indicates completeness for an + assignment. + date: (datetime) The date time corresponding for the event + date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) + description: (str) The description for the date event + learner_has_access: (bool) Indicates if the learner has access to the date event + link: (str) An absolute link to content related to the date event + (ex. verified link or link to assignment) + title: (str) The title of the date event + dates_tab_link: (str) The URL to the Dates Tab + user_timezone: (str) The timezone of the given user + enroll_alert: + can_enroll: (bool) Whether the user can enroll in the given course + extra_text: (str) + enrollment_mode: (str) Current enrollment mode. Null if the user is not enrolled. + handouts_html: (str) Raw HTML for the handouts section of the course info + has_ended: (bool) Indicates whether course has ended + offer: An object detailing upgrade discount information + code: (str) Checkout code + expiration_date: (str) Expiration of offer, in ISO 8601 notation + original_price: (str) Full upgrade price without checkout code; includes currency symbol + discounted_price: (str) Upgrade price with checkout code; includes currency symbol + percentage: (int) Amount of discount + upgrade_url: (str) Checkout URL + resume_course: + has_visited_course: (bool) Whether the user has ever visited the course + url: (str) The display name of the course block to resume + welcome_message_html: (str) Raw HTML for the course updates banner + user_has_passing_grade: (bool) Whether the user currently is passing the course + + **Returns** + + * 200 on success with above fields. + * 404 if the course is not available or cannot be seen. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/OutlineTab' + tags: + - course_home + parameters: + - name: course_key_string + in: path + required: true + type: string + /course_home/v1/progress/{course_key_string}: + get: + operationId: course_home_v1_progress_read + summary: '**Use Cases**' + description: |- + Request details for the Progress Tab + + **Example Requests** + + GET api/course_home/v1/progress/{course_key} + GET api/course_home/v1/progress/{course_key}/{student_id}/ + + **Response Values** + + Body consists of the following fields: + + access_expiration: An object detailing when access to this course will expire + expiration_date: (str) When the access expires, in ISO 8601 notation + masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user + upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) + upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) + certificate_data: Object containing information about the user's certificate status + cert_status: (str) the status of a user's certificate (full list of statuses are defined in + lms/djangoapps/certificates/models.py) + cert_web_view_url: (str) the url to view the certificate + download_url: (str) the url to download the certificate + completion_summary: Object containing unit completion counts with the following fields: + complete_count: (float) number of complete units + incomplete_count: (float) number of incomplete units + locked_count: (float) number of units where contains_gated_content is True + course_grade: Object containing the following fields: + is_passing: (bool) whether the user's grade is above the passing grade cutoff + letter_grade: (str) the user's letter grade based on the set grade range. + If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none + percent: (float) the user's total graded percent in the course + credit_course_requirements: Object containing credit course requirements with the following fields: + eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be + "eligible", "not_eligible", or "partial_eligible" + requirements: List of requirements that must be fulfilled to be eligible to receive credit. See + `get_credit_requirement_status` for details on the fields + end: (date) end date of the course + enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) + grading_policy: + assignment_policies: List of serialized assignment grading policy objects, each has the following fields: + num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final + grade + short_label: (str) the abbreviated name given to the assignment type + type: (str) the assignment type + weight: (float) the percent weight the given assigment type has on the overall grade + grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they + range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is + present, 'Pass' is not included. + has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future + section_scores: List of serialized Chapters. Each Chapter has the following fields: + display_name: (str) a str of what the name of the Chapter is for displaying on the site + subsections: List of serialized Subsections, each has the following fields: + assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) + block_key: (str) the key of the given subsection block + display_name: (str) a str of what the name of the Subsection is for displaying on the site + has_graded_assignment: (bool) whether or not the Subsection is a graded assignment + learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) + num_points_earned: (int) the amount of points the user has earned for the given subsection + num_points_possible: (int) the total amount of points possible for the given subsection + override: Optional object if grade has been overridden by proctor or grading change + system: (str) either GRADING or PROCTORING + reason: (str) a comment on the grading override + percent_graded: (float) the percentage of total points the user has received a grade for in a given + subsection + problem_scores: List of objects that represent individual problem scores with the following fields: + earned: (float) number of earned points + possible: (float) number of possible points + show_correctness: (str) a str representing whether to show the problem/practice scores based on due date + ('always', 'never', 'past_due', values defined in + xmodule/modulestore/inheritance.py) + show_grades: (bool) a bool for whether to show grades based on the access the user has + url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer + accessible to the learner due to a hide_after_due course team setting + studio_url: (str) a str of the link to the grading in studio for the course + user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course + username: (str) username of the student whose progress information is being displayed. + verification_data: an object containing + link: (str) the link to either start or retry ID verification + status: (str) the status of the ID verification + status_date: (str) the date time string of when the ID verification status was set + + **Returns** + + * 200 on success with above fields. + * 401 if the user is not authenticated or not enrolled. + * 404 if the course is not available or cannot be seen. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/ProgressTab' + tags: + - course_home + parameters: + - name: course_key_string + in: path + required: true + type: string + /course_home/v1/progress/{course_key_string}/{student_id}: + get: + operationId: course_home_v1_progress_read + summary: '**Use Cases**' + description: |- + Request details for the Progress Tab + + **Example Requests** + + GET api/course_home/v1/progress/{course_key} + GET api/course_home/v1/progress/{course_key}/{student_id}/ + + **Response Values** + + Body consists of the following fields: + + access_expiration: An object detailing when access to this course will expire + expiration_date: (str) When the access expires, in ISO 8601 notation + masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user + upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) + upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) + certificate_data: Object containing information about the user's certificate status + cert_status: (str) the status of a user's certificate (full list of statuses are defined in + lms/djangoapps/certificates/models.py) + cert_web_view_url: (str) the url to view the certificate + download_url: (str) the url to download the certificate + completion_summary: Object containing unit completion counts with the following fields: + complete_count: (float) number of complete units + incomplete_count: (float) number of incomplete units + locked_count: (float) number of units where contains_gated_content is True + course_grade: Object containing the following fields: + is_passing: (bool) whether the user's grade is above the passing grade cutoff + letter_grade: (str) the user's letter grade based on the set grade range. + If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none + percent: (float) the user's total graded percent in the course + credit_course_requirements: Object containing credit course requirements with the following fields: + eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be + "eligible", "not_eligible", or "partial_eligible" + requirements: List of requirements that must be fulfilled to be eligible to receive credit. See + `get_credit_requirement_status` for details on the fields + end: (date) end date of the course + enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) + grading_policy: + assignment_policies: List of serialized assignment grading policy objects, each has the following fields: + num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final + grade + short_label: (str) the abbreviated name given to the assignment type + type: (str) the assignment type + weight: (float) the percent weight the given assigment type has on the overall grade + grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they + range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is + present, 'Pass' is not included. + has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future + section_scores: List of serialized Chapters. Each Chapter has the following fields: + display_name: (str) a str of what the name of the Chapter is for displaying on the site + subsections: List of serialized Subsections, each has the following fields: + assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) + block_key: (str) the key of the given subsection block + display_name: (str) a str of what the name of the Subsection is for displaying on the site + has_graded_assignment: (bool) whether or not the Subsection is a graded assignment + learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) + num_points_earned: (int) the amount of points the user has earned for the given subsection + num_points_possible: (int) the total amount of points possible for the given subsection + override: Optional object if grade has been overridden by proctor or grading change + system: (str) either GRADING or PROCTORING + reason: (str) a comment on the grading override + percent_graded: (float) the percentage of total points the user has received a grade for in a given + subsection + problem_scores: List of objects that represent individual problem scores with the following fields: + earned: (float) number of earned points + possible: (float) number of possible points + show_correctness: (str) a str representing whether to show the problem/practice scores based on due date + ('always', 'never', 'past_due', values defined in + xmodule/modulestore/inheritance.py) + show_grades: (bool) a bool for whether to show grades based on the access the user has + url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer + accessible to the learner due to a hide_after_due course team setting + studio_url: (str) a str of the link to the grading in studio for the course + user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course + username: (str) username of the student whose progress information is being displayed. + verification_data: an object containing + link: (str) the link to either start or retry ID verification + status: (str) the status of the ID verification + status_date: (str) the date time string of when the ID verification status was set + + **Returns** + + * 200 on success with above fields. + * 401 if the user is not authenticated or not enrolled. + * 404 if the course is not available or cannot be seen. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/ProgressTab' + tags: + - course_home + parameters: + - name: course_key_string + in: path + required: true + type: string + - name: student_id in: path required: true type: string @@ -1397,6 +1799,143 @@ paths: tags: - course_home parameters: [] + /course_home/v1/unsubscribe_from_course_goal/{token}: + post: + operationId: course_home_v1_unsubscribe_from_course_goal_create + summary: API calls to unsubscribe from course goal reminders. + description: |- + Note that this does not require authentication - this view may be hit from an email on a different device than + normal or whatever. We should still be able to unsubscribe the user. Instead, we use a token in the email to + validate that they have permission to unsubscribe. + + This endpoint is very tightly scoped (only unsubscribe: no subscribing, no PII) because it is unauthenticated. + + **Example Requests** + POST api/course_home/v1/unsubscribe_from_course_goal/{token} + + **Example Response Data** + {'course_title': 'Cats & Dogs In Canadian Media'} + + Returns a 404 response if the token was not found. Otherwise, returns some basic course info. But no PII. + parameters: [] + responses: + '201': + description: '' + tags: + - course_home + parameters: + - name: token + in: path + required: true + type: string + /course_live/course/{course_id}/: + get: + operationId: course_live_course_read + summary: Handle HTTP/GET requests + description: Handle HTTP/GET requests + parameters: + - name: course_id + in: path + description: The course for which to get provider list + type: string + required: true + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CourseLiveConfiguration' + '401': + description: The requester is not authenticated. + '403': + description: The requester cannot access the specified course. + '404': + description: The requested course does not exist. + tags: + - course_live + post: + operationId: course_live_course_create + summary: Handle HTTP/POST requests + description: Handle HTTP/POST requests + parameters: + - name: course_id + in: path + description: The course for which to get provider list + type: string + required: true + - name: lti_1p1_client_key + in: path + description: The LTI provider's client key + type: string + required: true + - name: lti_1p1_client_secret + in: path + description: The LTI provider's client secretL + type: string + required: true + - name: lti_1p1_launch_url + in: path + description: The LTI provider's launch URL + type: string + required: true + - name: provider_type + in: path + description: The LTI provider's launch URL + type: string + required: true + - name: lti_config + in: query + description: 'The lti_config object with required additional parameters ' + type: object + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CourseLiveConfiguration' + '400': + description: Required parameters are missing. + '401': + description: The requester is not authenticated. + '403': + description: The requester cannot access the specified course. + '404': + description: The requested course does not exist. + tags: + - course_live + parameters: + - name: course_id + in: path + required: true + type: string + /course_live/iframe/{course_id}/: + get: + operationId: course_live_iframe_read + description: Handle HTTP/GET requests + parameters: [] + responses: + '200': + description: '' + tags: + - course_live + parameters: + - name: course_id + in: path + required: true + type: string + /course_live/providers/{course_id}/: + get: + operationId: course_live_providers_read + description: A view for retrieving Program live IFrame . + parameters: [] + responses: + '200': + description: '' + tags: + - course_live + parameters: + - name: course_id + in: path + required: true + type: string /course_modes/v1/courses/{course_id}/: get: operationId: course_modes_v1_courses_read @@ -1690,11 +2229,16 @@ paths: the "index_dictionary" is included in the "include" parameter. parameters: - - name: include + - name: page in: query - description: A comma-separated list of keys to include. + description: A page number within the paginated result set. required: false - type: string + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer responses: '200': description: '' @@ -1761,9 +2305,9 @@ paths: tags: - courses parameters: [] - ? /courses/v1/blocks/(P{usage_key_string}{var}|api/courses/v1/blocks/(P{usage_key_string}(:i4x://[/]+/[/]+/[/]+/[@]+(:@[/]+))|{var}) - : get: - operationId: courses_v1_blocks_courses_v1_blocks__[_]+_[_]+_[_]+_[@]+(:@[_read + /courses/v1/blocks/{usage_key_string}: + get: + operationId: courses_v1_blocks_read summary: '**Use Case**' description: |- Returns the blocks within the requested block tree according to the @@ -1960,10 +2504,6 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string /courses/v1/course_ids/: get: operationId: courses_v1_course_ids_list @@ -2084,6 +2624,17 @@ paths: provided org code (e.g., "HarvardX") are returned. Case-insensitive. + permissions (optional): + If specified, it filters visible `CourseOverview` objects by + checking if each permission specified is granted for the username. + Notice that Staff users are always granted permission to list any + course. + + active_only (optional): + If this boolean is specified, only the courses that have not ended or do not have any end + date are returned. This is different from search_term because this filtering is done on + CourseOverview and not ElasticSearch. + **Returns** * 200 on success, with a list of course discovery objects as returned @@ -2156,9 +2707,9 @@ paths: tags: - courses parameters: [] - ? /courses/v1/courses/(P{course_key_string}[/+]+{var}[/+]+api/courses/v1/courses/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: courses_v1_courses_+]+api_courses_v1_courses_+]+(_|+)[_]+)_read + /courses/v1/courses/{course_key_string}: + get: + operationId: courses_v1_courses_read summary: '**Use Cases**' description: |- Request details for a course @@ -2197,8 +2748,8 @@ paths: * `"empty"`: no start date is specified * pacing: Course pacing. Possible values: instructor, self * certificate_available_date (optional): Date the certificate will be available, - in ISO 8601 notation if the `certificates.auto_certificate_generation` - waffle switch is enabled + in ISO 8601 notation if the `certificates.auto_certificate_generation` + waffle switch is enabled Deprecated fields: @@ -2259,7 +2810,53 @@ paths: in: path required: true type: string - - name: var + /courses/v2/block_metadata/{usage_key_string}: + get: + operationId: courses_v2_block_metadata_read + summary: '**Use Case**' + description: |- + Returns the block metadata. Data like index_dictionary related to a + block should be fetched using this API, because they are too large for + the cache used by the course blocks/transformers API. + + **Example requests**: + + GET /api/courses/v1/block_metadata//? + &include=index_dictionary + + **Parameters**: + + * "include": a comma-separated list of keys to include. + Valid keys are "index_dictionary". + + **Response Values** + + A dictionary containing: + * id (string): Block usage_key_str. + * type (string) Block type. + * index_dictionary: (dict) The index_dictionary JSON data + (usually this is the text content of the block, for search + indexing or other purposes) for this block. Returned only if + the "index_dictionary" is included in the "include" + parameter. + parameters: + - name: page + in: query + description: A page number within the paginated result set. + required: false + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + tags: + - courses + parameters: + - name: usage_key_string in: path required: true type: string @@ -2319,9 +2916,9 @@ paths: tags: - courses parameters: [] - ? /courses/v2/blocks/(P{usage_key_string}{var}|api/courses/v2/blocks/(P{usage_key_string}(:i4x://[/]+/[/]+/[/]+/[@]+(:@[/]+))|{var}) - : get: - operationId: courses_v2_blocks_courses_v2_blocks__[_]+_[_]+_[_]+_[@]+(:@[_read + /courses/v2/blocks/{usage_key_string}: + get: + operationId: courses_v2_blocks_read summary: '**Use Case**' description: |- Returns the blocks within the requested block tree according to the @@ -2518,13 +3115,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - ? /courseware/celebration/(P{course_key_string}[/+]+{var}[/+]+api/courseware/celebration/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : post: - operationId: courseware_celebration_+]+api_courseware_celebration_+]+(_|+)[_]+)_create + /courseware/celebration/{course_key_string}: + post: + operationId: courseware_celebration_create description: Handle a POST request. parameters: [] responses: @@ -2537,13 +3130,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - ? /courseware/course/(P{course_key_string}[/+]+{var}[/+]+api/courseware/course/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: courseware_course_+]+api_courseware_course_+]+(_|+)[_]+)_read + /courseware/course/{course_key_string}: + get: + operationId: courseware_course_read summary: '**Use Cases**' description: |- Request details for a course @@ -2561,6 +3150,17 @@ paths: * masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user * upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) * upgrade_url: (str) Upgrade linke (or None if can't upgrade anymore) + * celebrations: An object detailing which celebrations to render + * first_section: (bool) If the first section celebration should render + Note: Also uses information from frontend so this value is not final + * streak_length_to_celebrate: (int) The streak length to celebrate for the learner + * streak_discount_enabled: (bool) If the frontend should render an upgrade discount for hitting the streak + * weekly_goal: (bool) If the weekly goal celebration should render + * course_goals: + * selected_goal: + * days_per_week: (int) The number of days the learner wants to learn per week + * subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal + * weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call * effort: A textual description of the weekly hours of effort expected in the course. * end: Date the course ends, in ISO 8601 notation @@ -2569,6 +3169,13 @@ paths: * is_active: boolean * enrollment_end: Date enrollment ends, in ISO 8601 notation * enrollment_start: Date enrollment begins, in ISO 8601 notation + * entrance_exam_data: An object containing information about the course's entrance exam + * entrance_exam_current_score: (float) The users current score on the entrance exam + * entrance_exam_enabled: (bool) If the course has an entrance exam + * entrance_exam_id: (str) The block id for the entrance exam if enabled. Will be a section (chapter) + * entrance_exam_minimum_score_pct: (float) The minimum score a user must receive on the entrance exam + to unlock the remainder of the course. Returned as a float (i.e. 0.7 for 70%) + * entrance_exam_passed: (bool) Indicates if the entrance exam has been passed * id: A unique identifier of the course; a serialized representation of the opaque key identifying the course. * media: An object that contains named media items. Included here: @@ -2583,6 +3190,7 @@ paths: * discounted_price: (str) Upgrade price with checkout code; includes currency symbol * percentage: (int) Amount of discount * upgrade_url: (str) Checkout URL + * org: Name of the organization that owns the course * related_programs: A list of objects that contains program data related to the given course including: * progress: An object containing program progress: * complete: (int) Number of complete courses in the program (a course is completed if the user has @@ -2610,6 +3218,7 @@ paths: * verify_identity_url: URL for a learner to verify their identity. Only returned for learners enrolled in a verified mode. Will update to reverify URL if necessary. * linkedin_add_to_profile_url: URL to add the effective user's certificate to a LinkedIn Profile. + * user_needs_integrity_signature: Whether the user needs to sign the integrity agreement for the course **Parameters:** @@ -2636,13 +3245,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - ? /courseware/resume/(P{course_key_string}[/+]+{var}[/+]+api/courseware/resume/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: courseware_resume_+]+api_courseware_resume_+]+(_|+)[_]+)_list + /courseware/resume/{course_key_string}: + get: + operationId: courseware_resume_read description: Return response to a GET request. parameters: [] responses: @@ -2655,13 +3260,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - ? /courseware/sequence/(P{usage_key_string}{var}|api/courseware/sequence/(P{usage_key_string}(:i4x://[/]+/[/]+/[/]+/[@]+(:@[/]+))|{var}) - : get: - operationId: courseware_sequence_courseware_sequence__[_]+_[_]+_[_]+_[@]+(:@[_read + /courseware/sequence/{usage_key_string}: + get: + operationId: courseware_sequence_read description: Return response to a GET request. parameters: [] responses: @@ -2674,10 +3275,6 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string /credit/v1/courses/: get: operationId: credit_v1_courses_list @@ -2839,6 +3436,49 @@ paths: in: path required: true type: string + /dashboard/v0/programs/{enterprise_uuid}/: + get: + operationId: dashboard_v0_programs_read + description: Return a list of a enterprise learner's all enrolled programs with + their progress. + parameters: [] + responses: + '200': + description: '' + tags: + - dashboard + parameters: + - name: enterprise_uuid + in: path + required: true + type: string + /dashboard/v0/programs/{program_uuid}/progress_details/: + get: + operationId: dashboard_v0_programs_progress_details_list + description: Retrieves progress details of a user in a specified program. + parameters: [] + responses: + '200': + description: '' + tags: + - dashboard + parameters: + - name: program_uuid + in: path + required: true + type: string + /dashboard/v0/recommendation/courses/: + get: + operationId: dashboard_v0_recommendation_courses_list + description: Retrieves course recommendations details of a user in a specified + course. + parameters: [] + responses: + '200': + description: '' + tags: + - dashboard + parameters: [] /demographics/v1/demographics/status/: get: operationId: demographics_v1_demographics_status_list @@ -2862,9 +3502,9 @@ paths: tags: - demographics parameters: [] - /discounts/course/(P{course_key_string}[/+]+{var}[/+]+api/discounts/course/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+): + /discounts/course/{course_key_string}: get: - operationId: discounts_course_+]+api_discounts_course_+]+(_|+)[_]+)_list + operationId: discounts_course_read description: Return the discount percent, if the user has appropriate permissions. parameters: [] responses: @@ -2877,13 +3517,9 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string - ? /discounts/user/{user_id}/course/(P{course_key_string}[/+]+{var}[/+]+api/discounts/user/{user_id}/course/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: discounts_user_course_+]+api_discounts_user_course_+]+(_|+)[_]+)_list + /discounts/user/{user_id}/course/{course_key_string}: + get: + operationId: discounts_user_course_read description: Return the discount percent, if the user has appropriate permissions. parameters: [] responses: @@ -2900,10 +3536,6 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string /discussion/v1/accounts/replace_username: post: operationId: discussion_v1_accounts_replace_username_create @@ -2929,9 +3561,23 @@ paths: /discussion/v1/comments/: get: operationId: discussion_v1_comments_list + summary: |- + Implements the GET method for the list endpoint as described in + the class docstring. description: |- - Implements the GET method for the list endpoint as described in the - class docstring. + This endpoint implements two distinct usage contexts. + + When `username` is provided, the `course_id` parameter is + required, and `thread_id` is ignored. + The behavior is to retrieve all of the user's non-anonymous + comments from the specified course, outside of the context of a + forum thread. In this context, endorsement information is + unavailable. + + When `username` is not provided, `thread_id` is required, and + `course_id` is ignored, since the thread already belongs to a course. + In this context, all information relevant to usage in the + discussions forum is available. parameters: [] responses: '200': @@ -3002,28 +3648,9 @@ paths: in: path required: true type: string - ? /discussion/v1/course_topics/(P{course_id}[/+]+{var}[/+]+api/discussion/v1/course_topics/(P{course_id}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: discussion_v1_course_topics_+]+api_discussion_v1_course_topics_+]+(_|+)[_]+)_list - description: Implements the GET method as described in the class docstring. - parameters: [] - responses: - '200': - description: '' - tags: - - discussion - parameters: - - name: course_id - in: path - required: true - type: string - - name: var - in: path - required: true - type: string - /discussion/v1/courses/(P{course_id}[/+]+{var}[/+]+api/discussion/v1/courses/(P{course_id}[/+]+(/|+)[/+]+{var}[/]+): + /discussion/v1/course_topics/{course_id}: get: - operationId: discussion_v1_courses_+]+api_discussion_v1_courses_+]+(_|+)[_]+)_list + operationId: discussion_v1_course_topics_read description: Implements the GET method as described in the class docstring. parameters: [] responses: @@ -3036,7 +3663,50 @@ paths: in: path required: true type: string - - name: var + /discussion/v1/courses/{course_id}: + get: + operationId: discussion_v1_courses_read + summary: Retrieve general discussion metadata for a course. + description: |- + **Example Requests**: + + GET /api/discussion/v1/courses/course-v1:ExampleX+Subject101+2015 + parameters: + - name: course_id + in: path + description: Course ID + type: string + required: true + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CourseMetadataSerailizer' + '401': + description: The requester is not authenticated. + '403': + description: The requester cannot access the specified course. + '404': + description: The requested course does not exist. + tags: + - discussion + parameters: + - name: course_id + in: path + required: true + type: string + /discussion/v1/courses/{course_id}/learner/: + get: + operationId: discussion_v1_courses_learner_list + description: Implements the GET method as described in the class docstring. + parameters: [] + responses: + '200': + description: '' + tags: + - discussion + parameters: + - name: course_id in: path required: true type: string @@ -3098,6 +3768,36 @@ paths: in: path required: true type: string + /discussion/v1/courses/{course_id}/upload: + post: + operationId: discussion_v1_courses_upload_create + description: Handles a file upload. + parameters: [] + responses: + '201': + description: '' + tags: + - discussion + parameters: + - name: course_id + in: path + required: true + type: string + /discussion/v1/courses/{course_key_string}/activity_stats: + get: + operationId: discussion_v1_courses_activity_stats_list + description: Implements the GET method as described in the class docstring. + parameters: [] + responses: + '200': + description: '' + tags: + - discussion + parameters: + - name: course_key_string + in: path + required: true + type: string /discussion/v1/threads/: get: operationId: discussion_v1_threads_list @@ -3174,6 +3874,345 @@ paths: in: path required: true type: string + /discussion/v2/course_topics/{course_id}: + get: + operationId: discussion_v2_course_topics_read + summary: '**Use Cases**' + description: |2- + Retrieve the topic listing for a course. + + **Example Requests**: + + GET /api/discussion/v2/course_topics/course-v1:ExampleX+Subject101+2015 + ?topic_id={topic_id_1, topid_id_2}&order_by=course_structure + parameters: + - name: course_id + in: path + description: Course ID + type: string + required: true + - name: topic_id + in: query + description: Comma-separated list of topic ids to filter + type: string + - name: order_by + in: query + description: Sort ordering for topics + required: false + type: string + enum: + - course_structure + - activity + - name + responses: + '200': + description: '' + schema: + $ref: '#/definitions/DiscussionTopicSerializerV2' + '401': + description: The requester is not authenticated. + '403': + description: The requester cannot access the specified course. + '404': + description: The requested course does not exist. + tags: + - discussion + parameters: + - name: course_id + in: path + required: true + type: string + /discussion/v3/course_topics/{course_id}: + get: + operationId: discussion_v3_course_topics_read + summary: '**Use Cases**' + description: |- + Retrieve the topic listing for a course. + + **Example Requests**: + + GET /api/discussion/v3/course_topics/course-v1:ExampleX+Subject101+2015 + parameters: [] + responses: + '200': + description: '' + tags: + - discussion + parameters: + - name: course_id + in: path + required: true + type: string + /edx_name_affirmation/v1/verified_name: + get: + operationId: edx_name_affirmation_v1_verified_name_list + summary: Get most recent verified name for the request user or for the specified + username + description: |- + For example: /edx_name_affirmation/v1/verified_name?username=jdoe + Example response: { + "username": "jdoe", + "verified_name": "Jonathan Doe", + "profile_name": "Jon Doe", + "verification_attempt_id": 123, + "proctored_exam_attempt_id": None, + "status": "approved", + "use_verified_name_for_certs": False, + } + parameters: + - name: username + in: query + description: The username of which verified name records might be associated + type: string + responses: + '200': + description: The verified_name record associated with the username provided + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '404': + description: The verified_name record associated with the username provided + does not exist. + tags: + - edx_name_affirmation + post: + operationId: edx_name_affirmation_v1_verified_name_create + summary: Creates a new VerifiedName. + description: |- + Expected POST data: { + "username": "jdoe", + "verified_name": "Jonathan Doe" + "profile_name": "Jon Doe" + "verification_attempt_id": (Optional) + "proctored_exam_attempt_id": (Optional) + "status": (Optional) + } + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/VerifiedName' + responses: + '200': + description: The verified_name record associated with the username provided + is successfully created + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '400': + description: The posted data have conflicts with already stored verified + name + tags: + - edx_name_affirmation + patch: + operationId: edx_name_affirmation_v1_verified_name_partial_update + summary: Update verified name status + description: |- + Example PATCH data: { + "username": "jdoe", + "verification_attempt_id" OR "proctored_exam_attempt_id": 123, + "status": "approved", + } + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/UpdateVerifiedName' + responses: + '200': + description: The verified_name record associated with the username provided + is successfully edited + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '400': + description: The edit action failed validation rules + tags: + - edx_name_affirmation + delete: + operationId: edx_name_affirmation_v1_verified_name_delete + summary: Delete verified name + description: /edx_name_affirmation/v1/verified_name/{verified_name_id} + parameters: + - name: verified_name_id + in: path + description: The database id of the verified_name to be deleted + type: string + required: true + responses: + '204': + description: The verified_name record associated with the id is successfully + deleted from data store + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '404': + description: The verified_name record associated with the id provided does + not exist. + tags: + - edx_name_affirmation + parameters: [] + /edx_name_affirmation/v1/verified_name/config: + post: + operationId: edx_name_affirmation_v1_verified_name_config_create + summary: Create VerifiedNameConfig + description: Create VerifiedNameConfig + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/VerifiedNameConfig' + responses: + '201': + description: The verified_name configuration record is successfully created + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '400': + description: The POSTed data failed validation rules + tags: + - edx_name_affirmation + parameters: [] + /edx_name_affirmation/v1/verified_name/history: + get: + operationId: edx_name_affirmation_v1_verified_name_history_list + summary: Get a list of verified name objects for the given user, ordered by + most recently created. + description: Get a list of verified name objects for the given user, ordered + by most recently created. + parameters: + - name: username + in: query + description: The username of which verified name records might be associated + type: string + responses: + '200': + description: The verified_name record associated with the username provided + is successfully edited + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + tags: + - edx_name_affirmation + parameters: [] + /edx_name_affirmation/v1/verified_name/{verified_name_id}: + get: + operationId: edx_name_affirmation_v1_verified_name_read + summary: Get most recent verified name for the request user or for the specified + username + description: |- + For example: /edx_name_affirmation/v1/verified_name?username=jdoe + Example response: { + "username": "jdoe", + "verified_name": "Jonathan Doe", + "profile_name": "Jon Doe", + "verification_attempt_id": 123, + "proctored_exam_attempt_id": None, + "status": "approved", + "use_verified_name_for_certs": False, + } + parameters: + - name: username + in: query + description: The username of which verified name records might be associated + type: string + responses: + '200': + description: The verified_name record associated with the username provided + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '404': + description: The verified_name record associated with the username provided + does not exist. + tags: + - edx_name_affirmation + post: + operationId: edx_name_affirmation_v1_verified_name_create + summary: Creates a new VerifiedName. + description: |- + Expected POST data: { + "username": "jdoe", + "verified_name": "Jonathan Doe" + "profile_name": "Jon Doe" + "verification_attempt_id": (Optional) + "proctored_exam_attempt_id": (Optional) + "status": (Optional) + } + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/VerifiedName' + responses: + '200': + description: The verified_name record associated with the username provided + is successfully created + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '400': + description: The posted data have conflicts with already stored verified + name + tags: + - edx_name_affirmation + patch: + operationId: edx_name_affirmation_v1_verified_name_partial_update + summary: Update verified name status + description: |- + Example PATCH data: { + "username": "jdoe", + "verification_attempt_id" OR "proctored_exam_attempt_id": 123, + "status": "approved", + } + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/UpdateVerifiedName' + responses: + '200': + description: The verified_name record associated with the username provided + is successfully edited + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '400': + description: The edit action failed validation rules + tags: + - edx_name_affirmation + delete: + operationId: edx_name_affirmation_v1_verified_name_delete + summary: Delete verified name + description: /edx_name_affirmation/v1/verified_name/{verified_name_id} + parameters: + - name: verified_name_id + in: path + description: The database id of the verified_name to be deleted + type: string + required: true + responses: + '204': + description: The verified_name record associated with the id is successfully + deleted from data store + '403': + description: User lacks required permission. Only an edX staff user can + invoke this API + '404': + description: The verified_name record associated with the id provided does + not exist. + tags: + - edx_name_affirmation + parameters: + - name: verified_name_id + in: path + required: true + type: string /edx_proctoring/proctoring_review_callback/: post: operationId: edx_proctoring_proctoring_review_callback_create @@ -3219,6 +4258,17 @@ paths: in: path required: true type: string + /edx_proctoring/v1/proctored_exam/active_attempt: + get: + operationId: edx_proctoring_v1_proctored_exam_active_attempt_list + description: HTTP GET handler. Returns active attempt + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: [] /edx_proctoring/v1/proctored_exam/active_exams_for_user: get: operationId: edx_proctoring_v1_proctored_exam_active_exams_for_user_list @@ -3281,6 +4331,21 @@ paths: tags: - edx_proctoring parameters: [] + /edx_proctoring/v1/proctored_exam/attempt/course_id/{course_id}: + get: + operationId: edx_proctoring_v1_proctored_exam_attempt_course_id_read + description: HTTP GET handler. Returns exam with attempt and active attempt + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: + - name: course_id + in: path + required: true + type: string /edx_proctoring/v1/proctored_exam/attempt/grouped/course_id/{course_id}: get: operationId: edx_proctoring_v1_proctored_exam_attempt_grouped_course_id_read @@ -3395,6 +4460,18 @@ paths: in: path required: true type: string + /edx_proctoring/v1/proctored_exam/bulk_allowance: + put: + operationId: edx_proctoring_v1_proctored_exam_bulk_allowance_update + description: HTTP PUT handler. Adds or updates Allowances for many exams and + students + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: [] /edx_proctoring/v1/proctored_exam/exam: get: operationId: edx_proctoring_v1_proctored_exam_exam_list @@ -3571,6 +4648,54 @@ paths: in: path required: true type: string + /edx_proctoring/v1/proctored_exam/exam_registration/course_id/{course_id}: + patch: + operationId: edx_proctoring_v1_proctored_exam_exam_registration_course_id_partial_update + description: |- + Create or update a list of all active exams. + Exams not included in the registration payload will be deactivated + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: + - name: course_id + in: path + required: true + type: string + /edx_proctoring/v1/proctored_exam/review_policy/exam_id/{exam_id}/: + get: + operationId: edx_proctoring_v1_proctored_exam_review_policy_exam_id_read + description: HTTP GET handler. Returns review policy for proctored exam. + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: + - name: exam_id + in: path + required: true + type: string + /edx_proctoring/v1/proctored_exam/settings/exam_id/{exam_id}/: + get: + operationId: edx_proctoring_v1_proctored_exam_settings_exam_id_read + description: HTTP GET handler. Returns proctoring_settings and exam_proctoring_backend + config for proctored exam. + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: + - name: exam_id + in: path + required: true + type: string /edx_proctoring/v1/proctored_exam/{course_id}/allowance: get: operationId: edx_proctoring_v1_proctored_exam_allowance_list @@ -3606,6 +4731,37 @@ paths: in: path required: true type: string + /edx_proctoring/v1/proctored_exam/{course_id}/bulk_allowance: + put: + operationId: edx_proctoring_v1_proctored_exam_bulk_allowance_update + description: HTTP PUT handler. Adds or updates Allowances for many exams and + students + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: + - name: course_id + in: path + required: true + type: string + /edx_proctoring/v1/proctored_exam/{course_id}/grouped/allowance: + get: + operationId: edx_proctoring_v1_proctored_exam_grouped_allowance_list + description: HTTP GET Handler. + parameters: [] + responses: + '200': + description: '' + tags: + - edx_proctoring + parameters: + - name: course_id + in: path + required: true + type: string /edx_proctoring/v1/retire_backend_user/{user_id}/: post: operationId: edx_proctoring_v1_retire_backend_user_create @@ -3849,6 +5005,11 @@ paths: description: The pagination cursor value. required: false type: string + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer responses: '200': description: '' @@ -4503,6 +5664,144 @@ paths: in: path required: true type: string + /grades/v1/section_grades_breakdown/: + get: + operationId: grades_v1_section_grades_breakdown_list + summary: '**Use Cases**' + description: |- + Get a list of all grades for all sections, optionally filtered by a course ID or list of usernames. + + **Example Requests** + + GET /api/grades/v1/section_grades_breakdown + + GET /api/grades/v1/section_grades_breakdown?course_id={course_id} + + GET /api/grades/v1/section_grades_breakdown?username={username},{username},{username} + + GET /api/grades/v1/section_grades_breakdown?course_id={course_id}&username={username} + + **Query Parameters for GET** + + * course_id: Filters the result to course grade status for the course corresponding to the + given course ID. The value must be URL encoded. Optional. + + * username: List of comma-separated usernames. Filters the result to the course grade status + of the given users. Optional. + + * page_size: Number of results to return per page. Optional. + + **Response Values** + + If the request for information about the course grade status is successful, an HTTP 200 "OK" response + is returned. + + The HTTP 200 response has the following values. + + * results: A list of the course grading status matching the request. + + * course_id: Course ID of the course in the course grading status. + + * user: Username of the user in the course enrollment. + + * passed: Boolean flag for user passing the course. + + * current_grade: An integer representing the current grade of the course. + + * section_breakdown: A summary of each course section's grade. + + A dictionary in the section_breakdown list has the following keys: + * percent: A float percentage for the section. + * label: A short string identifying the section. Preferably fixed-length. E.g. "HW 3". + * detail: A string explanation of the score. E.g. "Homework 1 - Ohms Law - 83% (5/6)" + * category: A string identifying the category. + * prominent: A boolean value indicating that this section should be displayed as more prominent + than other items. + + * next: The URL to the next page of results, or null if this is the + last page. + + * previous: The URL to the next page of results, or null if this + is the first page. + + If the user is not logged in, a 401 error is returned. + + If the user is not global staff, a 403 error is returned. + + If the specified course_id is not valid or any of the specified usernames + are not valid, a 400 error is returned. + + If the specified course_id does not correspond to a valid course or if all the specified + usernames do not correspond to valid users, an HTTP 200 "OK" response is returned with an + empty 'results' field. + parameters: + - name: cursor + in: query + description: The pagination cursor value. + required: false + type: string + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + tags: + - grades + parameters: [] + /grades/v1/submission_history/{course_id}/: + get: + operationId: grades_v1_submission_history_read + description: |- + Get submission history details. This submission history is related to only + ProblemBlock and it doesn't support LibraryContentBlock or ContentLibraries + as of now. + + **Usecases**: + + Users with GlobalStaff status can retrieve everyone's submission history. + + **Example Requests**: + + GET /api/grades/v1/submission_history/{course_id} + GET /api/grades/v1/submission_history/{course_id}/?username={username} + + **Query Parameters for GET** + + * course_id: Course id to retrieve submission history. + * username: Single username for which this view will retrieve the submission history details. + + **Response Values**: + + If there's an error while getting the submission history an empty response will + be returned. + The submission history response has the following attributes: + + * Results: A list of submission history: + * course_id: Course id + * course_name: Course name + * user: Username + * problems: List of problems + * location: problem location + * name: problem's display name + * submission_history: List of submission history + * state: State of submission. + * grade: Grade. + * max_grade: Maximum possible grade. + * data: problem's data. + parameters: [] + responses: + '200': + description: '' + tags: + - grades + parameters: + - name: course_id + in: path + required: true + type: string /grades/v1/subsection/{subsection_id}/: get: operationId: grades_v1_subsection_read @@ -4727,11 +6026,480 @@ paths: in: path required: true type: string + /instructor_task/v1/schedules/{course_id}/bulk_email/: + get: + operationId: instructor_task_v1_schedules_bulk_email_list + description: Read only view to list all scheduled bulk email messages for a + course-run. + parameters: + - name: page + in: query + description: A page number within the paginated result set. + required: false + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + schema: + required: + - count + - results + type: object + properties: + count: + type: integer + next: + type: string + format: uri + x-nullable: true + previous: + type: string + format: uri + x-nullable: true + results: + type: array + items: + $ref: '#/definitions/ScheduledBulkEmail' + tags: + - instructor_task + parameters: + - name: course_id + in: path + required: true + type: string + /instructor_task/v1/schedules/{course_id}/bulk_email/{schedule_id}: + put: + operationId: instructor_task_v1_schedules_bulk_email_update + description: |- + A view that supports the modification of instructor task schedules. It provides the ability to: + * Delete an instructor task schedule + * Update an instructor task schedule and/or update the course email associated with the scheduled task. + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/ScheduledBulkEmail' + responses: + '200': + description: '' + schema: + $ref: '#/definitions/ScheduledBulkEmail' + tags: + - instructor_task + patch: + operationId: instructor_task_v1_schedules_bulk_email_partial_update + description: |- + A view that supports the modification of instructor task schedules. It provides the ability to: + * Delete an instructor task schedule + * Update an instructor task schedule and/or update the course email associated with the scheduled task. + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/ScheduledBulkEmail' + responses: + '200': + description: '' + schema: + $ref: '#/definitions/ScheduledBulkEmail' + tags: + - instructor_task + delete: + operationId: instructor_task_v1_schedules_bulk_email_delete + description: |- + A view that supports the modification of instructor task schedules. It provides the ability to: + * Delete an instructor task schedule + * Update an instructor task schedule and/or update the course email associated with the scheduled task. + parameters: [] + responses: + '204': + description: '' + tags: + - instructor_task + parameters: + - name: course_id + in: path + required: true + type: string + - name: schedule_id + in: path + required: true + type: string + /learner-pathway-progress/v1/progress/: + get: + operationId: learner-pathway-progress_v1_progress_list + summary: '**Use Case**' + description: |- + * Get a detailed list of all Pathways or single pathway which user have in progress. + + **Example Request** + + GET /api/learner-pathway-progress/v1/progress/ + GET /api/learner-pathway-progress/v1/progress/{learner_pathway_uuid}/ + GET /api/learner-pathway-progress/v1/progress/?enterprise_uuid={enterprise_uuid} + GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid}&enterprise_uuid={enterprise_uuid} + GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid1},{learner_pathway_uuid2} + + **GET Parameters** + + A GET request may include the following parameters if wants to fetch data of particular pathways. + + * learner_pathway_uuid: UUID of a LearnerPathway. + + **Example GET Response** + + [ + { + "learner_pathway_progress": { + "id": 117, + "uuid": "29efa34c-60c6-4791-88c0-ab3b5fbd7503", + "title": "test 1", + "status": "active", + "banner_image": null, + "card_image": null, + "overview": "", + "steps": [ + { + "uuid": "7d95ae15-821e-447a-be2e-9fbfa4d777b4", + "min_requirement": 2, + "courses": [], + "programs": [ + { + "uuid": "919e68dd-8147-482f-8666-72240380c251", + "title": "edX Demonstration Program", + "short_description": "", + "card_image_url": "http://edx.com/logos", + "content_type": "program", + "courses": [ + { + "key": "edX+DemoX", + "course_runs": [ + { + "key": "course-v1:edX+DemoX+Demo_Course" + } + ] + } + ], + "status": "NOT_STARTED" + } + ], + "status": 0.0 + }, + { + "uuid": "768e4081-901d-4913-8e7c-434ad25636ac", + "min_requirement": 2, + "courses": [ + { + "key": "", + "course_runs": [], + "title": "test course 2", + "short_description": "", + "card_image_url": null, + "content_type": "course", + "status": "NOT_STARTED" + } + ], + "programs": [ + { + "uuid": "919e68dd-8147-482f-8666-72240380c251", + "title": "edX Demonstration Program", + "short_description": "", + "card_image_url": "http://edx.com/logo", + "content_type": "program", + "courses": [ + { + "key": "edX+DemoX", + "course_runs": [ + { + "key": "course-v1:edX+DemoX+Demo_Course" + } + ] + } + ], + "status": "NOT_STARTED" + } + ], + "status": 0.0 + }, + { + "uuid": "ced544b3-c1e8-47b5-b7fa-76ef75c3fcc2", + "min_requirement": 1, + "courses": [ + { + "key": "edX+DemoX", + "course_runs": [ + { + "key": "course-v1:edX+DemoX+Demo_Course" + } + ], + "title": "Demonstration Course", + "short_description": "dummy desc", + "card_image_url": null, + "content_type": "course", + "status": "IN_PROGRESS" + } + ], + "programs": [], + "status": 0.0 + } + ] + } + } + ] + parameters: + - name: learner_pathway_uuid + in: query + description: '' + required: false + type: string + - name: uuid + in: query + description: '' + required: false + type: string + - name: page + in: query + description: A page number within the paginated result set. + required: false + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + schema: + required: + - count + - results + type: object + properties: + count: + type: integer + next: + type: string + format: uri + x-nullable: true + previous: + type: string + format: uri + x-nullable: true + results: + type: array + items: + $ref: '#/definitions/LearnerPathwayProgress' + tags: + - learner-pathway-progress + parameters: [] + /learner-pathway-progress/v1/progress/{learner_pathway_uuid}/: + get: + operationId: learner-pathway-progress_v1_progress_read + summary: '**Use Case**' + description: |- + * Get a detailed list of all Pathways or single pathway which user have in progress. + + **Example Request** + + GET /api/learner-pathway-progress/v1/progress/ + GET /api/learner-pathway-progress/v1/progress/{learner_pathway_uuid}/ + GET /api/learner-pathway-progress/v1/progress/?enterprise_uuid={enterprise_uuid} + GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid}&enterprise_uuid={enterprise_uuid} + GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid1},{learner_pathway_uuid2} + + **GET Parameters** + + A GET request may include the following parameters if wants to fetch data of particular pathways. + + * learner_pathway_uuid: UUID of a LearnerPathway. + + **Example GET Response** + + [ + { + "learner_pathway_progress": { + "id": 117, + "uuid": "29efa34c-60c6-4791-88c0-ab3b5fbd7503", + "title": "test 1", + "status": "active", + "banner_image": null, + "card_image": null, + "overview": "", + "steps": [ + { + "uuid": "7d95ae15-821e-447a-be2e-9fbfa4d777b4", + "min_requirement": 2, + "courses": [], + "programs": [ + { + "uuid": "919e68dd-8147-482f-8666-72240380c251", + "title": "edX Demonstration Program", + "short_description": "", + "card_image_url": "http://edx.com/logos", + "content_type": "program", + "courses": [ + { + "key": "edX+DemoX", + "course_runs": [ + { + "key": "course-v1:edX+DemoX+Demo_Course" + } + ] + } + ], + "status": "NOT_STARTED" + } + ], + "status": 0.0 + }, + { + "uuid": "768e4081-901d-4913-8e7c-434ad25636ac", + "min_requirement": 2, + "courses": [ + { + "key": "", + "course_runs": [], + "title": "test course 2", + "short_description": "", + "card_image_url": null, + "content_type": "course", + "status": "NOT_STARTED" + } + ], + "programs": [ + { + "uuid": "919e68dd-8147-482f-8666-72240380c251", + "title": "edX Demonstration Program", + "short_description": "", + "card_image_url": "http://edx.com/logo", + "content_type": "program", + "courses": [ + { + "key": "edX+DemoX", + "course_runs": [ + { + "key": "course-v1:edX+DemoX+Demo_Course" + } + ] + } + ], + "status": "NOT_STARTED" + } + ], + "status": 0.0 + }, + { + "uuid": "ced544b3-c1e8-47b5-b7fa-76ef75c3fcc2", + "min_requirement": 1, + "courses": [ + { + "key": "edX+DemoX", + "course_runs": [ + { + "key": "course-v1:edX+DemoX+Demo_Course" + } + ], + "title": "Demonstration Course", + "short_description": "dummy desc", + "card_image_url": null, + "content_type": "course", + "status": "IN_PROGRESS" + } + ], + "programs": [], + "status": 0.0 + } + ] + } + } + ] + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/LearnerPathwayProgress' + tags: + - learner-pathway-progress + parameters: + - name: learner_pathway_uuid + in: path + required: true + type: string + pattern: '[0-9a-f-]+' + /learner_home/init/: + get: + operationId: learner_home_init_list + description: Get masquerade user and proxy to init request + parameters: [] + responses: + '200': + description: '' + tags: + - learner_home + parameters: [] + /learner_home/mock/init/: + get: + operationId: learner_home_mock_init_read + description: Returns static JSON authored in MOCK_DATA_FILE + parameters: [] + responses: + '200': + description: '' + tags: + - learner_home + parameters: [] + /learner_home/recommendation/courses/: + get: + operationId: learner_home_recommendation_courses_list + description: Retrieves course recommendations details. + parameters: [] + responses: + '200': + description: '' + tags: + - learner_home + parameters: [] + /learner_recommendations/amplitude/{course_id}/: + get: + operationId: learner_recommendations_amplitude_read + description: |- + Returns + - Amplitude course recommendations for course about page + parameters: [] + responses: + '200': + description: '' + tags: + - learner_recommendations + parameters: + - name: course_id + in: path + required: true + type: string + /learner_recommendations/courses/: + get: + operationId: learner_recommendations_courses_list + description: Retrieves course recommendations details. + parameters: [] + responses: + '200': + description: '' + tags: + - learner_recommendations + parameters: [] /learning_sequences/v1/course_outline/{course_key_str}: get: operationId: learning_sequences_v1_course_outline_read - summary: The CourseOutline, customized for a given user. - description: Currently restricted to global staff. + description: The CourseOutline, customized for a given user. parameters: [] responses: '200': @@ -4942,12 +6710,106 @@ paths: in: path required: true type: string + /lti_consumer/v1/lti/{lti_config_id}/memberships: + get: + operationId: lti_consumer_v1_lti_memberships_list + description: |- + Overrides default list method of ModelViewSet. Calls LMS `get_course_members` + API and returns result. + parameters: + - name: page + in: query + description: A page number within the paginated result set. + required: false + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + produces: + - application/vnd.ims.lti-nrps.v2.membershipcontainer+json + tags: + - lti_consumer + parameters: + - name: lti_config_id + in: path + required: true + type: string + /lti_consumer/v1/lti/{lti_config_id}/memberships/{id}: + get: + operationId: lti_consumer_v1_lti_memberships_read + summary: LTI NRPS Context Membership Service endpoint. + description: 'See full documentation at:' + parameters: [] + responses: + '200': + description: '' + produces: + - application/vnd.ims.lti-nrps.v2.membershipcontainer+json + tags: + - lti_consumer + parameters: + - name: id + in: path + required: true + type: string + - name: lti_config_id + in: path + required: true + type: string + /mfe_config/v1: + get: + operationId: mfe_config_v1_list + summary: Return the MFE configuration, optionally including MFE-specific overrides. + description: |- + **Usage** + + Get common config: + GET /api/mfe_config/v1 + + Get app config (common + app-specific overrides): + GET /api/mfe_config/v1?mfe=name_of_mfe + + **GET Response Values** + ``` + { + "BASE_URL": "https://name_of_mfe.example.com", + "LANGUAGE_PREFERENCE_COOKIE_NAME": "example-language-preference", + "CREDENTIALS_BASE_URL": "https://credentials.example.com", + "DISCOVERY_API_BASE_URL": "https://discovery.example.com", + "LMS_BASE_URL": "https://courses.example.com", + "LOGIN_URL": "https://courses.example.com/login", + "LOGOUT_URL": "https://courses.example.com/logout", + "STUDIO_BASE_URL": "https://studio.example.com", + "LOGO_URL": "https://courses.example.com/logo.png", + ... and so on + } + ``` + parameters: + - name: mfe + in: query + description: Name of an MFE (a.k.a. an APP_ID). + type: string + responses: + '200': + description: '' + tags: + - mfe_config + parameters: [] /mfe_context: get: operationId: mfe_context_list description: |- - Returns the context for third party auth providers, user country code - and the currently running pipeline. + Returns + - dynamic registration fields + - dynamic optional fields + - the context for third party auth providers + - user country code + - the currently running pipeline. parameters: [] responses: '200': @@ -4955,6 +6817,22 @@ paths: tags: - mfe_context parameters: [] + /mobile/{api_version}/course_info/record_user_activity: + post: + operationId: mobile_course_info_record_user_activity_create + summary: Handle the POST request + description: Populate the user activity table. + parameters: [] + responses: + '201': + description: '' + tags: + - mobile + parameters: + - name: api_version + in: path + required: true + type: string /mobile/{api_version}/course_info/{course_id}/handouts: get: operationId: mobile_course_info_handouts_list @@ -5188,9 +7066,9 @@ paths: in: path required: true type: string - ? /mobile/{api_version}/users/{username}/course_status_info/(P{course_id}[/+]+{var}[/+]+api/mobile/{api_version}/users/{username}/course_status_info/(P{course_id}[/+]+(/|+)[/+]+{var}[/]+) - : get: - operationId: mobile_users_course_status_info_+]+api_mobile_users_course_status_info_+]+(_|+)[_]+)_list + /mobile/{api_version}/users/{username}/course_status_info/{course_id}: + get: + operationId: mobile_users_course_status_info_read description: Get the ID of the module that the specified user last visited in the specified course. parameters: [] @@ -5200,7 +7078,7 @@ paths: tags: - mobile patch: - operationId: mobile_users_course_status_info_+]+api_mobile_users_course_status_info_+]+(_|+)[_]+)_partial_update + operationId: mobile_users_course_status_info_partial_update description: Update the ID of the module that the specified user last visited in the specified course. parameters: [] @@ -5222,10 +7100,198 @@ paths: in: path required: true type: string - - name: var - in: path - required: true - type: string + /ora_staff_grader/initialize: + get: + operationId: ora_staff_grader_initialize_read + description: GET course metadata + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/mock/initialize: + get: + operationId: ora_staff_grader_mock_initialize_read + description: Returns initial app state + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/mock/submission: + get: + operationId: ora_staff_grader_mock_submission_read + description: Get a submission + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/mock/submission/grade: + get: + operationId: ora_staff_grader_mock_submission_grade_read + description: Submit a grade + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + post: + operationId: ora_staff_grader_mock_submission_grade_create + description: Save a grade update to the data store + parameters: [] + responses: + '201': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/mock/submission/lock: + post: + operationId: ora_staff_grader_mock_submission_lock_create + description: Claim a submission lock, updating lock status + parameters: [] + responses: + '201': + description: '' + tags: + - ora_staff_grader + delete: + operationId: ora_staff_grader_mock_submission_lock_delete + description: Delete a submission lock, updating lock status + parameters: [] + responses: + '204': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/mock/submission/status: + get: + operationId: ora_staff_grader_mock_submission_status_read + description: Get a submission status, leaving out the response + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/submission: + get: + operationId: ora_staff_grader_submission_read + description: GET submission contents and assessment info, if any + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/submission/batch/unlock: + get: + operationId: ora_staff_grader_submission_batch_unlock_read + description: POST delete a group of submission locks, limited to just those + in the list that the user owns. + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + post: + operationId: ora_staff_grader_submission_batch_unlock_create + description: Batch delete submission locks + parameters: [] + responses: + '201': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/submission/files: + get: + operationId: ora_staff_grader_submission_files_read + summary: GET file metadata for a submission. + description: |- + Used to get updated file download links to avoid signed download link expiration + issues. + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/submission/grade: + get: + operationId: ora_staff_grader_submission_grade_read + description: POST submit a grade for a submission + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + post: + operationId: ora_staff_grader_submission_grade_create + description: Update a grade + parameters: [] + responses: + '201': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/submission/lock: + get: + operationId: ora_staff_grader_submission_lock_read + description: |- + POST claim a submission lock for grading + DELETE release a submission lock + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + post: + operationId: ora_staff_grader_submission_lock_create + description: Claim a submission lock + parameters: [] + responses: + '201': + description: '' + tags: + - ora_staff_grader + delete: + operationId: ora_staff_grader_submission_lock_delete + description: Clear a submission lock + parameters: [] + responses: + '204': + description: '' + tags: + - ora_staff_grader + parameters: [] + /ora_staff_grader/submission/status: + get: + operationId: ora_staff_grader_submission_status_read + description: GET submission grade status, lock status, and grade data + parameters: [] + responses: + '200': + description: '' + tags: + - ora_staff_grader + parameters: [] /organizations/v0/organizations/: get: operationId: organizations_v0_organizations_list @@ -5334,6 +7400,7 @@ paths: (.), hyphen (-) and underscore (_). required: true type: string + pattern: '[^/+]+' /profile_images/v1/{username}/remove: post: operationId: profile_images_v1_remove_create @@ -5669,6 +7736,17 @@ paths: in: path required: true type: string + /send_account_activation_email: + post: + operationId: send_account_activation_email_create + description: Returns status code. + parameters: [] + responses: + '201': + description: '' + tags: + - send_account_activation_email + parameters: [] /team/v0/bulk_team_membership/{course_id}: get: operationId: team_v0_bulk_team_membership_read @@ -6058,8 +8136,12 @@ paths: get: operationId: third_party_auth_context_list description: |- - Returns the context for third party auth providers, user country code - and the currently running pipeline. + Returns + - dynamic registration fields + - dynamic optional fields + - the context for third party auth providers + - user country code + - the currently running pipeline. parameters: [] responses: '200': @@ -6130,8 +8212,9 @@ paths: get: operationId: user_v1_accounts_list description: |- - GET /api/user/v1/accounts?username={username1},{username2} - GET /api/user/v1/accounts?email={user_email1},{user_email2} + GET /api/user/v1/accounts?username={username1,username2} + GET /api/user/v1/accounts?email={user_email} (Staff Only) + GET /api/user/v1/accounts?lms_user_id={lms_user_id} (Staff Only) parameters: [] responses: '200': @@ -6142,6 +8225,20 @@ paths: tags: - user parameters: [] + /user/v1/accounts/cancel_retirement/: + post: + operationId: user_v1_accounts_cancel_retirement + summary: POST /api/user/v1/accounts/cancel_retirement/ + description: |- + Cancels the retirement for a user's account. + This also handles the top level error handling, and permissions. + parameters: [] + responses: + '201': + description: '' + tags: + - user + parameters: [] /user/v1/accounts/deactivate_logout/: post: operationId: user_v1_accounts_deactivate_logout_create @@ -6156,6 +8253,42 @@ paths: tags: - user parameters: [] + /user/v1/accounts/name_change/: + post: + operationId: user_v1_accounts_name_change_create + summary: POST /api/user/v1/accounts/name_change/ + description: |- + Request a profile name change. This creates a PendingNameChange to be verified later, + rather than updating the user's profile name directly. + + Example request: + { + "name": "Jon Doe" + } + parameters: [] + responses: + '201': + description: '' + tags: + - user + parameters: [] + /user/v1/accounts/name_change/{username}/confirm/: + post: + operationId: user_v1_accounts_name_change_confirm + summary: POST /api/user/v1/account/name_change/{username}/confirm + description: Confirm a name change request for the specified user, and update + their profile name. + parameters: [] + responses: + '201': + description: '' + tags: + - user + parameters: + - name: username + in: path + required: true + type: string /user/v1/accounts/replace_usernames/: post: operationId: user_v1_accounts_replace_usernames_create @@ -6312,7 +8445,7 @@ paths: operationId: user_v1_accounts_retirement_queue summary: |- GET /api/user/v1/accounts/retirement_queue/ - {'cool_off_days': 7, 'states': ['PENDING', 'COMPLETE']} + {'cool_off_days': 7, 'states': ['PENDING', 'COMPLETE'], 'limit': 500} description: |- Returns the list of RetirementStatus users in the given states that were created in the retirement queue at least `cool_off_days` ago. @@ -6376,10 +8509,8 @@ paths: Updates the RetirementStatus row for the given user to the new status, and append any messages to the message log. - Note that this implementation DOES NOT use the "merge patch" - implementation seen in AccountViewSet. Slumber, the project - we use to power edx-rest-api-client, does not currently support - it. The content type for this request is 'application/json'. + Note that this implementation DOES NOT use the "merge patch" implementation seen in AccountViewSet. + The content type for this request is 'application/json'. parameters: [] responses: '200': @@ -6387,6 +8518,22 @@ paths: tags: - user parameters: [] + /user/v1/accounts/verifications/{attempt_id}/: + get: + operationId: user_v1_accounts_verifications_read + description: Get IDV attempt details by attempt_id. Only accessible by global + staff. + parameters: [] + responses: + '200': + description: '' + tags: + - user + parameters: + - name: attempt_id + in: path + required: true + type: string /user/v1/accounts/{username}: get: operationId: user_v1_accounts_read @@ -6738,6 +8885,21 @@ paths: in: path required: true type: string + /user/v1/skill_level/{job_id}/: + get: + operationId: user_v1_skill_level_read + description: GET /api/user/v1/skill_level/{job_id}/ + parameters: [] + responses: + '200': + description: '' + tags: + - user + parameters: + - name: job_id + in: path + required: true + type: string /user/v1/user_prefs/: get: operationId: user_v1_user_prefs_list @@ -6951,6 +9113,93 @@ paths: in: path required: true type: string + /user_tours/discussion_tours/{tour_id}/: + get: + operationId: user_tours_discussion_tours_read + description: Return a list of all tours in the database. + parameters: [] + responses: + '200': + description: '' + tags: + - user_tours + put: + operationId: user_tours_discussion_tours_update + description: Update an existing tour with the data in the request body. + parameters: [] + responses: + '200': + description: '' + tags: + - user_tours + parameters: + - name: tour_id + in: path + required: true + type: string + /user_tours/v1/{username}: + get: + operationId: user_tours_v1_read + summary: Retrieve the User Tour for the given username. + description: |- + Allows staff users to retrieve any user's User Tour. + + Returns + 200 with the following fields: + course_home_tour_status (str): one of UserTour.CourseHomeChoices + show_courseware_tour (bool): indicates if courseware tour should be shown. + + 400 if there is a not allowed request (requesting a user you don't have access to) + 401 if unauthorized request + 403 if waffle flag is not enabled + 404 if the UserTour does not exist (shouldn't happen, but safety first) + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/UserTour' + tags: + - user_tours + put: + operationId: user_tours_v1_update + description: Unsupported method. + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/UserTour' + responses: + '200': + description: '' + schema: + $ref: '#/definitions/UserTour' + tags: + - user_tours + patch: + operationId: user_tours_v1_partial_update + summary: Patch the User Tour for the request.user. + description: Supports updating the `course_home_tour_status` and `show_courseware_tour` + fields. + parameters: + - name: data + in: body + required: true + schema: + $ref: '#/definitions/UserTour' + responses: + '200': + description: '' + schema: + $ref: '#/definitions/UserTour' + tags: + - user_tours + parameters: + - name: username + in: path + required: true + type: string /val/v0/videos/: get: operationId: val_v0_videos_list @@ -7168,8 +9417,10 @@ paths: operationId: xblock_v2_xblocks_read summary: Get metadata about the specified block. description: |- - Accepts an "include" query parameter which must be a comma separated list of keys to include. Valid keys are - "index_dictionary" and "student_view_data". + Accepts the following query parameters: + + * "include": a comma-separated list of keys to include. + Valid keys are "index_dictionary" and "student_view_data". parameters: [] responses: '200': @@ -7428,29 +9679,6 @@ definitions: title: Has ended type: string readOnly: true - CourseGoal: - required: - - user - - course_key - type: object - properties: - user: - title: User - type: string - pattern: ^[\w.@+-]+$ - course_key: - title: Course key - type: string - maxLength: 255 - minLength: 1 - goal_key: - title: Goal key - type: string - enum: - - certify - - complete - - explore - - unsure CourseTab: required: - tab_id @@ -7470,17 +9698,21 @@ definitions: readOnly: true CourseHomeMetadata: required: + - celebrations + - course_access - course_id - - username - is_enrolled - is_self_paced - is_staff - number - org - original_user_is_staff + - start - tabs - title - - celebrations + - username + - user_timezone + - can_view_certificate type: object properties: can_show_upgrade_sock: @@ -7491,14 +9723,22 @@ definitions: title: Verified mode type: string readOnly: true + celebrations: + title: Celebrations + type: object + additionalProperties: + type: string + x-nullable: true + course_access: + title: Course access + type: object + additionalProperties: + type: string + x-nullable: true course_id: title: Course id type: string minLength: 1 - username: - title: Username - type: string - minLength: 1 is_enrolled: title: Is enrolled type: boolean @@ -7519,6 +9759,10 @@ definitions: original_user_is_staff: title: Original user is staff type: boolean + start: + title: Start + type: string + format: date-time tabs: type: array items: @@ -7527,12 +9771,17 @@ definitions: title: Title type: string minLength: 1 - celebrations: - title: Celebrations - type: object - additionalProperties: - type: string - x-nullable: true + username: + title: Username + type: string + minLength: 1 + user_timezone: + title: User timezone + type: string + minLength: 1 + can_view_certificate: + title: Can view certificate + type: boolean DateSummary: required: - complete @@ -7614,6 +9863,30 @@ definitions: title: User timezone type: string minLength: 1 + CertificateData: + required: + - cert_status + - cert_web_view_url + - download_url + - certificate_available_date + type: object + properties: + cert_status: + title: Cert status + type: string + minLength: 1 + cert_web_view_url: + title: Cert web view url + type: string + minLength: 1 + download_url: + title: Download url + type: string + minLength: 1 + certificate_available_date: + title: Certificate available date + type: string + format: date-time CourseBlock: type: object properties: @@ -7623,21 +9896,19 @@ definitions: readOnly: true CourseGoals: required: - - goal_options - selected_goal type: object properties: - goal_options: - type: array - items: - type: string - x-nullable: true selected_goal: title: Selected goal type: object additionalProperties: type: string x-nullable: true + weekly_learning_goal_enabled: + title: Weekly learning goal enabled + type: boolean + default: false CourseTool: required: - analytics_id @@ -7705,16 +9976,20 @@ definitions: OutlineTab: required: - access_expiration + - cert_data - course_blocks - course_goals - course_tools - dates_widget - enroll_alert + - enrollment_mode + - enable_proctored_exams - handouts_html - has_ended - offer - resume_course - welcome_message_html + - user_has_passing_grade type: object properties: dates_banner_info: @@ -7735,6 +10010,8 @@ definitions: additionalProperties: type: string x-nullable: true + cert_data: + $ref: '#/definitions/CertificateData' course_blocks: $ref: '#/definitions/CourseBlock' course_goals: @@ -7747,6 +10024,13 @@ definitions: $ref: '#/definitions/DatesWidget' enroll_alert: $ref: '#/definitions/EnrollAlert' + enrollment_mode: + title: Enrollment mode + type: string + minLength: 1 + enable_proctored_exams: + title: Enable proctored exams + type: boolean handouts_html: title: Handouts html type: string @@ -7766,25 +10050,9 @@ definitions: title: Welcome message html type: string minLength: 1 - CertificateData: - required: - - cert_status - - cert_web_view_url - - download_url - type: object - properties: - cert_status: - title: Cert status - type: string - minLength: 1 - cert_web_view_url: - title: Cert web view url - type: string - minLength: 1 - download_url: - title: Download url - type: string - minLength: 1 + user_has_passing_grade: + title: User has passing grade + type: boolean CourseGrade: required: - letter_grade @@ -7802,6 +10070,21 @@ definitions: is_passing: title: Is passing type: boolean + GradingPolicy: + required: + - grade_range + type: object + properties: + assignment_policies: + title: Assignment policies + type: string + readOnly: true + grade_range: + title: Grade range + type: object + additionalProperties: + type: string + x-nullable: true SubsectionScores: required: - assignment_type @@ -7817,6 +10100,10 @@ definitions: title: Assignment type type: string minLength: 1 + block_key: + title: Block key + type: string + readOnly: true display_name: title: Display name type: string @@ -7824,15 +10111,27 @@ definitions: has_graded_assignment: title: Has graded assignment type: boolean + override: + title: Override + type: string + readOnly: true + learner_has_access: + title: Learner has access + type: string + readOnly: true num_points_earned: title: Num points earned - type: integer + type: number num_points_possible: title: Num points possible - type: integer + type: number percent_graded: title: Percent graded type: number + problem_scores: + title: Problem scores + type: string + readOnly: true show_correctness: title: Show correctness type: string @@ -7859,21 +10158,6 @@ definitions: type: array items: $ref: '#/definitions/SubsectionScores' - GradingPolicy: - required: - - grade_range - type: object - properties: - assignment_policies: - title: Assignment policies - type: string - readOnly: true - grade_range: - title: Grade range - type: object - additionalProperties: - type: string - x-nullable: true VerificationData: required: - link @@ -7896,16 +10180,19 @@ definitions: format: date-time ProgressTab: required: + - access_expiration - certificate_data - completion_summary - course_grade + - credit_course_requirements - end - - user_has_passing_grade - - has_scheduled_content - - section_scores - enrollment_mode - grading_policy + - has_scheduled_content + - section_scores - studio_url + - username + - user_has_passing_grade - verification_data type: object properties: @@ -7917,6 +10204,12 @@ definitions: title: Verified mode type: string readOnly: true + access_expiration: + title: Access expiration + type: object + additionalProperties: + type: string + x-nullable: true certificate_data: $ref: '#/definitions/CertificateData' completion_summary: @@ -7927,13 +10220,22 @@ definitions: x-nullable: true course_grade: $ref: '#/definitions/CourseGrade' + credit_course_requirements: + title: Credit course requirements + type: object + additionalProperties: + type: string + x-nullable: true end: title: End type: string format: date-time - user_has_passing_grade: - title: User has passing grade - type: boolean + enrollment_mode: + title: Enrollment mode + type: string + minLength: 1 + grading_policy: + $ref: '#/definitions/GradingPolicy' has_scheduled_content: title: Has scheduled content type: boolean @@ -7941,18 +10243,78 @@ definitions: type: array items: $ref: '#/definitions/SectionScores' - enrollment_mode: - title: Enrollment mode - type: string - minLength: 1 - grading_policy: - $ref: '#/definitions/GradingPolicy' studio_url: title: Studio url type: string minLength: 1 + username: + title: Username + type: string + minLength: 1 + user_has_passing_grade: + title: User has passing grade + type: boolean verification_data: $ref: '#/definitions/VerificationData' + Lti: + required: + - lti_config + type: object + properties: + lti_1p1_client_key: + title: Lti 1p1 client key + description: Client key provided by the LTI tool provider. + type: string + maxLength: 255 + lti_1p1_client_secret: + title: Lti 1p1 client secret + description: Client secret provided by the LTI tool provider. + type: string + maxLength: 255 + lti_1p1_launch_url: + title: Lti 1p1 launch url + description: The URL of the external tool that initiates the launch. + type: string + maxLength: 255 + version: + title: Version + type: string + enum: + - lti_1p1 + - lti_1p3 + lti_config: + title: Lti config + type: object + CourseLiveConfiguration: + required: + - provider_type + type: object + properties: + course_key: + title: Course key + type: string + readOnly: true + minLength: 1 + provider_type: + title: LTI provider + description: The LTI provider's id + type: string + maxLength: 50 + minLength: 1 + enabled: + title: Enabled + description: If disabled, the LTI in the associated course will be disabled. + type: boolean + lti_configuration: + $ref: '#/definitions/Lti' + pii_sharing_allowed: + title: Pii sharing allowed + type: string + readOnly: true + free_tier: + title: Free tier + description: True, if LTI credential are provided by Org globally + type: boolean course_modes.CourseMode: required: - course_id @@ -8328,6 +10690,259 @@ definitions: format: uri maxLength: 255 minLength: 1 + BlackoutDate: + required: + - start + - end + type: object + properties: + start: + title: Start + description: The ISO 8601 timestamp for the start of the blackout period + type: string + format: date-time + end: + title: End + description: The ISO 8601 timestamp for the end of the blackout period + type: string + format: date-time + ReasonCodeSeralizer: + required: + - code + - label + type: object + properties: + code: + title: Code + description: A code for the an edit or close reason + type: string + minLength: 1 + label: + title: Label + description: A user-friendly name text for the close or edit reason + type: string + minLength: 1 + CourseMetadataSerailizer: + required: + - id + - blackouts + - thread_list_url + - following_thread_list_url + - topics_url + - allow_anonymous + - allow_anonymous_to_peers + - user_roles + - user_is_privileged + - provider + - enable_in_context + - group_at_subsection + - post_close_reasons + - edit_reasons + type: object + properties: + id: + title: Id + description: The identifier of the course + type: string + blackouts: + description: A list of objects representing blackout periods (during which + discussions are read-only except for privileged users). + type: array + items: + $ref: '#/definitions/BlackoutDate' + thread_list_url: + title: Thread list url + description: The URL of the list of all threads in the course. + type: string + format: uri + minLength: 1 + following_thread_list_url: + title: Following thread list url + description: thread_list_url with parameter following=True + type: string + format: uri + minLength: 1 + topics_url: + title: Topics url + description: The URL of the topic listing for the course. + type: string + format: uri + minLength: 1 + allow_anonymous: + title: Allow anonymous + description: A boolean indicating whether anonymous posts are allowed or not. + type: boolean + allow_anonymous_to_peers: + title: Allow anonymous to peers + description: A boolean indicating whether posts anonymous to peers are allowed + or not. + type: boolean + user_roles: + description: A list of all the roles the requesting user has for this course. + type: array + items: + type: string + minLength: 1 + user_is_privileged: + title: User is privileged + description: A boolean indicating if the current user has a privileged role + type: boolean + provider: + title: Provider + description: The discussion provider used by this course + type: string + minLength: 1 + enable_in_context: + title: Enable in context + description: A boolean indicating whether in-context discussion is enabled + for the course + type: boolean + group_at_subsection: + title: Group at subsection + description: A boolean indicating whether discussions should be grouped at + subsection + type: boolean + post_close_reasons: + description: A list of reasons that can be specified by moderators for closing + a post + type: array + items: + $ref: '#/definitions/ReasonCodeSeralizer' + edit_reasons: + description: A list of reasons that can be specified by moderators for editing + a post, response, or comment + type: array + items: + $ref: '#/definitions/ReasonCodeSeralizer' + DiscussionTopicSerializerV2: + type: object + properties: + id: + title: Id + description: Provider-specific unique id for the topic + type: string + readOnly: true + minLength: 1 + usage_key: + title: Usage key + description: Usage context for the topic + type: string + readOnly: true + minLength: 1 + name: + title: Name + description: Topic name + type: string + readOnly: true + minLength: 1 + thread_counts: + title: Thread counts + description: Mapping of thread counts by type of thread + type: string + readOnly: true + enabled_in_context: + title: Enabled in context + description: Whether this topic is enabled in its context + type: boolean + readOnly: true + VerifiedName: + required: + - username + - verified_name + - profile_name + type: object + properties: + id: + title: ID + type: integer + readOnly: true + created: + title: Created + type: string + format: date-time + readOnly: true + username: + title: Username + type: string + minLength: 1 + verified_name: + title: Verified name + type: string + minLength: 1 + profile_name: + title: Profile name + type: string + minLength: 1 + verification_attempt_id: + title: Verification attempt id + type: integer + x-nullable: true + proctored_exam_attempt_id: + title: Proctored exam attempt id + type: integer + x-nullable: true + status: + title: Status + type: string + minLength: 1 + x-nullable: true + UpdateVerifiedName: + required: + - username + - status + type: object + properties: + id: + title: ID + type: integer + readOnly: true + created: + title: Created + type: string + format: date-time + readOnly: true + username: + title: Username + type: string + minLength: 1 + verified_name: + title: Verified name + type: string + minLength: 1 + profile_name: + title: Profile name + type: string + minLength: 1 + verification_attempt_id: + title: Verification attempt id + type: integer + x-nullable: true + proctored_exam_attempt_id: + title: Proctored exam attempt id + type: integer + x-nullable: true + status: + title: Status + type: string + minLength: 1 + VerifiedNameConfig: + required: + - username + type: object + properties: + change_date: + title: Change date + type: string + format: date-time + readOnly: true + username: + title: Username + type: string + minLength: 1 + use_verified_name_for_certs: + title: Use verified name for certs + type: boolean + x-nullable: true CourseEnrollmentsApiList: required: - course_id @@ -8675,6 +11290,34 @@ definitions: type: array items: $ref: '#/definitions/InstructorTask' + ScheduledBulkEmail: + required: + - task + - task_due + type: object + properties: + id: + title: ID + type: integer + readOnly: true + course_email: + title: Course email + type: string + readOnly: true + task: + title: Task + type: integer + task_due: + title: Task due + type: string + format: date-time + LearnerPathwayProgress: + type: object + properties: + learner_pathway_progress: + title: Learner pathway progress + type: string + readOnly: true LtiAgsLineItem: required: - resourceId @@ -8771,6 +11414,10 @@ definitions: title: Certificate type: string readOnly: true + course_modes: + title: Course modes + type: string + readOnly: true Organization: required: - name @@ -9062,6 +11709,19 @@ definitions: type: string format: uri readOnly: true + UserTour: + type: object + properties: + course_home_tour_status: + title: Course home tour status + type: string + enum: + - show-existing-user-tour + - show-new-user-tour + - no-tour + show_courseware_tour: + title: Show courseware tour + type: boolean EncodedVideo: required: - url diff --git a/docs/technical/conf.py b/docs/technical/conf.py index c9186dbdf4..afa3bdefee 100644 --- a/docs/technical/conf.py +++ b/docs/technical/conf.py @@ -2,15 +2,15 @@ Configuration file for the generation of technical documentation. """ import os +from datetime import datetime -import edx_theme import git # -- Project information ----------------------------------------------------- project = "edx-platform Technical Reference" -copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin -author = edx_theme.AUTHOR +copyright = f'{datetime.now().year}, Axim Collaborative, Inc' # pylint: disable=redefined-builtin +author = 'Axim Collaborative, Inc' release = "" # -- General configuration --------------------------------------------------- @@ -38,6 +38,39 @@ settings_repo_version = edx_platform_version # -- Options for HTML output ------------------------------------------------- -html_theme = "edx_theme" -html_theme_path = [edx_theme.get_html_theme_path()] +html_theme = 'sphinx_book_theme' html_static_path = ["_static"] +html_favicon = "https://logos.openedx.org/open-edx-favicon.ico" +html_logo = "https://logos.openedx.org/open-edx-logo-color.png" + +html_theme_options = { + "repository_url": "https://github.com/openedx/edx-platform", + "repository_branch": "master", + "path_to_docs": "docs/technical", + "home_page_in_toc": True, + "use_repository_button": True, + "use_issues_button": True, + "use_edit_page_button": True, + # Please don't change unless you know what you're doing. + "extra_footer": """ + + Creative Commons License + +
+ These works by + Axim Collaborative, Inc + are licensed under a + Creative Commons Attribution-ShareAlike 4.0 International License. + """ +} diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index a9878ac2ec..78578a41d8 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -2,7 +2,6 @@ # In edx-lint, until the pyjwt constraint in edx-lint has been removed. # See BOM-2721 for more details. # Below is the copied and edited version of common_constraints - # A central location for most common version constraints # (across edx repos) for pip-installation. # diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 582cdd27b3..65d51abd79 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -358,6 +358,7 @@ django-splash==1.2.1 django-statici18n==2.3.1 # via # -r requirements/edx/base.in + # lti-consumer-xblock # xblock-drag-and-drop-v2 django-storages==1.8 # via diff --git a/requirements/edx/doc.in b/requirements/edx/doc.in index 1f0715f0bf..bd0f4f9fc5 100644 --- a/requirements/edx/doc.in +++ b/requirements/edx/doc.in @@ -2,6 +2,6 @@ -c ../constraints.txt code-annotations # provides annotations for certain documentation -edx_sphinx_theme # edX theme for Sphinx output +sphinx-book-theme # Common theme for all Open edX projects gitpython # fetch git repo information Sphinx # Documentation builder diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 7f642d4e1f..4553a02101 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -4,12 +4,17 @@ # # make upgrade # +accessible-pygments==0.0.4 + # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx babel==2.11.0 # via # -c requirements/edx/../constraints.txt + # pydata-sphinx-theme # sphinx +beautifulsoup4==4.12.2 + # via pydata-sphinx-theme certifi==2022.12.7 # via requests charset-normalizer==2.0.12 @@ -23,9 +28,9 @@ click==8.1.3 code-annotations==1.3.0 # via -r requirements/edx/doc.in docutils==0.19 - # via sphinx -edx-sphinx-theme==3.1.0 - # via -r requirements/edx/doc.in + # via + # pydata-sphinx-theme + # sphinx gitdb==4.0.10 # via gitpython gitpython==3.1.31 @@ -43,11 +48,18 @@ jinja2==3.1.2 markupsafe==2.1.2 # via jinja2 packaging==23.1 - # via sphinx + # via + # pydata-sphinx-theme + # sphinx pbr==5.11.1 # via stevedore +pydata-sphinx-theme==0.13.3 + # via sphinx-book-theme pygments==2.15.1 - # via sphinx + # via + # accessible-pygments + # pydata-sphinx-theme + # sphinx python-slugify==8.0.1 # via code-annotations pytz==2022.7.1 @@ -58,17 +70,20 @@ pyyaml==6.0 # via code-annotations requests==2.28.2 # via sphinx -six==1.16.0 - # via edx-sphinx-theme smmap==5.0.0 # via gitdb snowballstemmer==2.2.0 # via sphinx +soupsieve==2.4.1 + # via beautifulsoup4 sphinx==5.3.0 # via # -c requirements/edx/../common_constraints.txt # -r requirements/edx/doc.in - # edx-sphinx-theme + # pydata-sphinx-theme + # sphinx-book-theme +sphinx-book-theme==1.0.1 + # via -r requirements/edx/doc.in sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -85,6 +100,8 @@ stevedore==5.0.0 # via code-annotations text-unidecode==1.3 # via python-slugify +typing-extensions==4.5.0 + # via pydata-sphinx-theme urllib3==1.26.15 # via requests zipp==3.15.0 diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 5faf63855d..0dd60c79d2 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -449,6 +449,7 @@ django-splash==1.2.1 django-statici18n==2.3.1 # via # -r requirements/edx/base.txt + # lti-consumer-xblock # xblock-drag-and-drop-v2 django-storages==1.8 # via