@@ -63,6 +63,8 @@ Write a persuasive essay to a newspaper reflecting your vies on censorship in li
else
@createXMLEditor()
@alertTaskRubricModification()
###
Creates the XML Editor and sets it as the current editor. If text is passed in,
it will replace the text present in the HTML template.
...
...
@@ -93,6 +95,8 @@ Write a persuasive essay to a newspaper reflecting your vies on censorship in li
# Hide markdown-specific toolbar buttons
$(@element.find('.editor-bar')).hide()
alertTaskRubricModification:->
returnalert("Before you edit, please note that if you alter the tasks block or the rubric block of this question after students have submitted responses, it may result in their responses and grades being deleted! Use caution when altering problems that have already been released to students.")
###
Have the user confirm the one-way conversion to XML.
self.reset_task_state("Type is self assessment and post assessment is not a list.")
break
#See if we can properly render the task. Will go into the exception clause below if not.
task.get_html(self.system)
exceptExceptionaserr:
#If one task doesn't match, the state is invalid.
self.reset_task_state("Could not parse task. {0}".format(err))
break
defreset_task_state(self,message=""):
"""
Resets the task states. Moves current task state to an old_state variable, and then makes the task number 0.
:param message: A message to put in the log.
:return: None
"""
info_message="Combined open ended user state for user {0} in location {1} was invalid. It has been reset, and you now have a new attempt. {2}".format(self.system.anonymous_student_id,self.location.url(),message)
self.current_task_number=0
self.student_attempts=0
self.old_task_states.append(self.task_states)
self.task_states=[]
log.info(info_message)
defget_tag_name(self,xml):
"""
Gets the tag name of a given xml block.
...
...
@@ -315,7 +386,7 @@ class CombinedOpenEndedV1Module():