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:
BaseCommandCreates 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:
BaseCommandExample usage:
# Process all certs/grades changes for a given course: $ ./manage.py lms –settings=devstack notify_credentials –courses course-v1:edX+DemoX+Demo_Course
# Process all certs/grades changes in a given time range: $ ./manage.py lms –settings=devstack 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 or correct the certificate_available_date data of the CourseCertificateConfiguration model instances stored by 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:
BaseCommandEnqueue the backfill_date_for_all_course_runs Celery task, which will enqueue additional subtasks responsible for sending certificate availability updates to the Credentials IDA.
- Example usage:
$ ./manage.py lms update_credentials_available_date
- handle(*args, **options)#
The actual logic of the command. Subclasses must implement this method.