-
Notifications
You must be signed in to change notification settings - Fork 2
feat: audit preview of verified content in course outline #42
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
Conversation
…preview of verified content This is, specifically, when all 3 of the critera are met: 1. The feature flag is enabled for the course. 2. The requesting user is enrolled as audit. 3. The course has a verified track.
…it content as previewable Adds new previewable_sequences to UserCourseOutlineData
b41d93f to
e2c95be
Compare
Return early for any disqualifying check instead of chekcing all values first
6fbef02 to
ca0f6c1
Compare
The linters don't like core openedx code talking to LMS/CMS code. This keeps the toggle in LMS but passes the toggle value via kwargs to the functions that use them.
6a9c6cb to
efc774a
Compare
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 introduces a feature that allows audit learners to preview the structure of verified-only content in course outlines, controlled by the course_home.audit_learner_verified_preview waffle flag. When enabled, audit learners can see that verified content exists (marked with is_preview: true) without being able to access it.
Key changes:
- Added feature flag logic to determine when audit learners can preview verified content
- Modified the learning sequences API to collect and mark previewable content instead of removing it
- Updated the course home outline view to set
is_previewmarkers on applicable blocks
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
lms/djangoapps/course_home_api/toggles.py |
Added waffle flag and helper functions to check if audit learners can preview verified content |
lms/djangoapps/course_home_api/tests/test_toggles.py |
Added comprehensive unit tests for the preview eligibility logic |
openedx/core/djangoapps/content/learning_sequences/data.py |
Added previewable_sequences field to UserCourseOutlineData |
openedx/core/djangoapps/content/learning_sequences/api/outlines.py |
Modified outline processing to collect previewable content when feature is enabled |
openedx/core/djangoapps/content/learning_sequences/services.py |
Added preview_verified_content parameter to service interface |
openedx/core/djangoapps/content/learning_sequences/api/tests/test_outlines.py |
Added tests for preview functionality with verified and audit users |
lms/djangoapps/course_home_api/outline/views.py |
Added logic to mark previewable blocks with is_preview flag in API response |
lms/djangoapps/course_home_api/outline/tests/test_view.py |
Added integration tests for the preview feature in the outline view |
lms/djangoapps/course_home_api/outline/serializers.py |
Added is_preview field to block serialization with False default |
openedx/features/course_experience/utils.py |
Updated comments to correctly describe function behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
openedx/core/djangoapps/content/learning_sequences/api/outlines.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 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
jansenk
left a comment
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.
lgtm
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 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
Replaces openedx#37616, which I have now closed |
Description
Where enabled, previews the presence of verified content to audit learners.
To-do list
Exams details(update to toggles removes this)Schedule details(update to toggles removes this)Deferred
Supporting information
Enable the feature by setting the Course Waffle flag
course_home.audit_learner_verified_previewtoEnabled.Once enabled, this checks for the checks that both the user is Audit and the course has a Verified track. Where this is the case it will no longer remove Verified content from the outline, instead marking blocks that are Verified-only with the
is_previewfield astrueTrimmed API as example:
GET https://{lms}/api/course_home/outline/{course-id} HTTP/1.1
{ "course_blocks": { "blocks": { "block-v1:{course-id}+type@sequential+block@{block-id}": { "display_name": "Sequence limited to Verified Track", "children": [ ], "type": "sequential", "is_preview": true }, "block-v1:{course-id}+type@sequential+block@{block-id}": { "display_name": "Sequence available to Audit", "children": [ ], "type": "sequential", "is_preview": false } } } }Testing instructions
a. Verified and enrollment tracks
b. Sequences that are restricted to certain enrollment groups.
c.
course_home.audit_learner_verified_previewwaffle flag enabled.