Commit d8d4c373 by Don Mitchell

Yaml files now generate markdown in a readable and xml convertable

format. The xml converter works. 
parent 9dad3ba9
......@@ -97,7 +97,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
// replace string and numerical
xml = xml.replace(/^\=\s*(.*?$)/gm, function(match, p) {
var string;
var params = /(.*?)\+\-\s*(.*?)/.exec(p);
var params = /(.*?)\+\-\s*(.*?$)/.exec(p);
if(parseFloat(p)) {
if(params) {
string = '<numericalresponse answer="' + params[1] + '">\n';
......
......@@ -3,22 +3,46 @@ metadata:
display_name: Multiple Choice
rerandomize: never
showanswer: always
markdown: |
markdown: "
A multiple choice problem presents radio buttons for student input. Students can only select a single
option presented. Multiple Choice questions have been the subject of many areas of research due to the early
invention and adoption of bubble sheets.
One of the main elements that goes into a good multiple choice question is the existence of good distractors.
That is, each of the alternate responses presented to the student should be the result of a plausible mistake
that a student might make.
that a student might make.
What Apple device competed with the portable CD player?
( ) The iPad
( ) Napster
(x) The iPod
( ) The vegetable peeler
( ) Android
( ) The Beatles
<solution>
<div class='detailed-solution'>
Explanation
The release of the iPod allowed consumers to carry their entire music library with them in a
format that did not rely on fragile and energy-intensive spinning disks.
</div>
</solution>
"
data: |
<problem>
<p>
......@@ -41,7 +65,7 @@ data: |
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and enery-intensive spinning disks. </p>
<p>The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and energy-intensive spinning disks. </p>
</div>
</solution>
</problem>
......
......@@ -3,22 +3,53 @@ metadata:
display_name: Numerical Response
rerandomize: never
showanswer: always
markdown: |
markdown: "
A numerical response problem accepts a line of text input from the
student, and evaluates the input for correctness based on its
numerical value.
numerical value.
The answer is correct if it is within a specified numerical tolerance
of the expected answer.
Enter the numerical value of Pi:
Enter the numerical value of Pi:
= 3.14159 +- .02
Enter the approximate value of 502*9:
Enter the approximate value of 502*9:
= 4518 +- 15%
Enter the number of fingers on a human hand:
Enter the number of fingers on a human hand:
= 5
<solution>
<div class='detailed-solution'>
Explanation
Pi, or the the ratio between a circle's circumference to its diameter, is an irrational number
known to extreme precision. It is value is approximately equal to 3.14.
Although you can get an exact value by typing 502*9 into a calculator, the result will be close to
500*10, or 5,000. The grader accepts any response within 15% of the true value, 4518, so that you
can use any estimation technique that you like.
If you look at your hand, you can count that you have five fingers.
</div>
</solution>
"
data: |
<problem>
<p>
......
......@@ -3,22 +3,36 @@ metadata:
display_name: Option Response
rerandomize: never
showanswer: always
markdown: |
markdown: "
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>
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.
The answer options and the identification of the correct answer is defined in the <b>optioninput</b> tag.
Translation between Option Response and __________ is extremely straightforward:
[[(Multiple Choice), String Response, Numerical Response, External Response, Image Response]]
<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 class='detailed-solution'>
Explanation
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.
</div>
</solution>
"
data: |
<problem>
<p>OptionResponse gives a limited set of options for students to respond with, and presents those options
......
......@@ -3,24 +3,37 @@ metadata:
display_name: String Response
rerandomize: never
showanswer: always
markdown: !
A string response problem accepts a line of text input from the
student, and evaluates the input for correctness based on an expected
# Note, the extra newlines are needed to make the yaml parser add blank lines instead of folding
markdown: "
A string response problem accepts a line of text input from the
student, and evaluates the input for correctness based on an expected
answer within each input box.
The answer is correct if it matches every character of the expected answer. This can be a problem with
international spelling, dates, or anything where the format of the answer is not clear.
The answer is correct if it matches every character of the expected answer. This can be a problem with
international spelling, dates, or anything where the format of the answer is not clear.
Which US state has Lansing as its capital?
= Michigan
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Lansing is the capital of Michigan, although it is not Michgan's largest city, or even the seat of the county in which it resides.</p>
<div class='detailed-solution'>
Explanation
Lansing is the capital of Michigan, although it is not Michgan's largest city,
or even the seat of the county in which it resides.
</div>
</solution>
"
data: |
<problem showanswer="always">
<p>
......
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