-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Description
The v2 instructor dashboard API (/api/instructor/v2/courses/{course_id}) returns an incorrect URL for the bulk_email tab. It currently uses INSTRUCTOR_MICROFRONTEND_URL with the path /instructor/{course_key}/bulk_email, but bulk email is served by a separate Communications MFE.
Current (incorrect)
http://apps.local.openedx.io:8081/instructor/course-v1:OpenEdX+DemoX+DemoCourse/bulk_email
Expected
http://apps.local.openedx.io:1984/communications/courses/course-v1:OpenEdX+DemoX+DemoCourse/bulk_email
Fix
In lms/djangoapps/instructor/views/serializers_v2.py, line 142, the bulk email tab URL is built using mfe_base_url (which is INSTRUCTOR_MICROFRONTEND_URL) and the /instructor/ path pattern:
'url': f'{mfe_base_url}/instructor/{str(course_key)}/bulk_email'It should instead use COMMUNICATIONS_MICROFRONTEND_URL (default port 1984 in devstack) with the /communications/courses/ path pattern:
'url': f'{communications_mfe_url}/communications/courses/{str(course_key)}/bulk_email'Steps to Reproduce
- Call
GET/api/instructor/v2/courses/{course_id}as a staff user for a course with bulk email enabled. - Inspect the tabs array in the response.
- The
bulk_emailtab url points to the instructor MFE instead of the communications MFE.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status