From 5291271591e8eb856517b6c3f13e893509fb51db Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 22 Jan 2013 14:33:18 -0500 Subject: [PATCH] Add in some minimal checking to make sure that the max score and scores for each rubric point are 3 --- .../lib/xmodule/xmodule/combined_open_ended_module.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index aa4b1f18ad..98018e5d80 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -141,11 +141,11 @@ class CombinedOpenEndedModule(XModule): self._max_score = int(self.metadata.get('max_score', MAX_SCORE)) rubric_renderer = CombinedOpenEndedRubric(system, True) - try: - rubric_feedback = rubric_renderer.render_rubric(stringify_children(definition['rubric'])) - except RubricParsingError: - log.error("Failed to parse rubric in location: {1}".format(location)) - raise + success, rubric_feedback = rubric_renderer.render_rubric(stringify_children(definition['rubric'])) + if not success: + error_message="Could not parse rubric : {0}".format(definition['rubric']) + log.exception(error_message) + raise Exception #Static data is passed to the child modules to render self.static_data = { 'max_score': self._max_score,