Skip to content

fix: Use specific sort order for Instructor Dashboard roles.#38478

Merged
wgu-taylor-payne merged 2 commits intoopenedx:masterfrom
WGU-Open-edX:bugfix/38439-role-sort-order
Apr 29, 2026
Merged

fix: Use specific sort order for Instructor Dashboard roles.#38478
wgu-taylor-payne merged 2 commits intoopenedx:masterfrom
WGU-Open-edX:bugfix/38439-role-sort-order

Conversation

@brianjbuck-wgu
Copy link
Copy Markdown
Contributor

@brianjbuck-wgu brianjbuck-wgu commented Apr 29, 2026

Description

The CourseTeamRolesView endpoint returns roles in alphabetical order, which doesn't match the desired display order in the Instructor Dashboard. This changes the endpoint to return roles in a specific order:

  1. Staff
  2. Limited Staff
  3. Admin
  4. Beta Tester
  5. Course Data Researcher
  6. Discussion Admin
  7. Discussion Moderator
  8. Group Community TA
  9. Community TA
  10. CCX Coach (when enabled)

Supporting information

frontend-app-instructor-dashboard#102 (comment)

Testing instructions

  1. Open the Instructor Dashboard and navigate to the Course Team Management tab
  2. Verify the role filter/dropdown lists roles in the order above
  3. Enable CCX for a course and verify CCX Coach appears last

Deadline

Verawood

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

Thanks for the pull request, @brianjbuck-wgu!

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.

@diana-villalvazo-wgu
Copy link
Copy Markdown
Contributor

Tested it on UI and works as expected 👍

Copy link
Copy Markdown
Contributor

@wgu-taylor-payne wgu-taylor-payne left a comment

Choose a reason for hiding this comment

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

Clean implementation — sort-key dict with fallback for unknown roles is the right pattern.

One nit: the CourseTeamRolesView docstring example (~line 3084 in api_v2.py) still shows roles in alphabetical order. Should be updated to reflect the new sort order:

                {"role": "staff", "display_name": "Staff"},
                {"role": "limited_staff", "display_name": "Limited Staff"},
                {"role": "instructor", "display_name": "Admin"},
                {"role": "beta", "display_name": "Beta Tester"},
                {"role": "data_researcher", "display_name": "Data Researcher"}

Review assisted by Kiro

@wgu-taylor-payne wgu-taylor-payne enabled auto-merge (squash) April 29, 2026 22:29
@wgu-taylor-payne wgu-taylor-payne merged commit 13cdb7f into openedx:master Apr 29, 2026
41 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Contributions Apr 29, 2026
@diana-villalvazo-wgu diana-villalvazo-wgu deleted the bugfix/38439-role-sort-order branch April 30, 2026 04:34
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: Done

Development

Successfully merging this pull request may close these issues.

4 participants