Polish up editor, fix issues
This commit is contained in:
@@ -109,7 +109,7 @@ class @OpenEndedMarkdownEditingDescriptor extends XModule.Descriptor
|
||||
@element.off('click', '.cheatsheet-toggle', @toggleCheatsheet)
|
||||
if @current_editor == @markdown_editor
|
||||
{
|
||||
data: MarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue())
|
||||
data: OpenEndedMarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue())
|
||||
metadata:
|
||||
markdown: @markdown_editor.getValue()
|
||||
}
|
||||
@@ -169,6 +169,9 @@ class @OpenEndedMarkdownEditingDescriptor extends XModule.Descriptor
|
||||
groupString += "\n</option>\n";
|
||||
}
|
||||
}
|
||||
if(i==options.length-1){
|
||||
groupString += "\n</category>\n";
|
||||
}
|
||||
}
|
||||
groupString += '</rubric>\n</rubric>\n';
|
||||
return groupString;
|
||||
|
||||
@@ -847,8 +847,8 @@ class CombinedOpenEndedV1Descriptor():
|
||||
if len(xml_object.xpath(child)) == 0:
|
||||
#This is a staff_facing_error
|
||||
raise ValueError(
|
||||
"Combined Open Ended definition must include at least one '{0}' tag. Contact the learning sciences group for assistance.".format(
|
||||
child))
|
||||
"Combined Open Ended definition must include at least one '{0}' tag. Contact the learning sciences group for assistance. {1}".format(
|
||||
child, xml_object))
|
||||
|
||||
def parse_task(k):
|
||||
"""Assumes that xml_object has child k"""
|
||||
|
||||
@@ -10,6 +10,34 @@ metadata:
|
||||
markdown: ""
|
||||
data: |
|
||||
<combinedopenended>
|
||||
<rubric>
|
||||
<rubric>
|
||||
<category>
|
||||
<description>Category 1</description>
|
||||
<option>
|
||||
The response does not incorporate what is needed for a one response.
|
||||
</option>
|
||||
<option>
|
||||
The response is correct for category 1.
|
||||
</option>
|
||||
</category>
|
||||
</rubric>
|
||||
</rubric>
|
||||
<prompt>
|
||||
<p>Why is the sky blue?</p>
|
||||
</prompt>
|
||||
<task>
|
||||
<selfassessment/>
|
||||
</task>
|
||||
<task>
|
||||
<openended min_score_to_attempt="1" max_score_to_attempt="2">
|
||||
<openendedparam>
|
||||
<initial_display>Enter essay here.</initial_display>
|
||||
<answer_display>This is the answer.</answer_display>
|
||||
<grader_payload>{"grader_settings" : "peer_grading.conf", "problem_id" : "700x/Demo"}</grader_payload>
|
||||
</openendedparam>
|
||||
</openended>
|
||||
</task>
|
||||
</combinedopenended>
|
||||
|
||||
children: []
|
||||
|
||||
Reference in New Issue
Block a user