-
Notifications
You must be signed in to change notification settings - Fork 30
docs: add ADR for pathway catalog and content split #761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| .. _openedx-learning-adr-0004: | ||
|
|
||
| 4. Pathways: Split Between Catalog and Content | ||
| ============================================== | ||
|
|
||
| Status | ||
| ------ | ||
|
|
||
| Draft | ||
|
|
||
| Context | ||
| ------- | ||
|
|
||
| Courses in ``openedx-core`` already separate the *catalog* side (``openedx_catalog``: ``CatalogCourse``, | ||
| ``CourseRun`` - what learners browse and enroll against) from the *content* side (``openedx_content`` - what is | ||
| authored, versioned, and published). Pathways have the same two aspects, and the same reasons to keep them apart: | ||
|
|
||
| - **Different change rates.** The display name, description shown in the catalog, and SEO metadata are revised | ||
| frequently and casually. The definition of what a learner must do to complete the Pathway changes rarely and | ||
| deliberately. | ||
| - **Different people doing the editing.** Catalog data is typically maintained by marketing or communications staff; | ||
| the Pathway definition is maintained by content authors. Both are visible to learners, so the distinction is about | ||
| who edits what, not about who can see it. | ||
| - **Different permissions follow from that.** We expect instances to want to let marketing staff update catalog | ||
| copy without granting them the ability to change what learners must complete, and vice versa. Keeping the two | ||
| apart makes that possible without inventing field-level permissions. | ||
| - **Auditability.** Progress and credentials must be judged against the definition that was in effect at the time, | ||
| which requires versioning the definition - but versioning catalog copy would be pure overhead. | ||
|
|
||
| Decisions | ||
| --------- | ||
|
|
||
| 1. A Pathway is split into two parts: | ||
|
|
||
| - **Catalog Pathway** - the learner-browsable, enrollable thing. It includes the display name, the description | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you say more about this? It sounds like a credential will tie together a learner, a catalog pathway, and particular content pathway that "implemented" that catalog pathway. Is that right? Will an enrollment do the same?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kdmccormick, I added more details about the enrollments in 9218009. I will add the details about the credentials to #764, since it's out of scope for the current ADR (and I wanted to avoid forward refs here). In short:
|
||
| shown in the catalog, SEO metadata, and a **Category**: a student-facing label for the kind of Pathway it is | ||
| (e.g. "Master's Degree", "Annual Training"). If it is specified, learners see the Category instead of the word | ||
| "Pathway". The Catalog Pathway is **not versioned**. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From a code point of view, I think we should always force it to be specified, and we can create a default database entry for "Pathway". If we do it with a hardcoded fallback-in-code, we're more likely to get inconsistent behaviors.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| - **Pathway content** - the definition of the Pathway: its Items and its completion criteria. The content is | ||
| **versioned**, so that we can always tell what the definition was at the moment a learner enrolled or earned a | ||
| credential. | ||
|
|
||
| 2. In authoring contexts (Studio, Django admin, code, docs), the terminology is always "Pathway", with the Category | ||
| shown explicitly. Relabelling is a learner-facing concern of the catalog side only. | ||
|
|
||
| 3. Learners enroll against the Catalog Pathway. Progress and credential evaluation run against a version of the | ||
| Pathway content. | ||
|
|
||
| Example content of each model: | ||
|
|
||
| ============================ ========================== | ||
| Catalog Pathway Pathway content | ||
| ============================ ========================== | ||
| Display name Pathway Items | ||
| Category Completion criteria | ||
| Description | ||
| SEO metadata | ||
| Enrollment | ||
| ============================ ========================== | ||
|
|
||
| .. Run `dot -Tsvg images/pathway-catalog-content.dot > images/pathway-catalog-content.svg` to regenerate the diagram | ||
| after making changes to `images/pathway-catalog-content.dot`. | ||
|
|
||
| .. image:: images/pathway-catalog-content.svg | ||
| :alt: Catalog Pathway vs versioned Pathway content | ||
| :width: 100% | ||
|
|
||
| Consequences | ||
| ------------ | ||
|
|
||
| - Catalog edits never create new content versions; definition edits (Items, criteria) always do. | ||
| - Credential and progress records can reference the exact content version in effect at the time, keeping them | ||
| auditable after the Pathway changes. | ||
| - The unversioned Catalog Pathway can be long-lived even if its content definition is changed significantly over time. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| digraph pathway_catalog_content { | ||
| rankdir=LR; | ||
| fontname="Helvetica"; | ||
| node [shape=box, style=rounded, fontname="Helvetica", fontsize=11]; | ||
| edge [fontname="Helvetica", fontsize=10]; | ||
|
|
||
| learner [label="Learner", shape=ellipse]; | ||
| catalog [label="Catalog Pathway\n(not versioned)\nname, Category,\nmarketing, SEO"]; | ||
|
|
||
| subgraph cluster_content { | ||
| label="Pathway content (versioned)"; | ||
| fontsize=11; | ||
| style=dashed; | ||
| v1 [label="v1: Items, criteria"]; | ||
| v2 [label="v2: Items, criteria"]; | ||
| v1 -> v2 [style=dotted, label="revision"]; | ||
| } | ||
|
|
||
| learner -> catalog [label="browses / enrolls"]; | ||
| catalog -> v2 [label="current definition"]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our new RBAC world, I would expect that there's not much difference between implementing "field-level" permissions and "model-level" permissions, since we're using Casbin to define whatever roles and permissions make sense for each API. Either way, it's simply permissions and needs to be enforced in the REST API via
permission_classesas appropriate.However, I still think this split makes sense for the other reasons you've stated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradenmacdonald, ah, that's good to know - I'm not very familiar with the recent RBAC changes. Should we remove this point from the ADR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we should add a note that this reason may not be as important with the new RBAC system. But as I said, I still think the overall decision makes sense and is a nice way to structure it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - added in 4966440.