@@ -186,9 +188,9 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild):
#Error message already defined
success=False
else:
#This is a student_facing_error
error_message="There was a problem saving the image in your submission. Please try a different image, or try pasting a link to an image into the answer box."
log.debug(error_message)
return{
'success':success,
'rubric_html':self.get_rubric_html(system),
...
...
@@ -220,7 +222,10 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild):
foriinxrange(0,len(score_list)):
score_list[i]=int(score_list[i])
exceptValueError:
return{'success':False,'error':"Non-integer score value, or no score list"}
#This is a dev_facing_error
log.error("Non-integer score value passed to save_assessment , or no score list present.")
#This is a student_facing_error
return{'success':False,'error':"Error saving your score. Please notify course staff."}
#Record score as assessment and rubric scores as post assessment
self.record_latest_score(score)
...
...
@@ -262,6 +267,7 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild):
try:
rubric_scores=json.loads(latest_post_assessment)
except:
#This is a dev_facing_error
log.error("Cannot parse rubric scores in self assessment module from {0}".format(latest_post_assessment))
rubric_scores=[]
return[rubric_scores]
...
...
@@ -293,6 +299,7 @@ class SelfAssessmentDescriptor(XmlDescriptor, EditingDescriptor):
expected_children=[]
forchildinexpected_children:
iflen(xml_object.xpath(child))!=1:
#This is a staff_facing_error
raiseValueError("Self assessment definition must include exactly one '{0}' tag".format(child))