Open
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Made-with: Cursor
bb9c3d9 to
4f6b9f1
Compare
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
https://github.com/mitodl/hq/issues/10460
Description (What does it do?)
This PR adds a new Open edX LMS plugin: ol_openedx_course_outline_api.
Exposes a new endpoint: GET /api/course-outline/v0/<course_id>/
Returns a course outline summary per chapter (module id/title), including:
Effort estimation fields (effort_time, effort_activities) from the platform Effort Estimation transformer via the Blocks API
Content counts under each chapter: videos, readings (html), problems, assignments (graded or formatted sequentials), and “app_items” (other leaf blocks)
Excludes staff-only content and content hidden from TOC
Adds 24h caching for the full JSON response with a versioned cache key that also changes when course.course_version changes (so publishing effectively invalidates the cache)
Screenshots (if appropriate):
How can this be tested?
Prereq: Install/enable the plugin in LMS (per repo plugin install guide), restart LMS.
tutor dev exec lms bashpip install -e /openedx/src/open-edx-plugins/src/ol_openedx_course_outline_apiManual verification
As a staff user, request:
GET http://local.openedx.io:8000/api/course-outline/v0/<course_id>/
Example course id: course-v1:edX+DemoX+Demo_Course