openedx.core.djangoapps.catalog.management.commands package#
Submodules#
openedx.core.djangoapps.catalog.management.commands.cache_programs module#
“Management command to add program information to the cache.
- class openedx.core.djangoapps.catalog.management.commands.cache_programs.Command(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommandManagement command used to cache program data.
This command requests every available program from the discovery service, writing each to its own cache entry with an indefinite expiration. It is meant to be run on a scheduled basis and should be the only code updating these cache entries.
- add_arguments(parser)#
Entry point for subclassed commands to add custom arguments.
- fetch_program_details(client, uuids, api_base_url)#
- get_catalog_courses(programs)#
Get all catalog courses for the programs.
- get_courses(programs)#
Get all course runs for programs.
TODO: when course discovery can handle it, use that instead. That will allow us to put all course runs in the cache not just the course runs in a program. Therefore, a cache miss would be different from a course not in a program.
- get_pathways(client, site, api_base_url)#
Get all pathways for the current client.
- get_programs_by_organization(programs)#
Returns a dictionary mapping organization keys to lists of program uuids authored by that org
- get_programs_by_type(site, programs)#
Returns a dictionary mapping site-aware cache keys corresponding to program types to lists of program uuids with that type.
- get_programs_by_type_slug(site, programs)#
Returns a dictionary mapping site-aware cache keys corresponding to program types to lists of program uuids with that type.
- get_site_program_uuids(client, site, api_base_url)#
- handle(*args, **options)#
The actual logic of the command. Subclasses must implement this method.
- help = "Rebuild the LMS' cache of program data."#
- process_pathways(site, pathways, programs)#
For each program, add references to each pathway it is a part of. For each pathway, replace the “programs” dict with “program_uuids”, which only contains uuids (since program data is already cached)
openedx.core.djangoapps.catalog.management.commands.create_catalog_integrations module#
CatalogIntegration management command
- class openedx.core.djangoapps.catalog.management.commands.create_catalog_integrations.Command(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommandManagement command used to create catalog integrations.
- add_arguments(parser)#
Entry point for subclassed commands to add custom arguments.
- handle(*args, **options)#
The actual logic of the command. Subclasses must implement this method.
- help = 'Create catalog integration record in LMS'#
openedx.core.djangoapps.catalog.management.commands.sync_course_runs module#
Sync course runs from catalog service.
- class openedx.core.djangoapps.catalog.management.commands.sync_course_runs.Command(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommandPurpose is to sync course runs data from catalog service to make it accessible in edx-platform.
- class CourseRunField(catalog_name, course_overview_name)#
Bases:
tuple- catalog_name#
Alias for field number 0
- course_overview_name#
Alias for field number 1
- course_run_fields = (('marketing_url', 'marketing_url'), ('eligible_for_financial_aid', 'eligible_for_financial_aid'), ('content_language', 'language'))#
- handle(*args, **options)#
The actual logic of the command. Subclasses must implement this method.
- help = 'Refresh marketing urls from catalog service.'#