Commit 6814e508 by Will Daly

Merge branch 'master' into ai-grading

parents e932fa9b acc5b079
......@@ -75,13 +75,13 @@ To limit Python tests to a particular Django app:
.. code:: bash
./scripts/test.sh openassessment.xblock
./scripts/test-python.sh openassessment.xblock
To run just the JavaScript tests:
.. code:: bash
npm test
./scripts/test-js.sh
To run the JavaScript tests in Chrome so you can use the debugger:
......
......@@ -37,7 +37,11 @@ class StaffInfoMixin(object):
status_counts, num_submissions = self.get_workflow_status_counts()
context['status_counts'] = status_counts
context['num_submissions'] = num_submissions
context['item_id'] = student_item["item_id"]
# We need to display the new-style locations in the course staff
# info, even if we're using old-style locations internally,
# so course staff can use the locations to delete student state.
context['item_id'] = unicode(self.scope_ids.usage_id)
# Include release/due dates for each step in the problem
context['step_dates'] = list()
......@@ -127,4 +131,4 @@ class StaffInfoMixin(object):
criterion["total_value"] = max_scores[criterion["name"]]
path = 'openassessmentblock/staff_debug/student_info.html'
return path, context
\ No newline at end of file
return path, context
#!/usr/bin/env bash
cd `dirname $BASH_SOURCE` && cd ..
STATIC_JS="apps/openassessment/xblock/static/js"
echo "Installing Node requirements..."
if [ -z `which npm` ]; then
echo "Please install NodeJS: http://nodejs.org/"
exit 1
fi
npm config set loglevel warn
npm install
echo "Minimizing XBlock JavaScript..."
echo "(set DEBUG_JS=1 to preserve indentation and line breaks)"
if [[ -n "$DEBUG_JS" ]]; then
UGLIFY_EXTRA_ARGS="--beautify"
fi
node_modules/.bin/uglifyjs $STATIC_JS/src/oa_shared.js $STATIC_JS/src/*.js $UGLIFY_EXTRA_ARGS > "$STATIC_JS/openassessment.min.js"
#!/usr/bin/env bash
cd `dirname $BASH_SOURCE` && cd ..
STATIC_JS="apps/openassessment/xblock/static/js"
if [[ -n "$1" ]]; then
REQS="$1"
else
REQS="dev"
fi
echo "Installing Python requirements..."
pip install -q -r requirements/$REQS.txt
echo "Installing XBlock..."
pip install -q -e .
#!/usr/bin/env bash
cd `dirname $BASH_SOURCE` && cd ..
STATIC_JS="apps/openassessment/xblock/static/js"
if [[ -n "$1" ]]; then
REQS="$1"
else
REQS="dev"
fi
echo "Installing Python requirements..."
pip install -q -r requirements/$REQS.txt
echo "Installing XBlock..."
pip install -q -e .
echo "Installing Node requirements..."
if [ -z `which npm` ]; then
echo "Please install NodeJS: http://nodejs.org/"
exit 1
fi
npm config set loglevel warn
npm install
echo "Minimizing XBlock JavaScript..."
echo "(set DEBUG_JS=1 to preserve indentation and line breaks)"
if [[ -n "$DEBUG_JS" ]]; then
UGLIFY_EXTRA_ARGS="--beautify"
fi
node_modules/.bin/uglifyjs $STATIC_JS/src/oa_shared.js $STATIC_JS/src/*.js $UGLIFY_EXTRA_ARGS > "$STATIC_JS/openassessment.min.js"
./scripts/install-python.sh
./scripts/install-js.sh
#!/usr/bin/env bash
cd `dirname $BASH_SOURCE` && cd ..
./scripts/install-js.sh
echo "Generating HTML fixtures for JavaScript tests..."
export DJANGO_SETTINGS_MODULE="settings.test"
./scripts/render_templates.py apps/openassessment/xblock/static/js/fixtures/templates.json
echo "Running JavaScript tests..."
npm test
#!/usr/bin/env bash
cd `dirname $BASH_SOURCE` && cd ..
./scripts/install-python.sh test
echo "Running Python tests..."
export DJANGO_SETTINGS_MODULE="settings.test"
python manage.py test $1
......@@ -4,14 +4,5 @@
set -e
cd `dirname $BASH_SOURCE` && cd ..
./scripts/install.sh test
echo "Running Python tests..."
export DJANGO_SETTINGS_MODULE="settings.test"
python manage.py test $1
echo "Generating HTML fixtures for JavaScript tests..."
./scripts/render_templates.py apps/openassessment/xblock/static/js/fixtures/templates.json
echo "Running JavaScript tests..."
npm test
./scripts/test-python.sh
./scripts/test-js.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment