Use CourseRun Model & Add Admin Page#42
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
==========================================
+ Coverage 92.60% 93.04% +0.44%
==========================================
Files 16 16
Lines 473 503 +30
Branches 18 18
==========================================
+ Hits 438 468 +30
Misses 24 24
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9efde31 to
d26c53a
Compare
feanil
approved these changes
May 14, 2026
Replace the CourseKeyField on CourseArchiveStatus with a ForeignKey to openedx_catalog.CourseRun, following the new "use a FK to CourseRun for any model-level course reference" guidance from openedx-core. The public API still identifies courses by their course_key string (never by CourseRun's internal PK), so frontend consumers and the JSON contract are unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Expose the sample plugin's one model in the LMS/CMS admin so operators can inspect and manage records without custom tooling, and so the sample demonstrates the standard ModelAdmin pattern alongside the other plugin interfaces. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d26c53a to
176be8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add openedx-core as a dep and use its openedx_catalog CourseRun model, which demonstrates our new stable core APIs a bit.
Also, adds an admin page, which shows the FK relationship, and is also just a great practice for plugins to follow.
Testing
I tested that the feature still works as it did before. Here's the admin page:
Note that I had to un-migrate and re-migrate, since the models are rewritten in-place rather than smoothly migrated with a 0002:
AI
Claude wrote it, I reviewed it, and I had it simplify the implementation a bit before committing. Main prompts: