Commit 60cbce58 by Will Daly

Merge branch 'master' into ai-grading

Conflicts:
	README.rst
parents c2155896 5f1184ae
...@@ -32,9 +32,6 @@ nosetests.xml ...@@ -32,9 +32,6 @@ nosetests.xml
htmlcov htmlcov
coverage.xml coverage.xml
# Translations
*.mo
# Mr Developer # Mr Developer
.mr.developer.cfg .mr.developer.cfg
.project .project
......
...@@ -7,3 +7,4 @@ Brian Talbot <btalbot@edx.org> ...@@ -7,3 +7,4 @@ Brian Talbot <btalbot@edx.org>
Mark Hoeber <hoeber@edx.org> Mark Hoeber <hoeber@edx.org>
Sylvia Pearce <spearce@edx.org> Sylvia Pearce <spearce@edx.org>
Ned Batchelder <ned@nedbatchelder.com> Ned Batchelder <ned@nedbatchelder.com>
David Baumgold <david@davidbaumgold.com>
include requirements/*.txt include requirements/*.txt
recursive-include apps/openassessment/templates *.html recursive-include apps/openassessment/templates *.html
recursive-include apps/openassessment/xblock/static * recursive-include apps/openassessment/xblock/static *
recursive-include apps/openassessment/locale *.po
recursive-include apps/openassessment/locale *.mo
include LICENSE include LICENSE
include AUTHORS include AUTHORS
include README.rst include README.rst
...@@ -112,6 +112,7 @@ Disable quality violations on a line or file: ...@@ -112,6 +112,7 @@ Disable quality violations on a line or file:
# pylint: disable=W0123,E4567 # pylint: disable=W0123,E4567
<<<<<<< HEAD
Vagrant Vagrant
======= =======
...@@ -154,6 +155,26 @@ To use the tool, visit: `http://192.168.44.10:5555 <http://192.168.44.10:5555>`_ ...@@ -154,6 +155,26 @@ To use the tool, visit: `http://192.168.44.10:5555 <http://192.168.44.10:5555>`_
The log files from the Vagrant VM are located in ``edx-ora2/logs/vagrant``, which is shared with the host machine. The log files from the Vagrant VM are located in ``edx-ora2/logs/vagrant``, which is shared with the host machine.
i18n
====
You will need to install `getttext <http://www.gnu.org/software/gettext/>`_.
To extract strings and compile messages:
.. code:: bash
python manage.py makemessages -l en
python manage.py makemessages -d djangojs -l en
python manage.py compilemessages
Generate dummy strings for testing:
.. code:: bash
i18n_tool dummy
License License
======= =======
......
# Configuration for i18n workflow.
locales:
- en # English - Source Language
- ar # Arabic
- az # Azerbaijani
- bg_BG # Bulgarian (Bulgaria)
- bn_BD # Bengali (Bangladesh)
- bn_IN # Bengali (India)
- bs # Bosnian
- ca # Catalan
- ca@valencia # Catalan (Valencia)
- cs # Czech
- cy # Welsh
- da # Danish
- de_DE # German (Germany)
- el # Greek
- en@lolcat # LOLCAT English
- en@pirate # Pirate English
- es_419 # Spanish (Latin America)
- es_AR # Spanish (Argentina)
- es_EC # Spanish (Ecuador)
- es_ES # Spanish (Spain)
- es_MX # Spanish (Mexico)
- es_PE # Spanish (Peru)
- et_EE # Estonian (Estonia)
- eu_ES # Basque (Spain)
- fa # Persian
- fa_IR # Persian (Iran)
- fi_FI # Finnish (Finland)
- fr # French
- gl # Galician
- gu # Gujarati
- he # Hebrew
- hi # Hindi
- hr # Croatian
- hu # Hungarian
- hy_AM # Armenian (Armenia)
- id # Indonesian
- it_IT # Italian (Italy)
- ja_JP # Japanese (Japan)
- kk_KZ # Kazakh (Kazakhstan)
- km_KH # Khmer (Cambodia)
- kn # Kannada
- ko_KR # Korean (Korea)
- lt_LT # Lithuanian (Lithuania)
- ml # Malayalam
- mn # Mongolian
- ms # Malay
- nb # Norwegian Bokmål
- ne # Nepali
- nl_NL # Dutch (Netherlands)
- or # Oriya
- pl # Polish
- pt_BR # Portuguese (Brazil)
- pt_PT # Portuguese (Portugal)
- ro # Romanian
- ru # Russian
- si # Sinhala
- sk # Slovak
- sl # Slovenian
- th # Thai
- tr_TR # Turkish (Turkey)
- uk # Ukranian
- ur # Urdu
- vi # Vietnamese
- zh_CN # Chinese (China)
- zh_TW # Chinese (Taiwan)
# The locales used for fake-accented English, for testing.
dummy_locales:
- eo
- fake2
# Directories we don't search for strings.
ignore_dirs:
- docs
- logs
- node_modules
- performance
- requirements
- scripts
- settings
- storage
# edX translation file.
# Copyright (C) 2014 EdX
# This file is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.
# EdX Team <info@edx.org>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-05 06:31-0400\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_base.js:151
msgid "Unable to Load"
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_edit.js:81
msgid ""
"This problem has already been released. Any changes will apply only to "
"future assessments."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:174
msgid "Status of Your Response"
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:277
msgid "This response has not been saved."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:295
msgid "Saving..."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
msgid "This response has been saved but not submitted."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:316
msgid "Error"
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:59
#: apps/openassessment/xblock/static/js/src/oa_server.js:90
#: apps/openassessment/xblock/static/js/src/oa_server.js:109
msgid "This section could not be loaded."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:144
msgid "This response could not be submitted."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:170
msgid "This response could not be saved."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:207
msgid "This feedback could not be submitted."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:253
#: apps/openassessment/xblock/static/js/src/oa_server.js:293
#: apps/openassessment/xblock/static/js/src/oa_server.js:334
msgid "This assessment could not be submitted."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:362
msgid "This problem could not be loaded."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:391
msgid "This problem could not be saved."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:421
msgid "The server could not be contacted."
msgstr ""
# edX translation file.
# Copyright (C) 2014 EdX
# This file is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.
# EdX Team <info@edx.org>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-05 06:31-0400\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_base.js:151
msgid "Unable to Load"
msgstr "Ûnäßlé tö Löäd Ⱡ'#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_edit.js:81
msgid ""
"This problem has already been released. Any changes will apply only to "
"future assessments."
msgstr ""
"Thïs prößlém häs älréädý ßéén réléäséd. Àný çhängés wïll äpplý önlý tö "
"fütüré ässéssménts. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:174
msgid "Status of Your Response"
msgstr "Stätüs öf Ýöür Réspönsé Ⱡ'σяє#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:277
msgid "This response has not been saved."
msgstr "Thïs réspönsé häs nöt ßéén sävéd. Ⱡ'σяєм ι#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:295
msgid "Saving..."
msgstr "Sävïng... #"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
msgid "This response has been saved but not submitted."
msgstr "Thïs réspönsé häs ßéén sävéd ßüt nöt süßmïttéd. Ⱡ'σяєм ιρѕυм #"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:316
msgid "Error"
msgstr "Érrör Ⱡ'σяєм ι#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:59
#: apps/openassessment/xblock/static/js/src/oa_server.js:90
#: apps/openassessment/xblock/static/js/src/oa_server.js:109
msgid "This section could not be loaded."
msgstr "Thïs séçtïön çöüld nöt ßé löädéd. Ⱡ'σяєм ι#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:144
msgid "This response could not be submitted."
msgstr "Thïs réspönsé çöüld nöt ßé süßmïttéd. Ⱡ'σяєм ιρѕ#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:170
msgid "This response could not be saved."
msgstr "Thïs réspönsé çöüld nöt ßé sävéd. Ⱡ'σяєм ι#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:207
msgid "This feedback could not be submitted."
msgstr "Thïs féédßäçk çöüld nöt ßé süßmïttéd. Ⱡ'σяєм ιρѕ#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:253
#: apps/openassessment/xblock/static/js/src/oa_server.js:293
#: apps/openassessment/xblock/static/js/src/oa_server.js:334
msgid "This assessment could not be submitted."
msgstr "Thïs ässéssmént çöüld nöt ßé süßmïttéd. Ⱡ'σяєм ιρѕ#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:362
msgid "This problem could not be loaded."
msgstr "Thïs prößlém çöüld nöt ßé löädéd. Ⱡ'σяєм ι#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:391
msgid "This problem could not be saved."
msgstr "Thïs prößlém çöüld nöt ßé sävéd. Ⱡ'σяєм ι#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:421
msgid "The server could not be contacted."
msgstr "Thé sérvér çöüld nöt ßé çöntäçtéd. Ⱡ'σяєм ιρ#"
# edX translation file.
# Copyright (C) 2014 EdX
# This file is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.
# EdX Team <info@edx.org>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-05 06:32-0400\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
"Language: fake2\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_base.js:151
msgid "Unable to Load"
msgstr "Ʉnɐblǝ ʇø Łøɐd"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_edit.js:81
msgid ""
"This problem has already been released. Any changes will apply only to "
"future assessments."
msgstr ""
"Ŧɥᴉs dɹøblǝɯ ɥɐs ɐlɹǝɐdʎ bǝǝn ɹǝlǝɐsǝd. Ⱥnʎ ɔɥɐnƃǝs ʍᴉll ɐddlʎ ønlʎ ʇø "
"ɟnʇnɹǝ ɐssǝssɯǝnʇs."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:174
msgid "Status of Your Response"
msgstr "Sʇɐʇns øɟ Ɏønɹ Ɍǝsdønsǝ"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:277
msgid "This response has not been saved."
msgstr "Ŧɥᴉs ɹǝsdønsǝ ɥɐs nøʇ bǝǝn sɐʌǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:295
msgid "Saving..."
msgstr "Sɐʌᴉnƃ..."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
msgid "This response has been saved but not submitted."
msgstr "Ŧɥᴉs ɹǝsdønsǝ ɥɐs bǝǝn sɐʌǝd bnʇ nøʇ snbɯᴉʇʇǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:316
msgid "Error"
msgstr "Ɇɹɹøɹ"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:59
#: apps/openassessment/xblock/static/js/src/oa_server.js:90
#: apps/openassessment/xblock/static/js/src/oa_server.js:109
msgid "This section could not be loaded."
msgstr "Ŧɥᴉs sǝɔʇᴉøn ɔønld nøʇ bǝ løɐdǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:144
msgid "This response could not be submitted."
msgstr "Ŧɥᴉs ɹǝsdønsǝ ɔønld nøʇ bǝ snbɯᴉʇʇǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:170
msgid "This response could not be saved."
msgstr "Ŧɥᴉs ɹǝsdønsǝ ɔønld nøʇ bǝ sɐʌǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:207
msgid "This feedback could not be submitted."
msgstr "Ŧɥᴉs ɟǝǝdbɐɔʞ ɔønld nøʇ bǝ snbɯᴉʇʇǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:253
#: apps/openassessment/xblock/static/js/src/oa_server.js:293
#: apps/openassessment/xblock/static/js/src/oa_server.js:334
msgid "This assessment could not be submitted."
msgstr "Ŧɥᴉs ɐssǝssɯǝnʇ ɔønld nøʇ bǝ snbɯᴉʇʇǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:362
msgid "This problem could not be loaded."
msgstr "Ŧɥᴉs dɹøblǝɯ ɔønld nøʇ bǝ løɐdǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:391
msgid "This problem could not be saved."
msgstr "Ŧɥᴉs dɹøblǝɯ ɔønld nøʇ bǝ sɐʌǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_server.js:421
msgid "The server could not be contacted."
msgstr "Ŧɥǝ sǝɹʌǝɹ ɔønld nøʇ bǝ ɔønʇɐɔʇǝd."
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<h3 class="message__title">{% trans "Waiting for Peer Responses" %}</h3> <h3 class="message__title">{% trans "Waiting for Peer Responses" %}</h3>
<div class="message__content"> <div class="message__content">
<p>{% blocktrans %}All submitted peer responses have been assessed. Check back later to see if more students have submitted responses. You'll receive your grade after you complete the <a data-behavior="ui-scroll" href="#openassessment__peer-assessment">peer assessment</a> and <a data-behavior="ui-scroll" href="#openassessment__self-assessment">self assessment</a> steps, and after your peers have assessed your response.{% endblocktrans %}</p> <p>{% blocktrans %}All submitted peer responses have been assessed. Check back later to see if more students have submitted responses. You'll receive your grade after you've completed all the steps for this problem and your peers have assessed your response.{% endblocktrans %}</p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<div class="step__content"> <div class="step__content">
<article class="student-training__display" id="student-training"> <article class="student-training__display" id="student-training">
<header class="student-training__display__header"> <header class="student-training__display__header">
<h3 class="student-training__display__title">{% trans "Training Essay #" %} <h3 class="student-training__display__title">{% trans "Training Assessment #" %}
<span class="student-training__number--current">{{ training_num_current }}</span> of <span class="student-training__number--current">{{ training_num_current }}</span> of
<span class="student-training__number--required">{{ training_num_available }}</span> <span class="student-training__number--required">{{ training_num_available }}</span>
</h3> </h3>
......
...@@ -197,7 +197,8 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel): ...@@ -197,7 +197,8 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
Simple helper function for retrieving all the steps in the given Simple helper function for retrieving all the steps in the given
Workflow. Workflow.
""" """
steps = list(self.steps.all()) # Do not return steps that are not recognized in the AssessmentWorkflow.
steps = list(self.steps.filter(name__in=AssessmentWorkflow.STEPS))
if not steps: if not steps:
# If no steps exist for this AssessmentWorkflow, assume # If no steps exist for this AssessmentWorkflow, assume
# peer -> self for backwards compatibility # peer -> self for backwards compatibility
......
...@@ -13,6 +13,8 @@ from openassessment.assessment.api import ai as ai_api ...@@ -13,6 +13,8 @@ from openassessment.assessment.api import ai as ai_api
from openassessment.assessment.errors import AIError from openassessment.assessment.errors import AIError
from openassessment.assessment.models import StudentTrainingWorkflow from openassessment.assessment.models import StudentTrainingWorkflow
import submissions.api as sub_api import submissions.api as sub_api
from openassessment.assessment.api import peer as peer_api
from openassessment.assessment.api import self as self_api
RUBRIC_DICT = { RUBRIC_DICT = {
"criteria": [ "criteria": [
...@@ -72,6 +74,60 @@ class TestAssessmentWorkflowApi(CacheResetTest): ...@@ -72,6 +74,60 @@ class TestAssessmentWorkflowApi(CacheResetTest):
peer_workflows = list(PeerWorkflow.objects.filter(submission_uuid=submission["uuid"])) peer_workflows = list(PeerWorkflow.objects.filter(submission_uuid=submission["uuid"]))
self.assertFalse(peer_workflows) self.assertFalse(peer_workflows)
def test_assessment_module_rollback_update_workflow(self):
"""
Test that updates work when assessment modules roll back
This test is designed to instantiate a workflow with an installed
assessment module, then verify the workflow can be updated even when
the status is set to an uninstalled assessment module.
"""
requirements = {
"special": {},
"peer": {
"must_grade": 1,
"must_be_graded_by": 1
},
"self": {}
}
# We'll cheat to create the workflow with the new 'special' status,
# otherwise the creation logic will not allow unknown an unknown status
# to be set.
real_steps = AssessmentWorkflow.STEPS
AssessmentWorkflow.STEPS = ["special"] + real_steps
workflow, submission = self._create_workflow_with_status(
"user 1",
"test/1/1",
"peer-problem",
"special",
steps=["special", "peer", "self"])
AssessmentWorkflow.STEPS = real_steps
workflow_api.get_workflow_for_submission(
submission["uuid"], requirements
)
peer_workflows = list(PeerWorkflow.objects.filter(submission_uuid=submission["uuid"]))
self.assertTrue(peer_workflows)
with patch.object(peer_api, 'submitter_is_finished') as mock_peer_submit:
mock_peer_submit.return_value = True
workflow = workflow_api.get_workflow_for_submission(
submission["uuid"], requirements
)
self.assertEquals("self", workflow['status'])
with patch.object(self_api, 'submitter_is_finished') as mock_self_submit:
mock_self_submit.return_value = True
workflow = workflow_api.get_workflow_for_submission(
submission["uuid"], requirements
)
self.assertEquals("waiting", workflow['status'])
def test_update_peer_workflow(self): def test_update_peer_workflow(self):
submission = sub_api.create_submission(ITEM_1, "Shoot Hot Rod") submission = sub_api.create_submission(ITEM_1, "Shoot Hot Rod")
workflow = workflow_api.create_workflow(submission["uuid"], ["training", "peer"], RUBRIC_DICT, ALGORITHM_ID) workflow = workflow_api.create_workflow(submission["uuid"], ["training", "peer"], RUBRIC_DICT, ALGORITHM_ID)
...@@ -263,7 +319,8 @@ class TestAssessmentWorkflowApi(CacheResetTest): ...@@ -263,7 +319,8 @@ class TestAssessmentWorkflowApi(CacheResetTest):
) )
self.assertEqual(counts, updated_counts) self.assertEqual(counts, updated_counts)
def _create_workflow_with_status(self, student_id, course_id, item_id, status, answer="answer"): def _create_workflow_with_status(self, student_id, course_id, item_id,
status, answer="answer", steps=None):
""" """
Create a submission and workflow with a given status. Create a submission and workflow with a given status.
...@@ -275,10 +332,14 @@ class TestAssessmentWorkflowApi(CacheResetTest): ...@@ -275,10 +332,14 @@ class TestAssessmentWorkflowApi(CacheResetTest):
Kwargs: Kwargs:
answer (unicode): Submission answer. answer (unicode): Submission answer.
steps (list): A list of steps to create the workflow with. If not
specified the default steps are "peer", "self".
Returns: Returns:
None workflow, submission
""" """
if not steps: steps = ["peer", "self"]
submission = sub_api.create_submission({ submission = sub_api.create_submission({
"student_id": student_id, "student_id": student_id,
"course_id": course_id, "course_id": course_id,
...@@ -286,7 +347,8 @@ class TestAssessmentWorkflowApi(CacheResetTest): ...@@ -286,7 +347,8 @@ class TestAssessmentWorkflowApi(CacheResetTest):
"item_type": "openassessment", "item_type": "openassessment",
}, answer) }, answer)
workflow = workflow_api.create_workflow(submission['uuid'], ["peer", "self"]) workflow = workflow_api.create_workflow(submission['uuid'], steps)
workflow_model = AssessmentWorkflow.objects.get(uuid=workflow['uuid']) workflow_model = AssessmentWorkflow.objects.get(uuid=workflow['uuid'])
workflow_model.status = status workflow_model.status = status
workflow_model.save() workflow_model.save()
return workflow, submission
...@@ -64,7 +64,16 @@ DEFAULT_RUBRIC_FEEDBACK_PROMPT = """ ...@@ -64,7 +64,16 @@ DEFAULT_RUBRIC_FEEDBACK_PROMPT = """
(Optional) What aspects of this response stood out to you? What did it do well? How could it improve? (Optional) What aspects of this response stood out to you? What did it do well? How could it improve?
""" """
DEFAULT_EXAMPLE_ANSWER = "Replace this text with a sample response for this assignment. You'll assess this sample response in the courseware, and students will then learn to assess responses by assessing this response and comparing the options that they select in the rubric with the options that you selected." DEFAULT_EXAMPLE_ANSWER = """
(optional) Replace this text with your own sample response for this assignment. Below, list the names of the criteria for this assignment, and then specify the name of the option that you would select for this response. Students will learn to assess responses by assessing this response and comparing the rubric options that they select with the rubric options that you specified.
If you don't want to provide sample responses and scores, delete the entire 'assessment name="student-training"' element.
"""
DEFAULT_EXAMPLE_ANSWER_2 = """
(optional) Replace this text with another sample response, and then specify the options that you would select for this response below. To provide more sample responses, copy an "example" element and paste as many as you want before the closing "assessment" tag.
"""
DEFAULT_STUDENT_TRAINING = { DEFAULT_STUDENT_TRAINING = {
"name": "student-training", "name": "student-training",
"start": None, "start": None,
...@@ -84,7 +93,7 @@ DEFAULT_STUDENT_TRAINING = { ...@@ -84,7 +93,7 @@ DEFAULT_STUDENT_TRAINING = {
] ]
}, },
{ {
"answer": DEFAULT_EXAMPLE_ANSWER, "answer": DEFAULT_EXAMPLE_ANSWER_2,
"options_selected": [ "options_selected": [
{ {
"criterion": "Ideas", "criterion": "Ideas",
......
../apps/openassessment/locale/
\ No newline at end of file
-r test.txt -r test.txt
git+https://github.com/edx/i18n-tools.git@0033a29537740592ea47b1e372a9aa3873120c35#egg=i18n_tools
# Debug tools # Debug tools
bpython==0.13 bpython==0.13
django-debug-panel==0.8.0 django-debug-panel==0.8.0
......
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