Fetch Programes without using Enterprise API

You have to define your programs in Discovery service first:

  1. in discovery venv run ./manage.py refresh_course_metadata
  2. in discovery admin create programs with the course metadata fetched from LMS and ecommerce.

If you have your programs already created in discovery then you can run:

./manage.py lms cache_programs

But for this command to run successfully, I had to do other configurations. I’ll tell you what I remember from my memory:

  1. Add COURSE_CATALOG_API_URL in your site configuraiton /admin/site_configuration/siteconfiguration. It should be like https://<your-discovery-url>/api/v1
  2. Add a Catalog integration object /admin/catalog/catalogintegration with the same catalog API URL

Once programs are cached, you’ll be able to see a programs menu item appear when in learner dashboard page.

You can check in code functions that fetch programs from cache in openedx/core/djangoapps/catalog/utils.py
And you can find an old implementation of a program about page in lms/djangoapps/courseware/views/views.py:program_marketing

Optionally, if you happen to create a programs list page within LMS, you can add its urls by creating a Programs API config object in /admin/programs/programsapiconfig

Program enrollments are not implemented through LMS and discovery. You’ll have to set up registrar service correctly and program manager MFE, a task I couldn’t succeed with.

I also invite you to have a look at this interesting discussion.