Commit a2709bd9 by Stephen Sanchez

Merge branch 'master' into sanchez/TIM-171-Submission-UI

Conflicts:
	apps/openassessment/xblock/submission_mixin.py
parents e7f7bcda 229b719b
...@@ -12,7 +12,7 @@ class PeerAssessmentMixin(object): ...@@ -12,7 +12,7 @@ class PeerAssessmentMixin(object):
PeerAssessmentMixin is a Mixin for the OpenAssessmentBlock. Functions in PeerAssessmentMixin is a Mixin for the OpenAssessmentBlock. Functions in
the PeerAssessmentMixin call into the OpenAssessmentBlock functions and the PeerAssessmentMixin call into the OpenAssessmentBlock functions and
will not work outside this scope. will not work outside of OpenAssessmentBlock
""" """
......
...@@ -10,7 +10,7 @@ class SelfAssessmentMixin(object): ...@@ -10,7 +10,7 @@ class SelfAssessmentMixin(object):
SelfAssessmentMixin is a Mixin for the OpenAssessmentBlock. Functions in SelfAssessmentMixin is a Mixin for the OpenAssessmentBlock. Functions in
the SelfAssessmentMixin call into the OpenAssessmentBlock functions and the SelfAssessmentMixin call into the OpenAssessmentBlock functions and
will not work outside this scope. will not work outside of OpenAssessmentBlock.
""" """
......
...@@ -11,13 +11,12 @@ class SubmissionMixin(object): ...@@ -11,13 +11,12 @@ class SubmissionMixin(object):
SubmissionMixin is a Mixin for the OpenAssessmentBlock. Functions in the SubmissionMixin is a Mixin for the OpenAssessmentBlock. Functions in the
SubmissionMixin call into the OpenAssessmentBlock functions and will not SubmissionMixin call into the OpenAssessmentBlock functions and will not
work outside this scope. work outside the scope of OpenAssessmentBlock.
""" """
submit_errors = { submit_errors = {
# Reported to user sometimes, and useful in tests # Reported to user sometimes, and useful in tests
'ENOSUB': 'API submission is unrequested',
'ENODATA': 'API returned an empty response', 'ENODATA': 'API returned an empty response',
'EBADFORM': 'API Submission Request Error', 'EBADFORM': 'API Submission Request Error',
'EUNKNOWN': 'API returned unclassified exception', 'EUNKNOWN': 'API returned unclassified exception',
...@@ -49,10 +48,9 @@ class SubmissionMixin(object): ...@@ -49,10 +48,9 @@ class SubmissionMixin(object):
student_item_dict = self.get_student_item_dict() student_item_dict = self.get_student_item_dict()
prev_sub = self._get_user_submission(student_item_dict) prev_sub = self._get_user_submission(student_item_dict)
if prev_sub: status_tag = 'ENOMULTI' # It is an error to submit multiple times for the same item
# It is an error to submit multiple times for the same item if not prev_sub:
status_tag = 'ENOMULTI' status_tag = 'ENODATA'
else:
try: try:
response = api.create_submission(student_item_dict, student_sub) response = api.create_submission(student_item_dict, student_sub)
except api.SubmissionRequestError, e: except api.SubmissionRequestError, e:
......
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