Json instance state fix
This commit is contained in:
@@ -111,9 +111,10 @@ class CombinedOpenEndedModule(XModule):
|
||||
self.task_states.append(self.current_task.get_instance_state())
|
||||
self.state=self.ASSESSING
|
||||
elif current_task_state is None and self.current_task_number>0:
|
||||
last_response=self.get_last_response(self.current_task_number-1)
|
||||
current_task_state = ("{'state': 'assessing', 'version': 1, 'max_score': {" + str(self._max_score) + "}, " +
|
||||
"'attempts': 0, 'history': [{'answer': '{" + str(last_response) + "}'}]}")
|
||||
last_response, last_score=self.get_last_response(self.current_task_number-1)
|
||||
current_task_state = ('{"state": "assessing", "version": 1, "max_score": ' + str(self._max_score) + ', ' +
|
||||
'"attempts": 0, "history": [{"answer": "' + str(last_response) + '"}]}')
|
||||
{"state": "done", "version": 1, "max_score": 1, "attempts": 1, "history": [{"answer": "gdgddg", "score": 0, "hint": "dfdfdf"}]}
|
||||
self.current_task=self_assessment_module.SelfAssessmentModule(self.system, self.location, self.current_task_parsed_xml, self.current_task_descriptor, instance_state=current_task_state)
|
||||
self.task_states.append(self.current_task.get_instance_state())
|
||||
self.state=self.ASSESSING
|
||||
|
||||
Reference in New Issue
Block a user