edx-platform - How to enable EDX-SGA xblock

To enable Staff Graded Assignment xblock in your Open EdX instance:

1. Install EDX-SGA:

* Install sga to edx-platform:


  • sudo -H -u edxapp bash
  • source /edx/app/edxapp/edxapp_env
  • cd /edx/app/edxapp/venvs/edxapp/src
  • git clone https://github.com/mitodl/edx-sga
  • cd edx-sga
  • python setup.py install 
  • cp -R templates/ /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edx_sga-0.2.0-py2.7.egg/


  • * Add 'edx_sga' to INSTALLED_APPS in cms/env/common.py and lms/env/common.py


    * Migrate the db:

    • LMS: sudo -u www-data /edx/bin/python.edxapp ./manage.py lms syncdb --migrate --settings aws
    • CMS: sudo -u www-data /edx/bin/python.edxapp ./manage.py cms syncdb --migrate --settings aws


    2. In edx-platform/cms/envs/common.py and edx-platform/lms/envs/common.py, uncomment: 

    # from xmodule.x_module import prefer_xmodules  
    # XBLOCK_SELECT_FUNCTION = prefer_xmodules 

    3. In edx-platform/cms/envs/common.py, change:

    'ALLOW_ALL_ADVANCED_COMPONENTS': False,

    to:

    'ALLOW_ALL_ADVANCED_COMPONENTS': True,


    4. Add the block to your courses’ advanced settings in Studio

    * Log in to Studio, and open your course
    * Settings -> Advanced Settings
    * Change the value for the key "advanced_modules" to ["your-block"]
      
    5. Add your block into your course

    * Edit a unit
    * Advanced -> Staff Graded Assignment








    Reference:

    [0] https://groups.google.com/d/msg/edx-code/fkrtwE2G2mw/Ng1vKSYajH8J
    [1] http://userdocs.readthedocs.org/en/latest/xblocks.html

    Comments