-
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: support unit preview in learning MFE #35747
feat: support unit preview in learning MFE #35747
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.
Visual review looks good, haven't gotten to test locally though.
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. |
url_parts = list(urlparse(settings.LEARNING_MICROFRONTEND_URL)) | ||
url_parts[2] = mfe_link | ||
url_parts[4] = query_string | ||
|
||
return urlunparse(url_parts) |
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.
@KristinAoki This code assumes that the Learning MFE is hosted at the root of a domain, which is true for edx.org but not true for anyone who deploys Tutor. It breaks all jump_to
links in Tutor, by sending them to:
/course/{course_key}/...
and/preview/course/{course_key}/...
instead of:
/learning/course/{course_key}/...
and/learning/preview/course/{course_key}/...
Could you modify this so that it works regardless of which path the Learning MFE is based on?
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 am assuming that the issue is the url builder , so I will revert back to the string builder for the returned path.
Description
This PR re-implements #35687 and fixes the bug where units were erroring when the user. Additionally, this PR add support to fetch the draft branch for the sequence metadata API.
Supporting information
See PR #35687 for more information
Testing instructions
Repeat steps above when masquerading as a verified learner and audit learner. Confirm that the preview is displayed as expected for each track.
Deadline
None