Management Commands in CMS and LMS
CMS:
Sr. # | Management Command | Description |
---|---|---|
1 | xlint | Verify the structure of courseware as to its suitability for import. |
2 | export | Export the specified course into a directory |
3 | import | Import the specified data directory into the default ModuleStore. |
4 | export_olx | Export a course to XML. The output is compressed as a tar.gz file. |
5 | git_export | Take the specified course and attempt to export it to a git repository.Course directory must already be a git repository. Usage: git_exportĀ <course_loc> <git_url> |
6 | sync_courses | Command to populate modulestore with courses from the discovery service. |
7 | create_course | Create a course in one of ['mongo', 'split'] |
8 | delete_course | Delete a MongoDB backed course |
9 | fix_not_found | Fix a course's ItemNotFound errors |
10 | force_publish | Force publish a course. Takes two arguments: <course_id>: the course id of theĀ course you want to publish forcefully --commit: do the force publish If you doĀ not specify '--commit', the command will print out what changes would be made. |
11 | cleanup_assets | Remove all Mac OS related redundant file/files for all courses in contentstore |
12 | delete_orphans | Delete orphans from a MongoDB backed course. |
13 | reindex_course | Command to re-index courses. |
14 | clean_cert_name | Allows manual clean-up of invalid cert_name_short and cert_name_long entriesĀ on CourseModules |
15 | reindex_library | Command to reindex content libraries (single, multiple or all available) |
16 | edit_course_tabs | See and edit a course's tabs list. Only supports insertion and deletion. MoveĀ and rename etc. can be done with a delete followed by an insert. |
17 | generate_courses | Generate courses on studio from a json list of courses |
18 | migrate_to_split | Migrate a course from old-Mongo to split-Mongo. |
19 | video_thumbnails | Adds thumbnails from YouTube to videos. |
20 | export_all_courses | Export all courses from mongo to the specified data directory and list theĀ courses which failed to export. |
21 | migrate_transcripts | Migrates transcripts to S3 for one or more courses. |
22 | empty_asset_trashcan | Empty the trashcan. Can pass an optional course_id to limit the damage. |
23 | export_content_library | Export the specified content library into a directory. |
24 | import_content_library | Import the specified content library into mongo. |
25 | restore_asset_from_trashcan | Restore a deleted asset from the trashcan back to it's original course |
LMS:
Sr.# | Management Command | Description |
---|---|---|
8 | configure_commerce | Enable/Disable commerce configuration, including configuration of E-CommerceĀ checkout. |
9 | clean_xml | Imports specified course, validates it, then exports it in a canonical format. |
10 | dump_course_ids | Dump the course_ids available to the lms. Output is UTF-8 encoded by default. |
11 | dump_course_structure | Dump the structure of a course as a JSON object. The resulting JSON object hasĀ one entry for each module in the course |
12 | import | Import the specified data directory into the default ModuleStore. |
13 | git_add_course | Import the specified git repository and optional branchĀ into the modulestore and optionally specified directory. |
14 | dump_xml_courses | Dump the in-memory representation of all xml courses in a diff-able format. |
15 | assign_role | Assign a discussion forum role to a user. |
16 | assign_roles_for_course | Add roles for all users in a course. |
17 | create_roles_for_existing | Seed default permisssions and roles. |
18 | get_discussion_link | Write a discussion link for a given course on standard output. |
19 | reload_forum_users | Reload forum (comment client) users from existing users. |
20 | seed_permissions_roles | Seed default permisssions and roles. |
21 | show_permissions | Show a user's roles and permissions. |
22 | sync_user_info | Sync all user ids, usernames, and emails to the discussion service. |
23 | compute_grades | Computes grade values for all learners in specified courses. |
24 | recalculate_learner_grades | Recalculates a user's grades for a course, for every user in a csv of (user,Ā course) pairs. |
25 | recalculate_subsection_grades | Recalculates subsection grades for all subsections modified within the givenĀ time range. |
26 | fail_old_tasks | Command to manually fail old "QUEUING" or "PROGRESS" tasks in the instructor task table. |
27 | resend_lti_scores | Send all lti scores for the requested courses to the registered consumers. If no arguments are provided, send all scores for all courses. |
28 | mailchimp_id | Get the list id from a web_id. |
29 | mailchimp_sync_announcements | Synchronizes the announcement list with all active students. |
30 | mailchimp_sync_course | Synchronizes a mailchimp list with the students of a course. |
31 | expire_waiting_enrollments | Remove expired enrollments that have not been linked to a user. |
32 | reset_enrollment_data | Deletes all enrollments and related data. |
33 | retire_order | Retire orders that went through cybersource but weren't updated appropriatelyĀ in the db. Takes a file of orders to be retired, one order per line |
34 | reindex_course_team | Reindex course_teams (single, multiple or all available). |
35 | delete_historical_verify_student_data | Deletes all historical VerificationDeadline rows (in chunks). |
36 | manual_verifications | Manually verifies one or more users passed as an argument list. |
37 | populate_expiry_date | Populate expiry_date for approved verifications |
38 | retry_failed_photo_verifications | Retries SoftwareSecurePhotoVerifications passed as arguments, or if noĀ arguments are supplied, all that are in a state of 'must_retry' |
39 | send_verification_expiry_email | Send email to users for which Software Secure Photo Verification has expired. |
Common:
Sr.# | Management Command | Description |
---|---|---|
1 | tracked_dummy_command | A locally-defined command, for testing, that returns the current context as a JSON string. |
2 | set_staff | This command will set is_staff to true for one or more users. Lookup byĀ username or email address, assumes usernames do not look like email addresses. |
3 | create_user | This command creates and registers a user in a given course as "audit",Ā "verified" or "honor". |
4 | manage_user | Creates the specified user, if it does not exist, and sets its groups. |
5 | add_to_group | Add a user to a group. |
6 | assigngroups | Assign users to test groups. |
7 | manage_group | Creates the specified group, if it does not exist, and sets its permissions. |
8 | bulk_unenroll | Un-enroll bulk users from the courses. It expect that the data will beĀ provided in a csv file format. |
9 | set_superuser | This command will set is_superuser to true for one or more users. Lookup byĀ username or email address, assumes usernames do not look like email addresses. |
11 | change_enrollment | Changes the enrollment status for students that meet the criteria specified byĀ the parameters to this command. |
12 | transfer_students | Transfer students enrolled in one course into one or more other courses. ThisĀ will remove them from the first course. Their enrollment mode (i.e. honor,Ā verified, audit, etc.) will persist into the other course(s). |
13 | create_random_users | Create N new users, with random parameters. |
14 | anonymized_id_mapping | Export a CSV mapping usernames to anonymized ids Exports a CSV documentĀ mapping each username in the specified course to the anonymized, unique userĀ ID. |
15 | bulk_change_enrollment | Change the enrollment status for all users enrolled in a particular mode for aĀ course. Similar to the change_enrollment script, but more useful for bulkĀ moves. |
16 | bulk_change_enrollment_csv | Change the enrollment status of all the users specified in the csv file in theĀ specified course to specified course mode. Could be used to update effectedĀ users by order placement issues. If large number of students are effected inĀ different courses. Similar to bulk_change_enrollment but uses the csv fileĀ input format and can enroll students in multiple courses. |
17 | change_eligibility_deadline | Changes the credit course eligibility deadline for a student in a particularĀ course. It can be used to update the expired deadline to make student creditĀ eligible. |
18 | change_enterprise_user_username | Update the username of a given user. |
19 | delete_historical_enrollment_data | Deletes all historical CourseEnrollment rows (in chunks). |
20 | populate_created_on_site_user_attribute | This command back-populates domain of the site the user account was created on. |
21 | saml | Configure/maintain/update SAML-based SSO |
22 | ensure_indexes | Creates the indexes for ContentStore and ModuleStore databases. |
23 | expire_old_entitlements | Management command for expiring old entitlements. Most entitlements getĀ expired as the user interacts with the platform, because the LMS checks as itĀ goes. But if the learner has not logged in for a while, we still want to reapĀ these old entitlements. So this command should be run every now and thenĀ (probably daily) to expire old entitlements. The command's goal is to pass aĀ narrow subset of entitlements to an idempotent Celery task for furtherĀ (parallelized) processing. |
24 | delete_historical_microsite_data | Deletes all historical MicrositeOrganizationMapping and MicrositeTemplate rows. |
25 | clear_collectstatic_cache | Empties the Django caches["staticfiles"] cache. |
Openedx:
Sr.# | Management Command | Description |
---|---|---|
1 | create_api_access_request | Create an ApiAccessRequest for the given user |
2 | delete_historical_api_admin_data | Deletes all historical ApiAccessRequest rows. |
3 | cache_programs | Rebuild the LMS' cache of program data. |
4 | create_catalog_integrations | Create catalog integration record in LMS |
5 | sync_course_runs | Refresh marketing urls from catalog service. |
6 | generate_course_blocks | Generates and stores course blocks for one or more courses |
7 | generate_course_overview | Generates and stores course overview for one or more courses. |
8 | simulate_publish | Simulate course publish signals without actually modifying course content.Ā This command is useful for triggering various async tasks that listen forĀ course_published signals. |
9 | dump_to_neo4j | Command to dump modulestore data to neo4j. |
10 | notify_credentials | Simulate certificate/grade changes without actually modifying databaseĀ content. Specifically, trigger the handlers that send data to Credentials. |
11 | delete_historical_credit_data | Deletes all historical CreditRequest and CreditRequirementStatus rows. |
12 | enroll_user_in_course | This enrolls a user into a given course User email and course ID are required.Mode is optional. It defaults to the default mode (e.g., 'honor', 'audit'Ā etc). |
13 | create_dot_application | Creates a Django OAuth Toolkit (DOT) Application Instance. |
14 | edx_clear_expired_tokens | Clear expired access tokens and refresh tokens for Django OAuth Toolkit |
15 | generate_jwt_signing_key | Generates an asymmetric keypair to sign JSON Web Tokens. Outputs theĀ generated public and private keys in YAML format as required by Open edXĀ configuration settings. |
17 | send_course_update | Command to send Schedule course updates. |
18 | send_recurring_nudge | Command to send recurring Schedule nudges. |
19 | send_upgrade_reminder | Command to send Schedule upgrade reminders |
20 | setup_models_to_send_test_emails | A management command that generates schedule objects for all expected scheduleĀ email types, so that it is easy to generate test emails of all available types. |
21 | create_sites_and_configurations | Command to create the site, site themes, configuration and oauth2 clients forĀ all WL-sites. |
22 | compile_sass | Compile and collect themed assets. |
23 | create_site_configuration | Command to create a configuration for a single site. If the site does not already exist one will be created. |
24 | bulk_user_org_email_optout | Opts-out every specified user/org combo row from email by setting the 'email-optin' tag to 'False'. If the user/org combo does not currently exist in the table, a row will be created for it which will be have the 'email-optin' tag set to 'False'. |
25 | cancel_user_retirement_request | Cancels the retirement of a user who has requested retirement - but has notĀ yet been retired. |
26 | create_user_gdpr_testing | Create a user with GDPR P1 PII for manual testing. Enrolls the user in theĀ DemoX course. Optionally takes in username, email, and course UUID arguments. |
27 | email_opt_in_list | Generate a list of email opt-in values for user enrollments. |
28 | migrate_user_profile_langs | Migrate all user language preferences (excluding dark languages) from oneĀ language code to another. |
29 | populate_retirement_states | Populates the RetirementState table with the states present in settings. |
30 | sync_hubspot_contacts | Command to create contacts in hubspot for those partner who has enabledĀ hubspot integration. This command is suppose to sync contact with hubspot onĀ daily basis. |
31 | print_setting | Print the value of a single Django setting. |
32 | reset_db | Resets the database for this project. |
33 | update_fixtures | Update fixtures to match the current test environment. |
34 | swap_from_auto_track_cohort_pilot | Migrates a course's xblock's group_access from Verified Track Cohorts to Enrollment Tracks. |
35 | create_video_pipeline_integration | Creates the video pipeline integration record. |
36 | cdl_setup_models_to_send_test_emails | Command that generates schedule objects for all expected course duration limit email types, so that it is easy to generate test emails of all available types. |
37 | send_access_expiry_reminder | Send out reminder emails for any students who will lose access to course content in 7 days. |