Skip to content

Instructor Dashboard - Bulk email tab URL uses wrong MFE host and path in instructor dashboard v2 API #38017

@brianjbuck-wgu

Description

@brianjbuck-wgu

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

  1. Call GET /api/instructor/v2/courses/{course_id} as a staff user for a course with bulk email enabled.
  2. Inspect the tabs array in the response.
  3. The bulk_email tab url points to the instructor MFE instead of the communications MFE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions