Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • list all manage.py commandssudo -u www-data

source /edx/app/

...

edxapp/

...

edxapp_env
python /edx/app/edxapp/edx-platform/manage.py lms --settings production help

  • create a final grade and generate a certificate for a single usersudo -u www-data

source /edx/app/

...

edxapp/

...

edxapp_env

python /edx/app/edxapp/edx-platform/manage.py lms --settings production regenerate_user -u honor@example.com -c edX/Open_DemoX/edx_demo_course

  • create or upgrade a user to superuser

    • Execute the following commands (updating the username and email account appropriately)

      Code Block
      languagetext
      sudo su edxapp -s /bin/bash
      cd
      source edxapp_env
      /edx/bin/python.edxapp /edx/bin/manage.edxapp lms manage_user staff staff@example.com --staff --superuser --settings=production


    • See also Creating an admin user in LMS/CMS, which is written for devstack

  • set or change password sudo -u www-data

source /edx/app/

...

edxapp/

...

edxapp_env
python /edx/app/edxapp/edx-platform/manage.py lms --settings production changepassword user


  • launch the django shell sudo -u www-data

source /edx/

...

app/edxapp/edxapp_env
python /edx/app/edxapp/edx-platform/manage.py lms --settings production shell

  • importing a course from github

Example using the demo course

...

cd

...

/var/tmp

...

git

...

clone

...

https://github.com/edx/edx-demo-course.git

...


source /edx/app/edxapp/

...

edxapp_env
python /edx/

...

app/

...

edxapp/edx-platform/manage.py

...

cms

...

--settings=production

...

import

...

/edx/var/edxapp/data

...

/var/tmp/edx-demo-course

...



  • run migrations

    sudo su edxapp -s /bin/bash cd ~ source edxapp_env python


cd /var/tmp git clone https://github.com/edx/edx-demo-course.git
source /edx/app/edxapp/edxapp_env
python /edx/app/edxapp/edx-platform/manage.py

...

{lms/cms}

...

syncdb

...

--settings=production

...



  • delete course 

          sudo -u www-data

source /edx/

...

app/edxapp/edxapp_env
python /edx/app/edxapp/edx-platform/
manage.py cms --settings=production delete_course Organization/CourseNumber/CourseRun 


  • delete course in Cypress version  
          sudo -u www-data

source /edx/app/

...

edxapp/

...

edxapp_env
python /edx/app/edxapp/edx-platform/manage.py cms --settings=production delete_course course-v1:Organization+CourseNumber+CourseRun commit


See help and help <cmd> for more information!

...

  • Launch the lms using the debug server
cdsource /edx/app/edxapp/edx-platform
sudo -u www-data edxapp_env
python /edx/binapp/python.edxapp .edxapp/edx-platform/manage.py lms runserver 8000 --settings production

...

# Generate or regenerate a certificate for a single user in a course

sudo -u www-datasource /edx/app/edxapp/edxapp_env
python /edx/binapp/python.edxapp .edxapp/edx-platform/manage.py lms --settings production regenerate_user -u honor@example.com -c edX/Open_DemoX/edx_demo_course --insecure

# Grade and generate certs for all users in a course
sudo -u www-data
source /edx/app/edxapp/edxapp_env
python /edx/binapp/python.edxapp .edxapp/edx-platform/manage.py lms --settings production ungenerated_certs -c edX/Open_DemoX/edx_demo_course --insecure

...