You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create an openedx_catalog app with a representation for CourseRuns #469
The Learning Pathways project would benefit from having a representation of CourseRuns in this repo, since the first Pathways will be configured using CourseRuns.
As a migration step, we would push data into this new model from openedx-platform's CourseOverview. At some later point, we can reverse the dependency relationship.
Some high level thoughts/ramblings:
We probably want a very small table because it's going to be joined against a lot in the future. Common metadata should go in 1:1 models that we optionally join on. We want to avoid CourseOverview's "just one more field" syndrome, and try to divide up supplementary data into logical pieces like CourseSchedule.
For phase one, we only need the minimal set of course data needed for Learning Pathways to query.
We could make the initial model more general, e.g. LearningContext, even if we only push the course keys to it for now (and then subclass or 1:1 for CourseRun). I'm not sure if this is really the way we want to go though, because LearningContext feels like it's only a catalog concept by coincidence because of how the system evolved.
We should use actual opaque key Django fields.
I'm guessing we'll want to use RBAC (opeendx-authz)?
They often re-use 90+% of the same content, which is part of why I'd like to eventually see multiple runs of the same course stored in the same LearningPackage
The Studio course listing page is eventually going to have the runs grouped by course.
Right now this concept lives in course-discovery but that comes with a lot of baggage that we don't want. Being able to house a core concept in edx-platform and then push a lot of the rest into things that either plugin or otherwise interface with the core bits here seems like it would make the platform more generically usable.
be wary of adding too much additional metadata to these CatalogCourses. Can we draw a bright line around what this is meant and not meant to do? Some things that would be red flags for me: ecommerce (including "entitlements"), certificates, programs (probably).
We could say that a CatalogCourse model (or virtual model) to group CourseRun's together exists in the core for the purposes of organizing CourseRuns (in Studio), de-duplicating content storage (internally in openedx_content), and providing primitives (models and events) that higher-level apps/plugins can use (programs, ecommerce, enrollment), but which otherwise don't affect core functionality.
Strong desire for the ability to create CourseRuns (for marketing & enrollment) without any attached content yet.
To achieve this, we would likely want/need to move some core metadata (start date, enrollment date, etc.) from the platform's Course XBlock to new models attached to CourseRun. See Dave's prev proposal
The tricky part in that scenario would be figuring out the migration path and what happens to import/export of those fields that already exist in Modulestore. I think it's totally doable, but there are a lot of details to work out.
Product question: would we ever also allow creating re-runs of a CatalogCourse that don't have content attached yet? (And then you could create a completely new version of the course instead of modifying a previous run)
Figure 1: Studio Home Page with course runs grouped together (mockup)
We could make the initial model more general, e.g. LearningContext, even if we only push the course keys to it for now (and then subclass or 1:1 for CourseRun). I'm not sure if this is really the way we want to go though, because LearningContext feels like it's only a catalog concept by coincidence because of how the system evolved.
Yeah. If we think of LearningContext as "a context in which we will display learnable content (to learners OR authors) and be able to track user state/grades" (i.e. any context where we render XBlocks), then "content library", "blog post", "course", and perhaps "pathway" are all learning contexts.
If we define this "catalog" app as something like "core data/models to facilitate learner discovery and enrollment into enrollable things", then courses and pathways would be in scope for it, but other learning contexts like content libraries and the (theoretical) "blog post" context would not.
Yeah. If we think of LearningContext as "a context in which we will display learnable content (to learners OR authors) and be able to track user state/grades" (i.e. any context where we render XBlocks), then "content library", "blog post", "course", and perhaps "pathway" are all learning contexts.
Agreed.
If we define this "catalog" app as something like "core data/models to facilitate learner discovery and enrollment into enrollable things", then courses and pathways would be in scope for it, but other learning contexts like content libraries and the (theoretical) "blog post" context would not.
So I think that "enrollable thing" is a good place to start the framing of it, with the catalog holding that piece and then the learning side controlling the later mapping from the enrollable thing into the learning context. But some wrinkles:
We want roles to be mappable at the catalog layer.
We should check with Product, but it seems reasonable to me to want to browse libraries or pre-provision roles for them in a manner similar to courses, even if they're not "enrollable" in the same way.
The other part of this that we would really need Product input on is whether we want to shift further away from the 1:1 relationship of enrollable-thing -> learning context that we have today. If Enrollable is a openedx_catalog concept, and LearningContext is an openedx_learning concept, then it's possible that the mapping becomes 1:M, i.e. you enroll in a course and it grants you access to multiple runs. That would be a huge shift from what we have today and have a lot of knock-on effects, but the fact that we're separating the two might yield opportunities for more flexibility in less drastic increments.
So I think that "enrollable thing" is a good place to start the framing of it, with the catalog holding that piece and then the learning side controlling the later mapping from the enrollable thing into the learning context.
Thinking on this more, I'm not so sure about that. It would make more sense to me if the concepts of "Enrollable" and "Enrollment" were part of a single enrollments app, not having "Catalog" own "Enrollable" and something else own "Enrollment". It also means that we have to add a layer of abstraction for "Enrollable" and "Enrollment", neither of which are abstract in the system today. Doing that abstraction in a way that's really flexible while also preserving simplicity and performance (for the 99.9% of use cases that are basic course enrollments) seems like too much to bite off ?
What you think about these two options? Or anything else that comes to mind.
Simple Option: Focus on Courses
Enrollments are not abstract. The new openedx_catalog app is really just to provide the minimal core data required for other apps to reference courses when needed, and could in fact be better named openedx_courses. The existing enrollments app (common.djangoapps.student.models.course_enrollment + openedx.core.djangoapps.enrollments) would continue to work unchanged, but could/should be re-organized in the future.
The goal of the openedx_courses app is to answer the question "what courses exist in the system?" for use by all other apps. It doesn't provide anything learner-oriented or discovery/enrollment oriented on its own.
---
config:
theme: 'forest'
---
flowchart TB
Catalog["**openedx_courses** (CourseRun, CatalogCourse plus core metadata models, e.g. CourseSchedule. Other metadata models live in other apps but are 1:1 with CourseRun.)"]
Content["**openedx_content** (publishing, containers, components)"]
Organizations["**edx-organizations** (Organization)"]
Enrollments["**platform: enrollments** (CourseEnrollment, CourseEnrollmentAllowed)"]
Modes["**platform: course_modes** (CourseMode)"]
Catalog -. "If content, references an OutlineRoot" .-> Content
Catalog -- References --> Organizations
Enrollments -- References --> Modes
Enrollments -- References --> Catalog
style Enrollments fill:#ccc
style Modes fill:#ccc
style Organizations fill:#ccc
Pathways["**openedx_pathways** (Pathway, PathwaySchedule, PathwayEnrollment, PathwayCertificate, etc.)"]
Pathways -- References --> Catalog
style Pathways fill:#c0ffee
FutureCatalog["Future catalog service"] -- References --> Catalog
FutureCatalog <-- Plugin API --> Pathways
style FutureCatalog fill:#ffc0ee
Loading
Catalog Option: Focus on Enrollables
Enrollments are abstract. The new openedx_catalog app exists to answer the question: "what enrollable things are available to me, as a learner?" In the future, it will have APIs for that, and plugins can control its behavior to implement things like subscriptions, enterprise, ecommerce, and various pathway types.
---
config:
theme: 'forest'
---
flowchart TB
Catalog["**openedx_catalog** (AbstractEnrollable, CourseRun, CatalogCourse, Pathway, plus core metadata models, e.g. EnrollableSchedule. Other metadata models live in other apps but are 1:1 with CourseRun.)"]
Content["**openedx_content** (publishing, containers, components)"]
Organizations["**edx-organizations** (Organization)"]
Enrollments["**platform: enrollments** (Enrollment, EnrollmentAllowed, EnrollmentMode)"]
Catalog -. "If it has content, then CourseRun references an OutlineRoot" .-> Content
Catalog -- References --> Organizations
Enrollments -- References --> Catalog
style Enrollments fill:#ccc
style Organizations fill:#ccc
Pathways["**openedx_pathways** (PathwaySchedule, PathwayCertificate, etc.)"]
Pathways <-- Plugin API --> Catalog
style Pathways fill:#c0ffee
FutureCatalog["Other catalog plugins (subscriptions, entitlements, ecommerce, etc.)"] <-- plugin API --> Catalog
FutureCatalog -. May reference .-> Pathways
style FutureCatalog fill:#ffc0ee
Loading
I think the "Simple Option" above is much more straightforward and probably a better evolution of what we have today; is it a good foundation for the future though? (I think so, but if we want lots of other enrollable things, maybe not).
Enrollments are not abstract. The new openedx_catalog app is really just to provide the minimal core data required for other apps to reference courses when needed, and could in fact be better named openedx_courses.
I'd strongly prefer the framing of calling it openedx_catalog because courses exist everywhere—there's going to be a publishable thing in openedx_content called a Course, for instance (distinct from an OutlineRoot, since it would want to capture things like grading policy, files and uploads, and more). I think that calling the model a Course and putting it in the framing of an openedx_catalog app conveys its meaning more accurately.
The existing enrollments app (common.djangoapps.student.models.course_enrollment + openedx.core.djangoapps.enrollments) would continue to work unchanged, but could/should be re-organized in the future.
I agree with this, FWIW. The first cut of this is to give CourseRun data representation in openedx-learning so that we can make foreign keys to it from other things in this repo, and make sure to keep that data in-sync by pushing data from the course_overviews app as necessary. Course enrollments are too complex for us to move over lightly. I think this is true regardless of which direction we want to go.
We may want to invert the relationship here between catalog and content, i.e. have openedx_content hold the mapping.
We'll eventually want to add openedx-authz as a dependency for Pathway role information, though that's not a phase 1 concern since Pathways are just going to be set up by admins.
there's going to be a publishable thing in openedx_content called a Course, for instance (distinct from an OutlineRoot, since it would want to capture things like grading policy, files and uploads, and more).
@ormsbee Ah, interesting. I guess I assumed that we wouldn't have a Course model in openedx_content, and that things like Schedule, Grading Policy, etc. would live in other apps (like openedx_catalog). Reason being that I assumed we'd want only a history log (via HistoricalRecords) rather than draft-publish workflow for those things. If each of them is a full-blown PublishableEntity with separate draft and published versions, then yeah that makes sense. (But it does complicate the plugin story for adding new course metadata models.)
We may want to invert the relationship here between catalog and content, i.e. have openedx_content hold the mapping.
Right. From what I put in the diagram above it could go either way. I think this does depend on where we see most of the metadata living - whether stuff like schedule and grading policy is in openedx_content or other apps.
Activity
openedx_contentapp #457openedx_contentapp #457bradenmacdonald commentedon Jan 30, 2026
Some related discussion in ADR for an edx-platform representation of Catalog Courses #34156
bradenmacdonald commentedon Feb 3, 2026
Some notes to self from the earlier discussions:
openedx_content), and providing primitives (models and events) that higher-level apps/plugins can use (programs, ecommerce, enrollment), but which otherwise don't affect core functionality.Figure 1: Studio Home Page with course runs grouped together (mockup)
bradenmacdonald commentedon Feb 3, 2026
Yeah. If we think of LearningContext as "a context in which we will display learnable content (to learners OR authors) and be able to track user state/grades" (i.e. any context where we render XBlocks), then "content library", "blog post", "course", and perhaps "pathway" are all learning contexts.
If we define this "catalog" app as something like "core data/models to facilitate learner discovery and enrollment into enrollable things", then courses and pathways would be in scope for it, but other learning contexts like content libraries and the (theoretical) "blog post" context would not.
ormsbee commentedon Feb 4, 2026
Agreed.
So I think that "enrollable thing" is a good place to start the framing of it, with the catalog holding that piece and then the learning side controlling the later mapping from the enrollable thing into the learning context. But some wrinkles:
The other part of this that we would really need Product input on is whether we want to shift further away from the 1:1 relationship of enrollable-thing -> learning context that we have today. If Enrollable is a openedx_catalog concept, and LearningContext is an openedx_learning concept, then it's possible that the mapping becomes 1:M, i.e. you enroll in a course and it grants you access to multiple runs. That would be a huge shift from what we have today and have a lot of knock-on effects, but the fact that we're separating the two might yield opportunities for more flexibility in less drastic increments.
bradenmacdonald commentedon Feb 4, 2026
Thinking on this more, I'm not so sure about that. It would make more sense to me if the concepts of "Enrollable" and "Enrollment" were part of a single enrollments app, not having "Catalog" own "Enrollable" and something else own "Enrollment". It also means that we have to add a layer of abstraction for "Enrollable" and "Enrollment", neither of which are abstract in the system today. Doing that abstraction in a way that's really flexible while also preserving simplicity and performance (for the 99.9% of use cases that are basic course enrollments) seems like too much to bite off ?
What you think about these two options? Or anything else that comes to mind.
Simple Option: Focus on Courses
Enrollments are not abstract. The new
openedx_catalogapp is really just to provide the minimal core data required for other apps to reference courses when needed, and could in fact be better namedopenedx_courses. The existing enrollments app (common.djangoapps.student.models.course_enrollment+openedx.core.djangoapps.enrollments) would continue to work unchanged, but could/should be re-organized in the future.The goal of the
openedx_coursesapp is to answer the question "what courses exist in the system?" for use by all other apps. It doesn't provide anything learner-oriented or discovery/enrollment oriented on its own.--- config: theme: 'forest' --- flowchart TB Catalog["**openedx_courses** (CourseRun, CatalogCourse plus core metadata models, e.g. CourseSchedule. Other metadata models live in other apps but are 1:1 with CourseRun.)"] Content["**openedx_content** (publishing, containers, components)"] Organizations["**edx-organizations** (Organization)"] Enrollments["**platform: enrollments** (CourseEnrollment, CourseEnrollmentAllowed)"] Modes["**platform: course_modes** (CourseMode)"] Catalog -. "If content, references an OutlineRoot" .-> Content Catalog -- References --> Organizations Enrollments -- References --> Modes Enrollments -- References --> Catalog style Enrollments fill:#ccc style Modes fill:#ccc style Organizations fill:#ccc Pathways["**openedx_pathways** (Pathway, PathwaySchedule, PathwayEnrollment, PathwayCertificate, etc.)"] Pathways -- References --> Catalog style Pathways fill:#c0ffee FutureCatalog["Future catalog service"] -- References --> Catalog FutureCatalog <-- Plugin API --> Pathways style FutureCatalog fill:#ffc0eeCatalog Option: Focus on Enrollables
Enrollments are abstract. The new
openedx_catalogapp exists to answer the question: "what enrollable things are available to me, as a learner?" In the future, it will have APIs for that, and plugins can control its behavior to implement things like subscriptions, enterprise, ecommerce, and various pathway types.--- config: theme: 'forest' --- flowchart TB Catalog["**openedx_catalog** (AbstractEnrollable, CourseRun, CatalogCourse, Pathway, plus core metadata models, e.g. EnrollableSchedule. Other metadata models live in other apps but are 1:1 with CourseRun.)"] Content["**openedx_content** (publishing, containers, components)"] Organizations["**edx-organizations** (Organization)"] Enrollments["**platform: enrollments** (Enrollment, EnrollmentAllowed, EnrollmentMode)"] Catalog -. "If it has content, then CourseRun references an OutlineRoot" .-> Content Catalog -- References --> Organizations Enrollments -- References --> Catalog style Enrollments fill:#ccc style Organizations fill:#ccc Pathways["**openedx_pathways** (PathwaySchedule, PathwayCertificate, etc.)"] Pathways <-- Plugin API --> Catalog style Pathways fill:#c0ffee FutureCatalog["Other catalog plugins (subscriptions, entitlements, ecommerce, etc.)"] <-- plugin API --> Catalog FutureCatalog -. May reference .-> Pathways style FutureCatalog fill:#ffc0eeI think the "Simple Option" above is much more straightforward and probably a better evolution of what we have today; is it a good foundation for the future though? (I think so, but if we want lots of other enrollable things, maybe not).
CC @kdmccormick @Agrendalath @mgwozdz-unicon
ormsbee commentedon Feb 4, 2026
I'd strongly prefer the framing of calling it
openedx_catalogbecause courses exist everywhere—there's going to be a publishable thing inopenedx_contentcalled a Course, for instance (distinct from an OutlineRoot, since it would want to capture things like grading policy, files and uploads, and more). I think that calling the model a Course and putting it in the framing of anopenedx_catalogapp conveys its meaning more accurately.I agree with this, FWIW. The first cut of this is to give CourseRun data representation in openedx-learning so that we can make foreign keys to it from other things in this repo, and make sure to keep that data in-sync by pushing data from the
course_overviewsapp as necessary. Course enrollments are too complex for us to move over lightly. I think this is true regardless of which direction we want to go.ormsbee commentedon Feb 4, 2026
Other random comments...
openedx_contenthold the mapping.bradenmacdonald commentedon Feb 4, 2026
@ormsbee Ah, interesting. I guess I assumed that we wouldn't have a
Coursemodel inopenedx_content, and that things like Schedule, Grading Policy, etc. would live in other apps (likeopenedx_catalog). Reason being that I assumed we'd want only a history log (viaHistoricalRecords) rather than draft-publish workflow for those things. If each of them is a full-blownPublishableEntitywith separate draft and published versions, then yeah that makes sense. (But it does complicate the plugin story for adding new course metadata models.)Right. From what I put in the diagram above it could go either way. I think this does depend on where we see most of the metadata living - whether stuff like schedule and grading policy is in openedx_content or other apps.