<commit_before>Open Response Assessment |build-status| |coverage-status|
=========================================================

User docs: |user-docs| Developer docs: |dev-docs|


Installation
============

The intent of this project is to be installed as Django apps that will be
included in `edx-platform <https://github.com/edx/edx-platform>`_.

To install all dependencies (assumes Ubuntu 12.04):

.. code:: bash

    make install


Running the Development Server
==============================

.. code:: bash

    ./scripts/workbench.sh

Additional arguments are passed to ``runserver``.  For example,
to start the server on port 8001:

.. code:: bash

    ./scripts/workbench.sh 8001


Combining and Minifying JavaScript and Sass
============================================

To reduce page size, the OpenAssessment XBlock serves combined/minified
versions of JavaScript and CSS.  This combined/minified files are checked
into the git repository.

If you modify JavaScript or Sass, you MUST regenerate the combined/minified
files:

.. code:: bash

    # Combine/minify JavaScript
    make javascript
<commit_msg>Updated README with instructions for setting up a Vagrant instance.<commit_after>Open Response Assessment |build-status| |coverage-status|
=========================================================

User docs: |user-docs| Developer docs: |dev-docs|


Installation
============

The intent of this project is to be installed as Django apps that will be included in `edx-platform <https://github.com/edx/edx-platform>`_.

But development is done in the Workbench which is part of the `xblock-sdk <https://github.com/edx/xblock-sdk>`_. Currently Ubuntu 12.04 is assumed. You can setup everything in a Vagrant instance.

To do so install the latest VirtualBox >= 4.3.12 and the latest Vagrant >= 1.6.5.

Clone the repo:

.. code:: bash

    mkdir orastack
    cd orastack
    git clone <EMAIL>:edx/edx-ora2.git

Create the Vagrant instance:

.. code:: bash

    ln -s ./edx-ora2/Vagrantfile ./
    vagrant plugin install vagrant-vbguest
    vagrant up

The first vagrant up will fail when setting up shared folders (because the user ora2 does not exist) so do:

.. code:: bash

    vagrant provision
    vagrant reload

Now you can ssh into the vagrant machine:

.. code:: bash

    vagrant ssh
    sudo su ora2

To install all dependencies:

.. code:: bash
    make install


Running the Development Server
==============================

.. code:: bash

    ./scripts/workbench.sh

Additional arguments are passed to ``runserver``.  For example,
to start the server on port 8001:

.. code:: bash

    ./scripts/workbench.sh 9001


Combining and Minifying JavaScript and Sass
============================================

To reduce page size, the OpenAssessment XBlock serves combined/minified
versions of JavaScript and CSS.  This combined/minified files are checked
into the git repository.

If you modify JavaScript or Sass, you MUST regenerate the combined/minified
files:

.. code:: bash

    # Combine/minify JavaScript
    make javascript

{'fraction_non_alphanumeric': 0.16150081566068517, 'fraction_numerical': 0.011419249592169658, 'mean_word_length': 3.993485342019544, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3538625', 'n_tokens_mistral': 903, 'n_tokens_neox': 809, 'n_words': 344}