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

Submodules#

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

Django management command used to enable Credentials functionality in this Open edX instance.

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 CredentialsApiConfig in the LMS to enable Credentials functionality. This command was primarily used as part of an optional devstack provisioning step for developers who work with the Credentials IDA.

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 certificate_available_date field of the CourseCertificateConfiguration model in the Credentials IDA.

This command is designed to be ran once to initially backpopulate data. Otherwise, anytime an existing course run adjusts its certificate available date or certificates display behavior settings, updates will automatically be queued and transmit to the Credentials IDA.

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 management command reponsible for populating the certificate_available_date field of CourseCertificateConfiguration instances in the Credentials IDA.

handle(*args, **options)#

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

Module contents#