Commit c3a91f59 by Vik Paruchuri

Replace score message with dictionary

parent 825821ae
......@@ -457,7 +457,7 @@ class OpenEndedModule():
correct: Correctness of submission (Boolean)
score: Points to be assigned (numeric, can be float)
"""
fail = ScoreMessage(valid=False, correct=False, points=0, msg='')
fail = {'valid' : False, 'correct' : False, 'points' : 0, 'msg' : ''}
try:
score_result = json.loads(score_msg)
except (TypeError, ValueError):
......@@ -486,8 +486,7 @@ class OpenEndedModule():
correct = (score_ratio >= 0.66)
#Currently ignore msg and only return feedback (which takes the place of msg)
return ScoreMessage(valid=True, correct=correct,
points=score_result['score'], msg=feedback)
return {'valid' : True, 'correct' : correct, 'points' : score_result['score'], 'msg' : feedback}
def handle_ajax(self, dispatch, get, system):
'''
......
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