openedx.core.djangoapps.credentials.management.commands package#

Submodules#

openedx.core.djangoapps.credentials.management.commands.clean_certificate_available_date module#

This task will clean out the misconfigured certificate available date. When courses Change their certificates_display_behavior, the certificate_available_date was not updating properly. This is command is meant to be ran one time to clean up any courses that were not supposed to have certificate_available_date

class openedx.core.djangoapps.credentials.management.commands.clean_certificate_available_date.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

Cleans out misconfigured certificate available dates on courses that are not meant to have them.

handle(*args, **options)#

The actual logic of the command. Subclasses must implement this method.

openedx.core.djangoapps.credentials.management.commands.create_credentials_api_configuration module#

Command to create a credentials api configuration

class openedx.core.djangoapps.credentials.management.commands.create_credentials_api_configuration.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

Creates a api configuration between LMS <–> Credentials service. This command is meant to be used in combination with other commands to create a fully connected path to awarding program certificates in devstack.

handle(*args, **kwargs)#

The actual logic of the command. Subclasses must implement this method.

openedx.core.djangoapps.credentials.management.commands.notify_credentials module#

A few places in the LMS want to notify the Credentials service when certain events happen (like certificates being awarded or grades changing). To do this, they listen for a signal. Sometimes we want to rebuild the data on these apps regardless of an actual change in the database, either to recover from a bug or to bootstrap a new feature we’re rolling out for the first time.

This management command will manually trigger the receivers we care about. (We don’t want to trigger all receivers for these signals, since these are busy signals.)

class openedx.core.djangoapps.credentials.management.commands.notify_credentials.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

Example usage:

# Process all certs/grades changes for a given course: $ ./manage.py lms –settings=devstack_docker notify_credentials –courses course-v1:edX+DemoX+Demo_Course

# Process all certs/grades changes in a given time range: $ ./manage.py lms –settings=devstack_docker notify_credentials –start-date 2018-06-01 –end-date 2018-07-31

A Dry Run will produce output that looks like:

DRY-RUN: This command would have handled changes for… 3 Certificates:

course-v1:edX+RecordsSelfPaced+1 for user 14 course-v1:edX+RecordsSelfPaced+1 for user 17 course-v1:edX+RecordsSelfPaced+1 for user 18

3 Grades:

course-v1:edX+RecordsSelfPaced+1 for user 14 course-v1:edX+RecordsSelfPaced+1 for user 17 course-v1:edX+RecordsSelfPaced+1 for user 18

add_arguments(parser)#

Entry point for subclassed commands to add custom arguments.

get_args_from_database()#

Returns an options dictionary from the current NotifyCredentialsConfig model.

handle(*args, **options)#

The actual logic of the command. Subclasses must implement this method.

help = 'Simulate certificate/grade changes without actually modifying database content. Specifically, trigger the handlers that send data to Credentials.'#
openedx.core.djangoapps.credentials.management.commands.notify_credentials.parsetime(timestr)#

openedx.core.djangoapps.credentials.management.commands.update_credentials_available_date module#

A manangement command to populate the new available_date field in all CourseCertificates in credentials. Accomplished by sending the COURSE_CERT_DATE_CHANGE signal accross all course runs in the LMS to call a new API in credentials that will populate the date if one is found.

This command is designed to be ran once to backpopulate data. New courses added or any time the COURSE_CERT_DATE_CHANGE signal fires, the API will automatically be called as a part of that flow.

class openedx.core.djangoapps.credentials.management.commands.update_credentials_available_date.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

A command to populate the available_date field in the CourseCertificate model for every course run inside of the LMS.

handle(*args, **options)#

The actual logic of the command. Subclasses must implement this method.

Module contents#