Commit 2b822399 by Sylvia Pearce

UI and error message text updates

parent 46d0e021
......@@ -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
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
)
raise DateValidationError(msg)
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
)
raise DateValidationError(msg)
......
......@@ -346,7 +346,7 @@ describe("OpenAssessment.Server", function() {
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):
status_tag = 'EBADFORM'
status_text = unicode(err.field_errors)
except (api.SubmissionError, workflow_api.AssessmentWorkflowError):
logger.exception("An error occurred while submitting.")
logger.exception("This response was not submitted.")
status_tag = 'EUNKNOWN'
else:
status = True
......
......@@ -466,7 +466,7 @@ def update_from_xml(oa_block, root, validator=DEFAULT_VALIDATOR):
# Check that the root has the correct tag
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
# 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):
if 'submission_start' in root.attrib:
submission_start = _parse_date(unicode(root.attrib['submission_start']))
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
# 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