Skip to content

fix: return relative path from get_proctored_exam_settings_url to prevent double /authoring prefix in MFE sidebar#38652

Open
Anas12091101 wants to merge 1 commit into
openedx:masterfrom
mitodl:anas/fix-proctoring-url
Open

fix: return relative path from get_proctored_exam_settings_url to prevent double /authoring prefix in MFE sidebar#38652
Anas12091101 wants to merge 1 commit into
openedx:masterfrom
mitodl:anas/fix-proctoring-url

Conversation

@Anas12091101
Copy link
Copy Markdown
Contributor

@Anas12091101 Anas12091101 commented May 18, 2026

Description

The "Proctored exam settings" sidebar link generates a double /authoring/authoring/ prefix on deployments where COURSE_AUTHORING_MICROFRONTEND_URL includes the /authoring path (same-origin setup).

Root Cause

Frontend commit f9ef00e2 (PR #1372, Nov 2024) changed HelpSidebarLink to use React Router <Link> by default (isNewPage=true).

When the backend returns a path like /authoring/course/.../proctoring/settings, React Router prepends its basename (/authoring) → resulting in /authoring/authoring/course/....

The proctored exam link in HelpSidebar.tsx was never updated to account for this change.

Screenshot 2026-05-18 at 3 29 15 PM

Fix

Return a relative path (/course/{id}/pages-and-resources/proctoring/settings) from get_proctored_exam_settings_url without the MFE base URL prefix. This is consistent with how all other sidebar links are constructed client-side. React Router correctly resolves basename + path = /authoring/course/{id}/....

Useful information to include:

  • Which edX user roles will this change impact? Course Author

  • Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).

  • Provide links to the description of corresponding configuration changes. Remember to correctly annotate these
    changes.

Supporting information

https://github.com/mitodl/hq/issues/11294

Testing instructions

  1. Navigate to the course outline pages in the authoring MFE on a same-origin deployment
  2. In the right sidebar, click Settings, hover over the "Proctored exam settings" link
  3. Verify the URL in the browser status bar shows /authoring/course/{course_id}/pages-and-resources/proctoring/settings (single /authoring prefix, not double /authoring/authoring/)
  4. Click the link and verify it navigates correctly to the proctoring settings page

Note: This bug only manifests on same-origin deployments where the MFE is served under /authoring on the same domain as CMS. It does not reproduce on setups where the MFE runs on a different port/domain (e.g. local dev with Tutor).

Note: This bug only manifests when COURSE_AUTHORING_MICROFRONTEND_URL is configured as a relative path (e.g., /authoring) rather than a complete URL (e.g., https://studio.example.com/authoring). When set to a complete URL, React Router's <Link> component treats it as an external link and doesn't prepend the basename, so the double prefix doesn't occur. Setting the full URL in site configurations is a workaround, but this fix ensures the link works correctly regardless of how the setting is configured.

Want me to adjust the wording?

Deadline

"None"

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • If your database migration can't be rolled back easily.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 18, 2026
@openedx-webhooks
Copy link
Copy Markdown

Thanks for the pull request, @Anas12091101!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@Anas12091101 Anas12091101 force-pushed the anas/fix-proctoring-url branch from b5a9aef to 6cdf9d6 Compare May 18, 2026 10:33
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

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants