Commit 11076e75 by Vik Paruchuri

Add who to contact for all staff facing messages

parent 6a10ffc7
...@@ -158,7 +158,7 @@ class CombinedOpenEndedV1Module(): ...@@ -158,7 +158,7 @@ class CombinedOpenEndedV1Module():
self.display_due_date = dateutil.parser.parse(display_due_date_string) self.display_due_date = dateutil.parser.parse(display_due_date_string)
except ValueError: except ValueError:
#This is a staff_facing_error #This is a staff_facing_error
log.error("Could not parse due date {0} for location {1}".format(display_due_date_string, location)) log.error("Could not parse due date {0} for location {1}. Contact the learning sciences group for assistance.".format(display_due_date_string, location))
raise raise
else: else:
self.display_due_date = None self.display_due_date = None
...@@ -170,7 +170,7 @@ class CombinedOpenEndedV1Module(): ...@@ -170,7 +170,7 @@ class CombinedOpenEndedV1Module():
self.close_date = self.display_due_date + self.grace_period self.close_date = self.display_due_date + self.grace_period
except: except:
#This is a staff_facing_error #This is a staff_facing_error
log.error("Error parsing the grace period {0} for location {1}".format(grace_period_string, location)) log.error("Error parsing the grace period {0} for location {1}. Contact the learning sciences group for assistance.".format(grace_period_string, location))
raise raise
else: else:
self.grace_period = None self.grace_period = None
...@@ -807,7 +807,7 @@ class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor): ...@@ -807,7 +807,7 @@ class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor):
for child in expected_children: for child in expected_children:
if len(xml_object.xpath(child)) == 0: if len(xml_object.xpath(child)) == 0:
#This is a staff_facing_error #This is a staff_facing_error
raise ValueError("Combined Open Ended definition must include at least one '{0}' tag".format(child)) raise ValueError("Combined Open Ended definition must include at least one '{0}' tag. Contact the learning sciences group for assistance.".format(child))
def parse_task(k): def parse_task(k):
"""Assumes that xml_object has child k""" """Assumes that xml_object has child k"""
......
...@@ -72,7 +72,7 @@ class CombinedOpenEndedRubric(object): ...@@ -72,7 +72,7 @@ class CombinedOpenEndedRubric(object):
success = True success = True
except: except:
#This is a staff_facing_error #This is a staff_facing_error
error_message = "[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml) error_message = "[render_rubric] Could not parse the rubric with xml: {0}. Contact the learning sciences group for assistance.".format(rubric_xml)
log.exception(error_message) log.exception(error_message)
raise RubricParsingError(error_message) raise RubricParsingError(error_message)
return {'success' : success, 'html' : html, 'rubric_scores' : rubric_scores} return {'success' : success, 'html' : html, 'rubric_scores' : rubric_scores}
...@@ -83,7 +83,7 @@ class CombinedOpenEndedRubric(object): ...@@ -83,7 +83,7 @@ class CombinedOpenEndedRubric(object):
rubric_feedback = rubric_dict['html'] rubric_feedback = rubric_dict['html']
if not success: if not success:
#This is a staff_facing_error #This is a staff_facing_error
error_message = "Could not parse rubric : {0} for location {1}".format(rubric_string, location.url()) error_message = "Could not parse rubric : {0} for location {1}. Contact the learning sciences group for assistance.".format(rubric_string, location.url())
log.error(error_message) log.error(error_message)
raise RubricParsingError(error_message) raise RubricParsingError(error_message)
...@@ -93,14 +93,14 @@ class CombinedOpenEndedRubric(object): ...@@ -93,14 +93,14 @@ class CombinedOpenEndedRubric(object):
total = total + len(category['options']) - 1 total = total + len(category['options']) - 1
if len(category['options']) > (max_score_allowed + 1): if len(category['options']) > (max_score_allowed + 1):
#This is a staff_facing_error #This is a staff_facing_error
error_message = "Number of score points in rubric {0} higher than the max allowed, which is {1}".format( error_message = "Number of score points in rubric {0} higher than the max allowed, which is {1}. Contact the learning sciences group for assistance.".format(
len(category['options']), max_score_allowed) len(category['options']), max_score_allowed)
log.error(error_message) log.error(error_message)
raise RubricParsingError(error_message) raise RubricParsingError(error_message)
if total != max_score: if total != max_score:
#This is a staff_facing_error #This is a staff_facing_error
error_msg = "The max score {0} for problem {1} does not match the total number of points in the rubric {2}".format( error_msg = "The max score {0} for problem {1} does not match the total number of points in the rubric {2}. Contact the learning sciences group for assistance.".format(
max_score, location, total) max_score, location, total)
log.error(error_msg) log.error(error_msg)
raise RubricParsingError(error_msg) raise RubricParsingError(error_msg)
...@@ -123,7 +123,7 @@ class CombinedOpenEndedRubric(object): ...@@ -123,7 +123,7 @@ class CombinedOpenEndedRubric(object):
for category in element: for category in element:
if category.tag != 'category': if category.tag != 'category':
#This is a staff_facing_error #This is a staff_facing_error
raise RubricParsingError("[extract_categories] Expected a <category> tag: got {0} instead".format(category.tag)) raise RubricParsingError("[extract_categories] Expected a <category> tag: got {0} instead. Contact the learning sciences group for assistance.".format(category.tag))
else: else:
categories.append(self.extract_category(category)) categories.append(self.extract_category(category))
return categories return categories
...@@ -150,13 +150,13 @@ class CombinedOpenEndedRubric(object): ...@@ -150,13 +150,13 @@ class CombinedOpenEndedRubric(object):
# if we are missing the score tag and we are expecting one # if we are missing the score tag and we are expecting one
elif self.has_score: elif self.has_score:
#This is a staff_facing_error #This is a staff_facing_error
raise RubricParsingError("[extract_category] Category {0} is missing a score".format(descriptionxml.text)) raise RubricParsingError("[extract_category] Category {0} is missing a score. Contact the learning sciences group for assistance.".format(descriptionxml.text))
# parse description # parse description
if descriptionxml.tag != 'description': if descriptionxml.tag != 'description':
#This is a staff_facing_error #This is a staff_facing_error
raise RubricParsingError("[extract_category]: expected description tag, got {0} instead".format(descriptionxml.tag)) raise RubricParsingError("[extract_category]: expected description tag, got {0} instead. Contact the learning sciences group for assistance.".format(descriptionxml.tag))
description = descriptionxml.text description = descriptionxml.text
...@@ -167,7 +167,7 @@ class CombinedOpenEndedRubric(object): ...@@ -167,7 +167,7 @@ class CombinedOpenEndedRubric(object):
for option in optionsxml: for option in optionsxml:
if option.tag != 'option': if option.tag != 'option':
#This is a staff_facing_error #This is a staff_facing_error
raise RubricParsingError("[extract_category]: expected option tag, got {0} instead".format(option.tag)) raise RubricParsingError("[extract_category]: expected option tag, got {0} instead. Contact the learning sciences group for assistance.".format(option.tag))
else: else:
pointstr = option.get("points") pointstr = option.get("points")
if pointstr: if pointstr:
...@@ -177,7 +177,7 @@ class CombinedOpenEndedRubric(object): ...@@ -177,7 +177,7 @@ class CombinedOpenEndedRubric(object):
points = int(pointstr) points = int(pointstr)
except ValueError: except ValueError:
#This is a staff_facing_error #This is a staff_facing_error
raise RubricParsingError("[extract_category]: expected points to have int, got {0} instead".format(pointstr)) raise RubricParsingError("[extract_category]: expected points to have int, got {0} instead. Contact the learning sciences group for assistance.".format(pointstr))
elif autonumbering: elif autonumbering:
# use the generated one if we're in the right mode # use the generated one if we're in the right mode
points = cur_points points = cur_points
...@@ -228,14 +228,14 @@ class CombinedOpenEndedRubric(object): ...@@ -228,14 +228,14 @@ class CombinedOpenEndedRubric(object):
''' '''
if len(options) == 0: if len(options) == 0:
#This is a staff_facing_error #This is a staff_facing_error
raise RubricParsingError("[extract_category]: no options associated with this category") raise RubricParsingError("[extract_category]: no options associated with this category. Contact the learning sciences group for assistance.")
if len(options) == 1: if len(options) == 1:
return return
prev = options[0]['points'] prev = options[0]['points']
for option in options[1:]: for option in options[1:]:
if prev == option['points']: if prev == option['points']:
#This is a staff_facing_error #This is a staff_facing_error
raise RubricParsingError("[extract_category]: found duplicate point values between two different options") raise RubricParsingError("[extract_category]: found duplicate point values between two different options. Contact the learning sciences group for assistance.")
else: else:
prev = option['points'] prev = option['points']
......
...@@ -59,7 +59,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild): ...@@ -59,7 +59,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
self.submission_id = None self.submission_id = None
self.grader_id = None self.grader_id = None
error_message = "No {0} found in problem xml for open ended problem." error_message = "No {0} found in problem xml for open ended problem. Contact the learning sciences group for assistance."
if oeparam is None: if oeparam is None:
#This is a staff_facing_error #This is a staff_facing_error
raise ValueError(error_message.format('oeparam')) raise ValueError(error_message.format('oeparam'))
...@@ -716,7 +716,7 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor): ...@@ -716,7 +716,7 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor):
for child in ['openendedparam']: for child in ['openendedparam']:
if len(xml_object.xpath(child)) != 1: if len(xml_object.xpath(child)) != 1:
#This is a staff_facing_error #This is a staff_facing_error
raise ValueError("Open Ended definition must include exactly one '{0}' tag".format(child)) raise ValueError("Open Ended definition must include exactly one '{0}' tag. Contact the learning sciences group for assistance.".format(child))
def parse(k): def parse(k):
"""Assumes that xml_object has child k""" """Assumes that xml_object has child k"""
......
...@@ -303,7 +303,7 @@ class SelfAssessmentDescriptor(XmlDescriptor, EditingDescriptor): ...@@ -303,7 +303,7 @@ class SelfAssessmentDescriptor(XmlDescriptor, EditingDescriptor):
for child in expected_children: for child in expected_children:
if len(xml_object.xpath(child)) != 1: if len(xml_object.xpath(child)) != 1:
#This is a staff_facing_error #This is a staff_facing_error
raise ValueError("Self assessment definition must include exactly one '{0}' tag".format(child)) raise ValueError("Self assessment definition must include exactly one '{0}' tag. Contact the learning sciences group for assistance.".format(child))
def parse(k): def parse(k):
"""Assumes that xml_object has child k""" """Assumes that xml_object has child k"""
......
...@@ -513,7 +513,7 @@ class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): ...@@ -513,7 +513,7 @@ class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor):
for child in expected_children: for child in expected_children:
if len(xml_object.xpath(child)) == 0: if len(xml_object.xpath(child)) == 0:
#This is a staff_facing_error #This is a staff_facing_error
raise ValueError("Peer grading definition must include at least one '{0}' tag".format(child)) raise ValueError("Peer grading definition must include at least one '{0}' tag. Contact the learning sciences group for assistance.".format(child))
def parse_task(k): def parse_task(k):
"""Assumes that xml_object has child k""" """Assumes that xml_object has child k"""
......
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