Commit 6bdbbb62 by Vik Paruchuri

Polish up editor, fix issues

parent d4b54cec
......@@ -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: []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment