README.rst 4.27 KB
Newer Older
1 2
Open Response Assessment |build-status| |coverage-status|
=========================================================
3

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

6

7 8 9
Installation
============

10
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>`_.
11

12 13 14 15 16
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:
17 18 19

.. code:: bash

20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    mkdir orastack
    cd orastack
    git clone git@github.com: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
49

50
    make install-sys-requirements
51
    make install
52
    make install-dev
53

54

55 56
Running the Development Server
==============================
57

58
.. code:: bash
59

60
    ./scripts/workbench.sh
61

62
Additional arguments are passed to ``runserver``.  For example,
63
to start the server on port 9000:
64 65

.. code:: bash
66

67
    ./scripts/workbench.sh 0.0.0.0:9000
68 69


70
Combining and Minifying JavaScript and Sass
71 72 73 74 75 76 77 78 79 80 81 82
============================================

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
83
    make javascript
84 85 86 87 88 89 90

    # Combine/minify CSS (from Sass)
    ./scripts/sass.sh

Make sure you commit the combined/minified files to the git repository!


91 92 93
Running Tests
=============

94
To run all tests:
95 96 97

.. code:: bash

98
    make test
99

Will Daly committed
100
To limit Python tests to a particular module:
101 102 103

.. code:: bash

Will Daly committed
104
    ./scripts/test-python.sh openassessment/xblock/test/test_openassessment.py
105

106 107 108 109
To run just the JavaScript tests:

.. code:: bash

110
    ./scripts/test-js.sh
111 112 113 114 115 116 117

To run the JavaScript tests in Chrome so you can use the debugger:

.. code:: bash

    ./scripts/js-debugger.sh

118

119 120 121
i18n
====

122
You will need to:
123

124 125 126 127 128 129 130 131 132 133 134
1. Install `i18n-tools <https://github.com/edx/i18n-tools>`_.
2. Configure Transifex, as described in the `docs <http://docs.transifex.com/developer/client/setup>`_.
3. Install `gettext <http://www.gnu.org/software/gettext/>`_.

To extract strings and push to Transifex

.. code:: bash

    ./scripts/i18n-push.sh

To pull strings from Transifex
135 136 137

.. code:: bash

138
    ./scripts/i18n-pull.sh
139 140


141 142 143 144 145 146 147 148 149 150 151
License
=======

The code in this repository is licensed under version 3 of the AGPL unless
otherwise noted.

Please see ``LICENSE.txt`` for details.

How to Contribute
=================

152
Contributions are very welcome. The easiest way is to fork this repo, and then make a pull request from your fork. The first time you make a pull request, you may be asked to sign a Contributor Agreement.
153 154 155 156 157 158 159 160 161 162 163 164

Reporting Security Issues
=========================

Please do not report security issues in public. Please email security@edx.org

Mailing List and IRC Channel
============================

You can discuss this code on the
`edx-code Google Group <https://groups.google.com/forum/#!forum/edx-code>`_ or
in the `edx-code` IRC channel on Freenode.
165 166 167 168 169 170 171

.. |build-status| image:: https://travis-ci.org/edx/edx-ora2.png?branch=master
   :target: https://travis-ci.org/edx/edx-ora2
   :alt: Travis build status
.. |coverage-status| image:: https://coveralls.io/repos/edx/edx-ora2/badge.png?branch=master
   :target: https://coveralls.io/r/edx/edx-ora2?branch=master
   :alt: Coverage badge
172 173 174 175 176 177
.. |user-docs| image:: https://readthedocs.org/projects/edx-open-response-assessments/badge/?version=latest
   :target: http://edx.readthedocs.org/projects/edx-open-response-assessments
   :alt: User documentation
.. |dev-docs| image:: https://readthedocs.org/projects/edx-ora-2/badge/?version=latest
   :target: http://edx.readthedocs.org/projects/edx-ora-2
   :alt: Developer documentation