Skip to content

feat: CCX Coach Schedule Save and Remove - #39126

Open
brianjbuck-wgu wants to merge 2 commits into
openedx:masterfrom
WGU-Open-edX:feature/38987-ccx-coach-schedule
Open

brianjbuck-wgu wants to merge 2 commits into
openedx:masterfrom
WGU-Open-edX:feature/38987-ccx-coach-schedule

Conversation

@brianjbuck-wgu

@brianjbuck-wgu brianjbuck-wgu commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the CCX Coach schedule endpoints to the v2 API consumed by the CCX Coach. This builds on the CCX Coach v2 API added in #39031 and continues migrating CCX Coach off the legacy Django templates, following the Instructor Dashboard v2 conventions.

Issue: #38987

Endpoints

  • GET /api/ccx_coach/v2/courses/{ccx_course_id}/schedule → the schedule tree as a JSON array of blocks v2 equivalent of the legacy ccx_schedule view.
  • POST /api/ccx_coach/v2/courses/{ccx_course_id}/save_schedule with the edited schedule tree → { schedule, grading_policy }. v2 equivalent of the legacy save_ccx edit flow.
  • POST /api/ccx_coach/v2/courses/{ccx_course_id}/remove_schedule → the updated schedule. New endpoint (visible_to_staff_only=True), clears their start/due overrides, republishes the CCX, and returns the refreshed schedule so the client can update in one call.

Refactor

The schedule read/save logic was extracted from lms/djangoapps/ccx/views.py into reusable services in lms/djangoapps/ccx/utils.py get_ccx_schedule(), save_ccx_schedule(), and the new remove_block_from_ccx_schedule(). The legacy ccx_schedule and save_ccx views now delegate to these services, so the legacy coach dashboard is unaffected (the existing legacy tests still pass). This mirrors the create_ccx_course() extraction from #39031.

Impacted roles: CCX Coach, Course Staff/Instructor (Learner-facing behavior unchanged)

Supporting information

Deadline

None

Other information

  • No database migrations.

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

openedx-webhooks commented Sep 17, 2026

Copy link
Copy Markdown

Thanks for the pull request, @brianjbuck-wgu!

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.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Sep 17, 2026
@brianjbuck-wgu brianjbuck-wgu changed the title Feature/38987 ccx coach schedule upstream feat: CCX Coach Schedule Save and Remove Sep 17, 2026
@brianjbuck-wgu
brianjbuck-wgu force-pushed the feature/38987-ccx-coach-schedule branch from 0e52e35 to 086cd9c Compare September 17, 2026 22:01
@brianjbuck-wgu
brianjbuck-wgu marked this pull request as ready for review September 18, 2026 16:03
@brianjbuck-wgu
brianjbuck-wgu force-pushed the feature/38987-ccx-coach-schedule branch from 086cd9c to eead4e9 Compare September 18, 2026 16:04
@brianjbuck-wgu
brianjbuck-wgu force-pushed the feature/38987-ccx-coach-schedule branch from eead4e9 to 787e2dd Compare September 18, 2026 20:23

@rodmgwgu rodmgwgu 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.

Code looks good, just added some nit comments. Thanks!

Return CCX Coach metadata for a master course or CCX course.

**Example Request**
*Example Request*

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.

Nit: do we need these changes? this would make these italic instead of bold (if this works like markdown...)

"""
def visit(node, depth=1):
"""
Recursive generator function which yields CCX schedule nodes.

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.

I see that the original get_ccx_schedule had a more detailed docstring, should we bring that back for completness and documentation?

@rodmgwgu rodmgwgu 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.

Tested in my local and works as expected, thanks!

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: Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants