-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat: expose hide_from_toc
field in course blocks
#33955
feat: expose hide_from_toc
field in course blocks
#33955
Conversation
Thanks for the pull request, @BryanttV! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
hide_from_toc
field in course blockshide_from_toc
field in course blocks
60f9b79
to
3a0ef1d
Compare
3a0ef1d
to
a3c8e7d
Compare
a3c8e7d
to
247909b
Compare
@@ -115,6 +115,7 @@ def recurse_mark_auth_denial(block): | |||
'completion', | |||
'complete', | |||
'resume_block', | |||
'hide_from_toc', |
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.
why is this change necessary?
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.
If the field is not added to the requested_fields
list, the field is returned null
247909b
to
7fb8abb
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.
I tested this in my local environment, and it's working as you described in the cover letter! Thank you.
@BryanttV 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
Description
This PR exposes the
hide_from_toc
field for course blocks (sections, sequences...) so it's visible as part of the course metadata.This change is made to show instructors a message in the course outline for the hidden sections and their children. However, it can be used by any other client to obtain content visibility information.
Supporting information
These changes are part of the effort made to implement Feature Enhancement Proposal: Hide Sections from Course Outline
What Changed?
/api/course_home/outline/{course-id}
This endpoint was updated to return the
hide_from_toc
field in the blocks of the course. The following is an example of the response:Testing instructions
Move into this branch
Create your course with sections and subsections.
Using CURL you can test the endpoint. Replace the value of the variables with your values as appropriate:
Another option is to go to the course outline in the URL:
{mfe-domain}/learning/course/{course-id}/home
. Right-click > Inspect > Network. Select the endpoint request and review the response.In all course blocks the
hide_from_toc
field should be set tofalse
Deadline
This effort is part of the Spanish consortium project, so it'd be ideal to merge this before the end of the project.