Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pdpinch
Last active December 23, 2015 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdpinch/961183685da2291f230e to your computer and use it in GitHub Desktop.
Save pdpinch/961183685da2291f230e to your computer and use it in GitHub Desktop.
Enabling CCX in devstack ca. 10/2015

Starting with a fresh install of devstack,

  1. Create a private.py for cms (edx-platform/cms/envs/private.py) with the following lines:
from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import

FEATURES['CUSTOM_COURSES_EDX'] = True
  1. Create a private.py for lms (edx-platform/lms/envs/private.py) with the following lines:

from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import

FEATURES['CUSTOM_COURSES_EDX'] = True

Custom Courses for EdX

if FEATURES.get('CUSTOM_COURSES_EDX'): INSTALLED_APPS += ('ccx',) FIELD_OVERRIDE_PROVIDERS += ( 'ccx.overrides.CustomCoursesForEdxOverrideProvider', )


3. As the edxapp user in vagrant, run `paver update_db`

The output put should include something like the following:

Running migrations for ccx:

  • Migrating forwards to 0002_convert_memberships.

ccx:0001_initial ccx:0002_convert_memberships

  • Migration 'ccx:0002_convert_memberships' is marked for no-dry-run.
  • Loading initial data for ccx.
    
    
  1. Start the servers with paver run_all_servers

  2. Continue with the user instructions at http://edx.readthedocs.org/projects/open-edx-building-and-running-a-course/en/latest/building_course/custom_courses.html

@jamiefolsom
Copy link

Thanks, @pdpinch Might not matter, but I have been running paver update_db (with an '_' rather than a '-'). Otherwise, your steps are ones that worked for me too.

@pwilkins
Copy link

@pdpinch The Python code in step 2 needs proper indenting for easy copy-and-paste.

##### Custom Courses for EdX #####
if FEATURES.get('CUSTOM_COURSES_EDX'):
    INSTALLED_APPS += ('ccx',)
FIELD_OVERRIDE_PROVIDERS += (
    'ccx.overrides.CustomCoursesForEdxOverrideProvider',
)

@justinabrahms
Copy link

path listing in the description for step 2 should be lms, not cms.

You need to pass --settings=private to the paver command.

@justinabrahms
Copy link

Devstack includes its own modifications to INSTALLED_APPS so we should probably drop this line from private.py from .common import INSTALLED_APPS, MIDDLEWARE_CLASSES. With that in there, I was getting failures about not being able to find the necessary templates for debug_toolbar

@pdpinch
Copy link
Author

pdpinch commented Oct 27, 2015

Fixed the paver command. Thanks @jamiefolsom

@pdpinch
Copy link
Author

pdpinch commented Oct 27, 2015

@pwilkins, I believe I fixed the indentation. Markdown is messing with my whitespace

@pdpinch
Copy link
Author

pdpinch commented Oct 27, 2015

@justinabrahms I fixed the path

I tested removing the from .common import line from both private.py files and it worked for me. On the theory that smaller is better, I removed it.

I've never had to add the --settings switch. I'll do some more experimenting with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment