Commit 2b822399 by Sylvia Pearce

UI and error message text updates

parent 46d0e021
...@@ -185,13 +185,13 @@ def resolve_dates(start, end, date_ranges): ...@@ -185,13 +185,13 @@ def resolve_dates(start, end, date_ranges):
step_end = _parse_date(step_end) if step_end is not None else prev_end step_end = _parse_date(step_end) if step_end is not None else prev_end
if step_start < prev_start: if step_start < prev_start:
msg = _(u"This step's start date '{start}' cannot be before the previous step's start date '{prev}'.").format( msg = _(u"This step's start date '{start}' cannot be earlier than the previous step's start date '{prev}'.").format(
start=step_start, prev=prev_start start=step_start, prev=prev_start
) )
raise DateValidationError(msg) raise DateValidationError(msg)
if step_end > prev_end: if step_end > prev_end:
msg = _(u"This step's due date '{due}' cannot be after the next step's due date '{prev}'.").format( msg = _(u"This step's due date '{due}' cannot be later than the next step's due date '{prev}'.").format(
due=step_end, prev=prev_end due=step_end, prev=prev_end
) )
raise DateValidationError(msg) raise DateValidationError(msg)
......
...@@ -346,7 +346,7 @@ describe("OpenAssessment.Server", function() { ...@@ -346,7 +346,7 @@ describe("OpenAssessment.Server", function() {
receivedMsg = errMsg; receivedMsg = errMsg;
}); });
expect(receivedMsg).toContain("The server could not be contacted"); expect(receivedMsg).toContain("This problem could not be saved");
}); });
......
...@@ -74,7 +74,7 @@ class SubmissionMixin(object): ...@@ -74,7 +74,7 @@ class SubmissionMixin(object):
status_tag = 'EBADFORM' status_tag = 'EBADFORM'
status_text = unicode(err.field_errors) status_text = unicode(err.field_errors)
except (api.SubmissionError, workflow_api.AssessmentWorkflowError): except (api.SubmissionError, workflow_api.AssessmentWorkflowError):
logger.exception("An error occurred while submitting.") logger.exception("This response was not submitted.")
status_tag = 'EUNKNOWN' status_tag = 'EUNKNOWN'
else: else:
status = True status = True
......
...@@ -466,7 +466,7 @@ def update_from_xml(oa_block, root, validator=DEFAULT_VALIDATOR): ...@@ -466,7 +466,7 @@ def update_from_xml(oa_block, root, validator=DEFAULT_VALIDATOR):
# Check that the root has the correct tag # Check that the root has the correct tag
if root.tag != 'openassessment': if root.tag != 'openassessment':
raise UpdateFromXmlError(_('XML content must contain an "openassessment" root element.')) raise UpdateFromXmlError(_('Every open assessment problem must contain an "openassessment" element.'))
# Retrieve the start date for the submission # Retrieve the start date for the submission
# Set it to None by default; we will update it to the latest start date later on # Set it to None by default; we will update it to the latest start date later on
...@@ -474,7 +474,7 @@ def update_from_xml(oa_block, root, validator=DEFAULT_VALIDATOR): ...@@ -474,7 +474,7 @@ def update_from_xml(oa_block, root, validator=DEFAULT_VALIDATOR):
if 'submission_start' in root.attrib: if 'submission_start' in root.attrib:
submission_start = _parse_date(unicode(root.attrib['submission_start'])) submission_start = _parse_date(unicode(root.attrib['submission_start']))
if submission_start is None: if submission_start is None:
raise UpdateFromXmlError(_('Invalid date format for submission start date')) raise UpdateFromXmlError(_('The format for the submission start date is invalid. Make sure the date is formatted as YYYY-MM-DDTHH:MM:SS.'))
# Retrieve the due date for the submission # Retrieve the due date for the submission
# Set it to None by default; we will update it to the earliest deadline later on # Set it to None by default; we will update it to the earliest deadline later on
......
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