Skip to content

fix: show name and description for legacy course roles listed in assignments - #200

Open
dcoa wants to merge 2 commits into
openedx:masterfrom
eduNEXT:dcoa/list-unsupported-course-roles
Open

fix: show name and description for legacy course roles listed in assignments#200
dcoa wants to merge 2 commits into
openedx:masterfrom
eduNEXT:dcoa/list-unsupported-course-roles

Conversation

@dcoa

@dcoa dcoa commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Description

Course assignments can include roles that exist in openedx-authz but haven't been migrated to the permissions model yet: course_limited_staff, course_data_researcher, course_beta_tester and ccx_coach. They reach the admin console through assignments made elsewhere (legacy Instructor Dashboard, course-authoring migration), and the console had no metadata for them, so they rendered as blank rows:

  • The Role column fell back to '' because the key wasn't in MAP_ROLE_KEY_TO_LABEL, leaving the assignment unnamed.
  • Expanding View all permissions returned null, so the panel opened empty.

This adds the missing metadata and renders it.

image image

How to test

  1. Assign one of the four roles to a user from the legacy Instructor Dashboard (or seed it directly).
  2. Open the admin console user/course assignments table.
  3. The Role column shows the role name (e.g. "Course Limited Staff") instead of an empty cell.
  4. Expand View all permissions — the panel shows the role description instead of rendering empty.

Related information

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jul 29, 2026
@openedx-webhooks

openedx-webhooks commented Jul 29, 2026

Copy link
Copy Markdown

Thanks for the pull request, @dcoa!

This repository is currently maintained by @openedx/committers-frontend.

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.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.66%. Comparing base (c08e45d) to head (d023d9f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   97.64%   97.66%   +0.01%     
==========================================
  Files          68       68              
  Lines        1702     1711       +9     
  Branches      447      412      -35     
==========================================
+ Hits         1662     1671       +9     
  Misses         40       40              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dcoa dcoa changed the title fix: add metadata for legacy roles listed in assigments fix: show name and description for legacy course roles listed in assignments Jul 29, 2026
@dcoa dcoa linked an issue Jul 29, 2026 that may be closed by this pull request
@dcoa
dcoa force-pushed the dcoa/list-unsupported-course-roles branch 2 times, most recently from a64a121 to a0fc190 Compare July 29, 2026 07:40
@dcoa
dcoa marked this pull request as ready for review July 29, 2026 07:42
@dcoa
dcoa requested review from bra-i-am and mariajgrimaldi July 29, 2026 07:42
disabled: true,
},
{
role: 'ccx_coach',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariajgrimaldi

I have a question about this role I check the backend ADR about the roles supported by the automatic migration https://github.com/openedx/openedx-authz/blob/main/docs/decisions/0011-course-authoring-migration-process.rst and CCX Coach is out of the scope. However, it is defined in the policy https://github.com/openedx/openedx-authz/blob/main/openedx_authz/constants/roles.py#L187. Because of this, I included but not sure if it is being returned.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was defined in the policy because of this error: openedx/openedx-authz#235. I remember we had a ccx role assignment in one of our sandboxes and it was shown empty in the list, so better to inlcude it.

@dcoa dcoa added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Jul 30, 2026
@dcoa
dcoa force-pushed the dcoa/list-unsupported-course-roles branch from a0fc190 to d023d9f Compare July 30, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). create-sandbox open-craft-grove should create a sandbox environment from this PR 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.

Unsupported roles show as empty in the roles assignment list

3 participants