$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Suppose you've made some changes to the course embargo feature and you want to see if it still works. Try these steps:

  1. SSH into the sandbox and connect to the sandbox MySQL DB using the information in lms.auth.json.

  2. Issue this SQL: 

    1. To allow the "staff" user to access the Django admin interface:
      1. update auth_user set is_superuser=1 where username='staff';
    2. To allow the "staff" user to access the embargo models:
      1. insert into auth_user_user_permissions (user_id, permission_id) VALUES (5, 497), (5,498), (5,499),(5,500),(5,501),(5,502),(5,503),(5,504),(5,506),(5,507),(5,508),(5,509),(5,510),(5,511),(5,512),(5,513),(5,514),(5,515),(5,516),(5,517),(5,518);
  3. Login as "staff@example.com" and go to the admin interface here:
    http://your_sandbox.sandbox.edx.org/admin/embargo/

  4. Add a course restriction in the admin interface for a course (like the demo course). The course key should be in this format: course-v1:edX+DemoX+Demo_Course

  5. Add a country access rule, picking a random "CountryX" to embargo.
  6. Modify lms.env.json to add the following line in the FEATURES section of the Django settings:
    1. "EMBARGO": true,
  7. Restart the LMS/CMS as your user (*not* edxapp) while SSH-ed into the sandbox:
    1. sudo /edx/bin/supervisorctl restart edxapp:*
  8. Login to the LMS as "honor@example.com" and set your country of origin to "CountryX".
  9. Ensure that you cannot access the embargoed course.
  • No labels