Skip to content

feat: change in endpoint to support CCX id - #39145

Merged
wgu-taylor-payne merged 5 commits into
openedx:masterfrom
WGU-Open-edX:gradebook-ccx
Sep 29, 2026
Merged

wgu-taylor-payne merged 5 commits into
openedx:masterfrom
WGU-Open-edX:gradebook-ccx

Conversation

@jesusbalderramawgu

@jesusbalderramawgu jesusbalderramawgu commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

This is part of the issue

Allow CCX ids (ccx-v1:...) in the Gradebook REST API so the writable gradebook and its downstream views work for Custom Courses for edX, not just master courses.

So basically we need to add support to the endpoint
api/course_home/course_metadata/ccx-v1:OpenedX+DemoX+DemoCourse+ccx@5
to be able to retrieve data by CCXID and not just by courseId

How I tested this

I accessed to the instructor dasboard with a CCX id
http://apps.local.openedx.io:8080/ccx-coach/ccx-v1:OpenedX+DemoX+DemoCourse+ccx@5/student_grades

and I was able to get the data correctly and render the gradebook inside the students grades
Screenshot 2026-09-24 at 2 51 08 p m

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 24, 2026
@openedx-webhooks

openedx-webhooks commented Sep 24, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @jesusbalderramawgu!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform-oncall.

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.

Comment thread lms/djangoapps/grades/rest_api/v1/gradebook_views.py Outdated
@wgu-taylor-payne

Copy link
Copy Markdown
Contributor

The CCX v2 endpoints gate on IsCCXCoach, which checks three things beyond the coach role:

This branch checks the coach role alone. Should the gradebook path be applying any of these too?

@jesusbalderramawgu

Copy link
Copy Markdown
Contributor Author

The CCX v2 endpoints gate on IsCCXCoach, which checks three things beyond the coach role:

This branch checks the coach role alone. Should the gradebook path be applying any of these too?

Thank you Taylor,
Good catch — mirrored the platform-level (CUSTOM_COURSES_EDX) and course-level (master.enable_ccx) guards from IsCCXCoach, and swapped my hand-rolled staff/instructor check on the master for the canonical has_perm(VIEW_CCX_COACH_DASHBOARD, master_course). Kept the direct CourseStaffRole(ccx_key) / CourseInstructorRole(ccx_key) fallback because create_ccx_course grants those roles on the CCX itself (via assign_staff_role_to_ccx), which the master-scoped HasAccessRule('staff') doesn't cover. Extracted the whole check into _has_ccx_gradebook_access so the decorator stays compact, and added two negative tests locking in the new behavior.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good to me. @diana-villalvazo-wgu does this look good to you?

@diana-villalvazo-wgu

Copy link
Copy Markdown
Contributor

LGTM 👍

@wgu-taylor-payne
wgu-taylor-payne merged commit ca03902 into openedx:master Sep 29, 2026
42 checks passed
@diana-villalvazo-wgu
diana-villalvazo-wgu deleted the gradebook-ccx branch September 29, 2026 21:46
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