feat: CourseOutlineView can return audit preview info#79
feat: CourseOutlineView can return audit preview info#79jansenk wants to merge 6 commits intorelease-ulmofrom
Conversation
There was a problem hiding this comment.
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.
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