openedx.core.djangoapps.enrollments.management.commands package#
Submodules#
openedx.core.djangoapps.enrollments.management.commands.enroll_user_in_course module#
Management command for enrolling a user into a course via the enrollment api
- class openedx.core.djangoapps.enrollments.management.commands.enroll_user_in_course.Command(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommandEnroll a user into a course
- add_arguments(parser)#
Entry point for subclassed commands to add custom arguments.
- handle(*args, **options)#
Get and enroll a user in the given course. Mode is optional and defers to the enrollment API for defaults.
- help = "\n This enrolls a user into a given course\n\n User email and course ID are required.\n Mode is optional. It defaults to the default mode (e.g., 'honor', 'audit', etc).\n\n example:\n # Enroll a user test@example.com into the demo course\n manage.py ... enroll_user_in_course -e test@example.com -c edX/Open_DemoX/edx_demo_course\n\n This command can be run multiple times on the same user+course (i.e. it is idempotent).\n "#