<p>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.</p>
<p>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.</p>
@@ -25,7 +25,7 @@ differences between the two include the following.
...
@@ -25,7 +25,7 @@ differences between the two include the following.
Sample Problem:
Sample Problem:
.. image:: ../Images/image287.png
.. image:: ../Images/image287.png
:width: 600
:width: 600
**Problem Code:**
**Problem Code:**
...
@@ -70,7 +70,7 @@ Sample Problem:
...
@@ -70,7 +70,7 @@ Sample Problem:
<div class="detailed-solution">
<div class="detailed-solution">
</div>
</div>
</solution>
</solution>
</problem>
</problem>
...
@@ -88,11 +88,11 @@ Sample Problem:
...
@@ -88,11 +88,11 @@ Sample Problem:
.. raw:: latex
.. raw:: latex
\newpage %
\newpage %
Multiple Choice
Multiple Choice
===============
===============
...
@@ -110,14 +110,14 @@ differences between the two include the following.
...
@@ -110,14 +110,14 @@ differences between the two include the following.
• The Option Response drop-down input format makes it more likely for students to think of an answer and then search for it, rather than relying purely on recognition to answer the question.
• The Option Response drop-down input format makes it more likely for students to think of an answer and then search for it, rather than relying purely on recognition to answer the question.
• The Multiple Choice format is more explicit and visual. This makes it a more appropriate choice for presenting tricky or complicated answer options which areintended to get the student to pause and think.
• The Multiple Choice format is more explicit and visual. This makes it a more appropriate choice for presenting tricky or complicated answer options which are intended to get the student to pause and think.
Sample Problem:
Sample Problem:
.. image:: ../Images/image289.png
.. image:: ../Images/image289.png
:width: 600
:width: 600
**Problem Code:**
**Problem Code:**
.. code-block:: xml
.. code-block:: xml
...
@@ -137,7 +137,7 @@ Sample Problem:
...
@@ -137,7 +137,7 @@ Sample Problem:
<solution>
<solution>
<div class="detailed-solution">
<div class="detailed-solution">
<p>Explanation</p>
<p>Explanation</p>
<p>It depends on how many choices are marked as correct in the underlying XML.</p>
<p>It depends on how many choices are marked as correct in the underlying XML.</p>
<p>Note that if all choices are marked as incorrect, there is no
<p>Note that if all choices are marked as incorrect, there is no
correct response.</p>
correct response.</p>
</div>
</div>
...
@@ -145,7 +145,7 @@ Sample Problem:
...
@@ -145,7 +145,7 @@ Sample Problem:
</problem>
</problem>
**Template**
**Template**
.. code-block:: xml
.. code-block:: xml
...
@@ -185,7 +185,7 @@ Sample Problem:
...
@@ -185,7 +185,7 @@ Sample Problem:
.. raw:: latex
.. raw:: latex
\newpage %
\newpage %
...
@@ -206,7 +206,7 @@ have zero correct responses.
...
@@ -206,7 +206,7 @@ have zero correct responses.
Sample Problem:
Sample Problem:
.. image:: ../Images/image290.png
.. image:: ../Images/image290.png
:width: 600
:width: 600
**Problem Code:**
**Problem Code:**
...
@@ -244,7 +244,7 @@ Sample Problem:
...
@@ -244,7 +244,7 @@ Sample Problem:
</problem>
</problem>
.. raw:: latex
.. raw:: latex
\newpage %
\newpage %
...
@@ -266,7 +266,7 @@ clear.
...
@@ -266,7 +266,7 @@ clear.
Sample Problem:
Sample Problem:
.. image:: ../Images/image291.png
.. image:: ../Images/image291.png
:width: 600
:width: 600
**Problem Code:**
**Problem Code:**
...
@@ -301,19 +301,104 @@ Sample Problem:
...
@@ -301,19 +301,104 @@ Sample Problem:
</solution>
</solution>
</problem>
</problem>
This response type allows to add more than one answer. Use `additional_answer` tag to add more answers.
You can add `regexp` to value of `type` attribute, for example: `type="ci regexp"` or `type="regexp"` or `type="regexp cs"`.
In this case, any answer and hint will be treated as regular expressions.
Regular expression has to match whole answer, for answer to be correct.
Student answers "foobar", "o foo" or " ==foo==", will be correct if teacher has set answer=".*foo.*" with type="regexp".
<td>(optional) “[ci] [regex]”. Add “ci” if the student response should be graded case-insensitively. The default is to take case into consideration when grading. Add “regexp” for correct answer to be treated as regular expression.</td>
<td> </td>
</tr>
<tr class="row-odd"><td>answer</td>
<td>The string that is used to compare with student answer. If "regexp" is not presented in value of <em>type</em> attribute, student should enter value equal to exact value of this attribute in order to get credit. If "regexp" is presented in value of <em>type</em> attribute, value of <em>answer</em> is treated as regular expression and exact match of this expression and student answer will be done. If search is successful, student will get credit.</td>
@@ -799,7 +884,7 @@ A Custom Response input type accepts one or more lines of text input from the st
...
@@ -799,7 +884,7 @@ A Custom Response input type accepts one or more lines of text input from the st
Sample Problem:
Sample Problem:
.. image:: ../Images/image295.png
.. image:: ../Images/image295.png
:width: 600
:width: 600
**Problem Code**:
**Problem Code**:
...
@@ -846,7 +931,7 @@ Sample Problem:
...
@@ -846,7 +931,7 @@ Sample Problem:
<div class="detailed-solution">
<div class="detailed-solution">
<p>Explanation</p>
<p>Explanation</p>
<p>For the first part, any two numbers of the form <i>n</i>
<p>For the first part, any two numbers of the form <i>n</i>
and <i>10-n</i>, where <i>n</i> is any integer, will work.
and <i>10-n</i>, where <i>n</i> is any integer, will work.
One possible answer would be the pair 0 and 10.
One possible answer would be the pair 0 and 10.
</p>
</p>
<p>For the second part, any pair <i>x</i> and <i>20-x</i> will work, where <i>x</i> is any real number with a finite decimal representation. Both inputs have to be entered either in standard decimal notation or in scientific exponential notation. One possible answer would be the pair 0.5 and 19.5. Another way to write this would be 5e-1 and 1.95e1.
<p>For the second part, any pair <i>x</i> and <i>20-x</i> will work, where <i>x</i> is any real number with a finite decimal representation. Both inputs have to be entered either in standard decimal notation or in scientific exponential notation. One possible answer would be the pair 0.5 and 19.5. Another way to write this would be 5e-1 and 1.95e1.
...
@@ -915,7 +1000,7 @@ Sample Problem:
...
@@ -915,7 +1000,7 @@ Sample Problem:
.. raw:: latex
.. raw:: latex
\newpage %
\newpage %
.. _Chemical Equation Response:
.. _Chemical Equation Response:
...
@@ -924,12 +1009,12 @@ Chemical Equation Response
...
@@ -924,12 +1009,12 @@ Chemical Equation Response
==========================
==========================
The Chemical Equation Response input type is a special type of Custom Response
The Chemical Equation Response input type is a special type of Custom Response
that allows the student to enter chemical equations as answers.
that allows the student to enter chemical equations as answers.
Sample Problem:
Sample Problem:
.. image:: ../Images/image296.png
.. image:: ../Images/image296.png
:width: 600
:width: 600
**Problem Code**:
**Problem Code**:
...
@@ -945,7 +1030,7 @@ Sample Problem:
...
@@ -945,7 +1030,7 @@ Sample Problem:
<chemicalequationinput size="50"/>
<chemicalequationinput size="50"/>
<answer type="loncapa/python">
<answer type="loncapa/python">
if chemcalc.chemical_equations_equal(submission[0], 'H2SO4 -> H^+ + HSO4^-'):
if chemcalc.chemical_equations_equal(submission[0], 'H2SO4 -> H^+ + HSO4^-'):
correct = ['correct']
correct = ['correct']
else:
else:
correct = ['incorrect']
correct = ['incorrect']
...
@@ -955,28 +1040,28 @@ Sample Problem:
...
@@ -955,28 +1040,28 @@ Sample Problem:
<p> Some tips:<ul><li>Only real element symbols are permitted.</li><li>Subscripts are entered with plain text.</li><li>Superscripts are indicated with a caret (^).</li><li>The reaction arrow (\(\longrightarrow\)) is indicated with "->".</li></ul>
<p> Some tips:<ul><li>Only real element symbols are permitted.</li><li>Subscripts are entered with plain text.</li><li>Superscripts are indicated with a caret (^).</li><li>The reaction arrow (\(\longrightarrow\)) is indicated with "->".</li></ul>
So, you can enter "H2SO4 -> H^+ + HSO4^-".</p>
So, you can enter "H2SO4 -> H^+ + HSO4^-".</p>
<endouttext/>
<endouttext/>
</problem>
</problem>
.. raw:: latex
.. raw:: latex
\newpage %
\newpage %
Schematic Response
Schematic Response
==================
==================
The Schematic Response input type provides an interactive grid on which the
The Schematic Response input type provides an interactive grid on which the
student can construct a schematic answer, such as a circuit.
student can construct a schematic answer, such as a circuit.