Skip to content
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: add share link button when hide from toc is enabled in sections #34043

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

BryanttV
Copy link
Contributor

@BryanttV BryanttV commented Jan 12, 2024

Description

This PR adds a new button in the child subsections of sections with Hide From TOC enabled. This button displays a new modal with two tabs. The first tab displays a button that allows you to copy the link of that subsection to the clipboard. The second tab displays a button that allows you to copy the embedded link of the same subsection to the clipboard.

In this way, instructors will be able to pass the link to their students so that they can access the subsections that are hidden from the interface.

Supporting information

These changes are part of the effort made to implement Feature Enhancement Proposal: Hide Sections from Course Outline

Dependencies

Important

This PR needs the changes made from this PR, which includes the new section visibility option from Studio UI.

Testing instructions

  1. In your environment add a mount of edx-platform with tutor mounts add <path/to/edx-platform>
  2. Move into this branch with git checkout bav/add-share-link-button
  3. Get the changes from this PR with git rebase MJG/configurable-hide-from-toc and resolves conflicts by accepting both changes.
  4. Add this setting in your environment: FEATURES["ENABLE_HIDE_FROM_TOC_UI"] = True
  5. Run tutor dev exec lms openedx-assets build --env=dev to regenerate the assets.
  6. Create your course with sections and subsections.
  7. In the section settings (⚙️) go to the Visibility tab > ☑️ Hide in Course Outline, accessible via Link
  8. Now, you should see a button to share the link in the child subsections of that section.
  9. Press the button and see the new modal.
  10. Navigate between the tabs and copy the subsection link, either full page or embedded.
hft-share-link-demo.mp4

Deadline

This effort is part of the Spanish consortium project, so it'd be ideal to merge this before the end of the project.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 12, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Jan 12, 2024

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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@BryanttV BryanttV force-pushed the bav/add-share-link-button branch 4 times, most recently from 35b6496 to ffeb351 Compare January 12, 2024 17:24
@BryanttV BryanttV force-pushed the bav/add-share-link-button branch 3 times, most recently from 0d8ee55 to a2c07c2 Compare January 15, 2024 13:48
mariajgrimaldi
mariajgrimaldi previously approved these changes Jan 15, 2024
Copy link
Member

@mariajgrimaldi mariajgrimaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working as expected! Thank you.

You have to address one last comment I left. Thanks again!

@mariajgrimaldi mariajgrimaldi dismissed their stale review January 15, 2024 14:17

This PR is still a WIP

@BryanttV BryanttV force-pushed the bav/add-share-link-button branch from 855a2db to bb606e6 Compare January 15, 2024 16:00
@BryanttV BryanttV marked this pull request as ready for review January 15, 2024 16:02
@BryanttV BryanttV force-pushed the bav/add-share-link-button branch 3 times, most recently from c64f1be to ed0e707 Compare January 16, 2024 14:17
@BryanttV BryanttV force-pushed the bav/add-share-link-button branch 4 times, most recently from 967fde4 to 9a97386 Compare February 14, 2024 17:33
@BryanttV BryanttV force-pushed the bav/add-share-link-button branch 5 times, most recently from fb794a4 to 3203030 Compare February 14, 2024 20:55
render: function() {
var xblockInfo = this.model;
var isTimeLimited = xblockInfo.get('is_time_limited');
var isProctoredExam = xblockInfo.get('is_proctored_exam');
var isPracticeExam = xblockInfo.get('is_practice_exam');
var isOnboardingExam = xblockInfo.get('is_onboarding_exam');
var enableHideFromTOCUI = xblockInfo.get('enable_hide_from_toc_ui');
Copy link

@johnvente johnvente Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be better with isEnableHideFromTOCUI but I understand you will have to change enable_hide_from_toc_ui to is_enable_hide_from_toc_ui so is just a minor suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this field was included in the dependency PR. I'll leave the name as it is so as not to affect any other PR related to the functionality.

Copy link
Member

@mariajgrimaldi mariajgrimaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working as it was described in the cover letter. Thank you! I'll approve this PR, although it's blocked by #33952

Also, remember to address @johnvente's comments! Thank you

@BryanttV
Copy link
Contributor Author

Hi @johnvente, I addressed your comments, can you check again? thanks!

Copy link

@johnvente johnvente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@itsjeyd itsjeyd added the product review PR requires product review before merging label Feb 16, 2024
@itsjeyd itsjeyd added the product review complete PR has gone through product review label Feb 23, 2024
BryanttV added 2 commits March 1, 2024 11:42
Adds a new button in the child subsections of sections with Hide From TOC enabled.
This button displays a new modal with two tabs. The first tab displays a button
that allows you to copy the link of that subsection to the clipboard. The second
tab displays a button that allows you to copy the embedded link of the same
subsection to the clipboard.

Ref: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
@BryanttV BryanttV force-pushed the bav/add-share-link-button branch from 3203030 to 1742431 Compare March 1, 2024 16:43
@mariajgrimaldi mariajgrimaldi merged commit 19bc5c8 into openedx:master Mar 7, 2024
47 checks passed
@openedx-webhooks
Copy link

@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.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U product review complete PR has gone through product review product review PR requires product review before merging
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants