feat: CCX Coach Schedule Save and Remove - #39126
brianjbuck-wgu wants to merge 2 commits into
Conversation
|
Thanks for the pull request, @brianjbuck-wgu! This repository is currently maintained by 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 approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
0e52e35 to
086cd9c
Compare
086cd9c to
eead4e9
Compare
eead4e9 to
787e2dd
Compare
rodmgwgu
left a comment
There was a problem hiding this comment.
Code looks good, just added some nit comments. Thanks!
| Return CCX Coach metadata for a master course or CCX course. | ||
|
|
||
| **Example Request** | ||
| *Example Request* |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
I see that the original get_ccx_schedule had a more detailed docstring, should we bring that back for completness and documentation?
rodmgwgu
left a comment
There was a problem hiding this comment.
Tested in my local and works as expected, thanks!
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
/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./api/ccx_coach/v2/courses/{ccx_course_id}/save_schedulewith the edited schedule tree → { schedule, grading_policy }. v2 equivalent of the legacy save_ccx edit flow./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 newremove_block_from_ccx_schedule(). The legacyccx_scheduleandsave_ccxviews now delegate to these services, so the legacy coach dashboard is unaffected (the existing legacy tests still pass). This mirrors thecreate_ccx_course()extraction from #39031.Impacted roles: CCX Coach, Course Staff/Instructor (Learner-facing behavior unchanged)
Supporting information
Deadline
None
Other information