refactor: migrate course_details + grading callers to standardized v3 APIs (FC-0118) - #3136
Conversation
|
Thanks for the pull request, @taimoor-ahmed-1! 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3136 +/- ##
==========================================
+ Coverage 95.76% 96.02% +0.26%
==========================================
Files 1396 1401 +5
Lines 33308 34133 +825
Branches 7820 8123 +303
==========================================
+ Hits 31897 32776 +879
+ Misses 1352 1301 -51
+ Partials 59 56 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…v3 APIs Course details reads/writes now use /api/contentstore/v3/course_details/. The grading write uses PATCH /api/contentstore/v3/authoring_grading/; the read stays on v1 since v3 exposes no GET. Refs openedx#3127 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2a43c98 to
f5ed28a
Compare
|
@bradenmacdonald can you take a look |
|
@taimoor-ahmed-1 Yes but it might take me a couple days to get to it. |
Description
Part of the FC-0118 downstream migration tracked in #3127. Points two of the
Ready Studio API callers at their standardized v3 endpoints. Pure
URL/verb version bumps — no UI or behaviour change for Course Authors.
Commits (one per API, so each can be reviewed / rolled back independently):
course_details→ v3 —getCourseDetails(GET) andupdateCourseDetails(PUT) now target
/api/contentstore/v3/course_details/{course_id}/. The v3ViewSet supports the same GET+PUT and returns the same
CourseDetailsSerializershape. Both call sites are migrated (
schedule-and-detailsand the duplicatein
course-outline) so all course-details reads land on v3.course_gradingwrite → v3authoring_grading— the save(
sendGradingSettings) moves fromPOST v1/course_gradingtoPATCH v3/authoring_grading/{course_id}/, which collapses the old GET+POSTpair into a single
partial_update. Same serializer payload is returned.The trailing slash on both v3 URLs is required — v3 is served by a DRF
DefaultRouter(the v1 APIViews had none). Omitting it would 301-redirect anddrop the request body on PUT/PATCH.
User roles impacted: Course Author (Studio Schedule & Details, Grading
Settings pages). No visible change expected.
Supporting information
openedx/edx-platform, branchfeat/axim-api_improvements):Course Details v3 (#38708), Author Grading v3 (#38726), ADR 0031 (merge
endpoints), ADR 0037 (versioning).
per-call-site verb changes, not a URL swap), the ADR 0029 error-handling
wrapper (own PR), and Course Home [BD-03] [BB-2542] ]Add discussions configuration UI wireframe in MFE #2 / Home Courses adds transifex config and test string #3 (on hold pending Switch from Redux to React Query + Context #2540).
Testing instructions
loads and saving changes persists (network calls hit
.../v3/course_details/<id>/)..../v1/course_grading/<id>) and that saving persists (PATCH.../v3/authoring_grading/<id>/).npm test— updated suites:ScheduleAndDetails.test.tsx(13 passing),GradingSettings.test.jsx(12 passing),course-outlinespot-check green.Other information
edx-platform(feat/axim-api_improvements).The old versions remain live, so this is safe to merge once v3 is deployed.
Best Practices Checklist
propTypes/defaultPropsin new/modified codeinitializeMocksfromsrc/testUtilsapiHooks)description— N/A (no new messages)../added to import paths