Comment out markdown in optionresponse.yaml, hook up toXML method.

This commit is contained in:
cahrens
2013-01-05 15:08:09 -05:00
parent 164d8a50f1
commit 05428f5b07
2 changed files with 21 additions and 28 deletions

View File

@@ -13,16 +13,9 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
@markdown_editor = CodeMirror.fromTextArea($(".markdown-box", element)[0], {
lineWrapping: true
mode: null
onChange: @onMarkdownEditorUpdate
})
@setCurrentEditor(@markdown_editor)
onMarkdownEditorUpdate: ->
console.log('update')
@updateXML()
updateXML: ->
changeEditor: (e) =>
e.preventDefault();
$('.editor-tabs .current').removeClass('current')
@@ -32,7 +25,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
# onMarkdownEditorUpdate();
else
@setCurrentEditor(@xml_editor)
# xmlEditor.refresh();
@xml_editor.setValue(MarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue()))
setCurrentEditor: (editor) ->
$(@current_editor.getWrapperElement()).hide()

View File

@@ -3,26 +3,26 @@ metadata:
display_name: Option Response
rerandomize: never
showanswer: always
markdown: "
<p>OptionResponse gives a limited set of options for students to respond with, and presents those options
in a format that encourages them to search for a specific answer rather than being immediately presented with options from which to recognize the correct answer.</p>
<p>
The answer options and the identification of the correct answer is defined in the <b>optioninput</b> tag.
</p>
<p>Translation between Option Response and __________ is extremely straightforward:
<optionresponse>
<optioninput options="('Multiple Choice','String Response','Numerical Response','External Response','Image Response')" correct="Multiple Choice"></optioninput>
</optionresponse>
</p>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Multiple Choice also allows students to select from a variety of pre-written responses, although the format makes it easier for students to read very long response options. Optionresponse also differs slightly because students are more likely to think of an answer and then search for it rather than relying purely on recognition to answer the question.</p>
</div>
</solution>
"
# markdown: "
# <p>OptionResponse gives a limited set of options for students to respond with, and presents those options
# in a format that encourages them to search for a specific answer rather than being immediately presented with options from which to recognize the correct answer.</p>
#
# <p>
# The answer options and the identification of the correct answer is defined in the <b>optioninput</b> tag.
# </p>
# <p>Translation between Option Response and __________ is extremely straightforward:
#
# <optionresponse>
# <optioninput options="('Multiple Choice','String Response','Numerical Response','External Response','Image Response')" correct="Multiple Choice"></optioninput>
# </optionresponse>
# </p>
# <solution>
# <div class="detailed-solution">
# <p>Explanation</p>
# <p>Multiple Choice also allows students to select from a variety of pre-written responses, although the format makes it easier for students to read very long response options. Optionresponse also differs slightly because students are more likely to think of an answer and then search for it rather than relying purely on recognition to answer the question.</p>
# </div>
# </solution>
# "
data: |
<problem>
<p>OptionResponse gives a limited set of options for students to respond with, and presents those options