Skip to content

Commit

Permalink
chore: small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DawoudSheraz committed Apr 3, 2024
1 parent 20f66a3 commit 314339b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/decisions/0027-restricted-course-runs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ Under Review

Context
---------
Course Discovery was developed as a central data aggregator, aggregating information from Studio, LMS,and Ecommerce. By bringing the catalog in a central service, Discovery offers various ways
for the information to be consumed by different consumers. While the consumers use APIs to get the information, how the APIs work internally to provide the information differ greatly. The majority of the APIs hit the database directly. Then, there are specific catalog and search APIs that first query ElasticSearch for searching and then query the database to get the full set of details.
Course Discovery was created as a central data aggregator, aggregating information from Studio, LMS,and Ecommerce. Centralizing the catalog, Discovery offers various ways
for the information to be consumed by different consumers. While the consumers consume APIs to get the information, how the APIs work internally to provide the requested information differ greatly. The majority of the APIs hit the database directly. Then, there are specific catalog and search APIs that first query ElasticSearch for searching and then query the database to get the full set of details. The ElasticSearch
APIs are primarily used by B2B/Enterprise while other non-ES APIs are used by frontend B2C and other Open edX services.

Because course discovery is an entry point and a source of truth for consumers, the different ways of fetching the information makes it challenging to restrict the fetch selectively. It is not possible to define a product available for some consumers but hidden for others.
Focusing solely on CourseRun model, there is a **hidden** boolean field that hides the course run from most APIs if set to True. However, that flag is never set in Discovery/Publisher. Instead, it is set from Studio (catalog_visibility) and then synced to Discovery.

Focusing solely on CourseRun model as a course run is the entity that actually houses the content to be consumed. There is a **hidden** boolean field that hides the course run from most APIs if set to True. However, that flag is never set in Discovery/Publisher. Instead, it is set from Studio (catalog_visibility) and then synced to Discovery.

Why is there a need to have course runs be available selectively? Some of the use-cases can be:

Expand Down

0 comments on commit 314339b

Please sign in to comment.