-
Notifications
You must be signed in to change notification settings - Fork 4
feat: CourseOutlineView can return audit preview info #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-ulmo
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds audit preview functionality to the learning sequence course outline endpoint, allowing audit learners to see (but not access) verified-only content when the feature is enabled. The implementation leverages existing preview logic by passing the preview_verified_content flag through the API chain.
- Adds
preview_verified_contentparameter toget_user_course_outline_detailsfunction - Updates the view to check if audit preview is enabled via
learner_can_preview_verified_contenttoggle - Includes
previewablefield in sequence serialization to indicate which sequences are previewable
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| openedx/core/djangoapps/content/learning_sequences/views.py | Imports the audit preview toggle function, passes preview flag to API, and adds previewable field to sequence representation |
| openedx/core/djangoapps/content/learning_sequences/api/outlines.py | Adds preview_verified_content parameter to get_user_course_outline_details and passes it through to the helper function |
| openedx/core/djangoapps/content/learning_sequences/tests/test_views.py | Adds comprehensive test suite for audit preview feature with test cases covering verified students, audit students with preview enabled, and audit students with preview disabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
openedx/core/djangoapps/content/learning_sequences/tests/test_views.py
Outdated
Show resolved
Hide resolved
openedx/core/djangoapps/content/learning_sequences/tests/test_views.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add functionality for the learning sequence course outline endpoint to be able to return audit preview information, which can be done by simply checking the existing helper function and passing it through
get_user_course_outline_detailsto_get_user_course_outline_and_processors