@@ -168,22 +170,19 @@ class CombinedOpenEndedV1Module():
...
@@ -168,22 +170,19 @@ class CombinedOpenEndedV1Module():
"""
"""
Sometimes a teacher will change the xml definition of a problem in Studio.
Sometimes a teacher will change the xml definition of a problem in Studio.
This means that the state passed to the module is invalid.
This means that the state passed to the module is invalid.
If that is the case, delete it.
If that is the case, moved it to old_task_states and delete task_states.
"""
"""
info_message="Combined open ended user state for user {0} in location {1} was invalid. Reset it.".format(self.system.anonymous_student_id,self.location.url())
#If we are on a task that is greater than the number of available tasks, it is an invalid state
#If we are on a task that is greater than the number of available tasks, it is an invalid state
#If the current task number is greater than the number of tasks we have in the xml definition, our state is invalid.
#If the current task number is greater than the number of tasks we have in the xml definition, our state is invalid.
self.reset_task_state("Type is self assessment and post assessment is not a list.")
break
exceptExceptionaserr:
#If one task doesn't match, the state is invalid.
#If one task doesn't match, the state is invalid.
self.current_task_number=0
self.reset_task_state("Could not parse task. {0}".format(err))
self.task_states=[]
log.info(info_message)
break
break
defreset_task_state(self,message=""):
info_message="Combined open ended user state for user {0} in location {1} was invalid. Reset it. {2}".format(self.system.anonymous_student_id,self.location.url(),message)