fix: use COMMUNICATIONS_MICROFRONTEND_URL for bulk_email tab in instuctor dashboard v2 API (#38017)#38018
Conversation
|
Thanks for the pull request, @brianjbuck-wgu! This repository is currently maintained by 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 approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
Tested bulk email url on instructor tabs PR on my local and works as expected, thanks! 👍 |
|
Pls link on PR description corresponding GH issue (: |
4d463c6 to
fb3a78d
Compare
There was a problem hiding this comment.
Pull request overview
Fixes the Instructor Dashboard v2 API bulk_email tab URL to point to the Communications MFE instead of the Instructor MFE.
Changes:
- Build the
bulk_emailtab URL fromCOMMUNICATIONS_MICROFRONTEND_URLusing a/courses/{course_key}/bulk_emailpath. - Define a default
COMMUNICATIONS_MICROFRONTEND_URL = Noneinlms/envs/common.pyto avoid missing-setting errors in some environments. - Add a regression test asserting the bulk_email tab URL uses the Communications MFE setting.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lms/envs/common.py | Adds a base default for COMMUNICATIONS_MICROFRONTEND_URL with settings docs. |
| lms/djangoapps/instructor/views/serializers_v2.py | Switches bulk_email tab URL construction to use COMMUNICATIONS_MICROFRONTEND_URL and /courses/ path. |
| lms/djangoapps/instructor/tests/test_api_v2.py | Adds a test to validate bulk_email tab URL uses the communications setting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…uctor dashboard v2 API (openedx#38017)
fb3a78d to
0ec4ee1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0ec4ee1 to
ac3f713
Compare
|
re tested it, bulk email url works correctly 👍 |
Description
Fixes a bug in the v2 instructor dashboard API (/api/instructor/v2/courses/{course_id}) where the bulk_email tab URL incorrectly pointed to the Instructor MFE instead of the Communications MFE.
Before:
http://apps.local.openedx.io:8081/instructor/course-v1:OpenEdX+DemoX+DemoCourse/bulk_email
After:
http://apps.local.openedx.io:1984/communications/courses/course-v1:OpenEdX+DemoX+DemoCourse/bulk_email
Changes:
get_tabs()in serializers_v2.py to construct thebulk_emailtab URL usingCOMMUNICATIONS_MICROFRONTEND_URLwith the /courses/ path pattern, consistent with the existing behavior in instructor_dashboard.pyCOMMUNICATIONS_MICROFRONTEND_URL = Noneas a base default in lms/envs/common.py (previously only defined in environment-specific configs, which would cause AttributeError in test environments)Impacts: Operators (must have
COMMUNICATIONS_MICROFRONTEND_URLconfigured) and Course Authors/Staff using the Instructor Dashboard v2 API.Supporting information
Fixes: #38017
Testing instructions
COMMUNICATIONS_MICROFRONTEND_URLin your environment (e.g., http://localhost:1984/communications){COMMUNICATIONS_MICROFRONTEND_URL}/courses/{course_id}/bulk_emailDeadline
None
Other information
No migrations required. No breaking changes — this is a bug fix for a v2 URL that has not been released.