tao-test/app/taoQtiItem/test/integration/samples/xml/qtiv2p1/feedbacks/Example03-feedbackBlock-solution.xml

239 lines
12 KiB
XML
Raw Normal View History

2022-08-29 20:14:13 +02:00
<?xml version="1.0" encoding="UTF-8"?>
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
adaptive="true" identifier="Example03-feedbackBlock-solution" timeDependent="false"
title="Example 3 - Using feedbackBlock to show a solution" toolName="Mathqurate" toolVersion="0.9.7b"
xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1.xsd">
<responseDeclaration baseType="float" cardinality="single" identifier="RESPONSE">
<correctResponse>
<value>7.389</value>
</correctResponse>
</responseDeclaration>
<!--This response variable is set to true if the solution button is clicked.-->
<responseDeclaration baseType="boolean" cardinality="single" identifier="SOLREQUEST"/>
<outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="FEEDBACK"/>
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="EMPTY"/>
<outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE" normalMaximum="10.0"
normalMinimum="0.0">
<defaultValue>
<value>0.0</value>
</defaultValue>
</outcomeDeclaration>
<!--This outcome variable is set to true if the solution has been viewed.-->
<outcomeDeclaration baseType="boolean" cardinality="single" identifier="seenSolution">
<defaultValue>
<value>false</value>
</defaultValue>
</outcomeDeclaration>
<!--This outcome variable controls the display of the solution button.-->
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="ASKSOLUTION">
<defaultValue>
<value>asksolution</value>
</defaultValue>
</outcomeDeclaration>
<itemBody class="">
<div class="">
<p class="">Find the value of <m:math id="mathML0" display="block">
<m:semantics>
<m:mrow>
<m:msup>
<m:mi>e</m:mi>
<m:mn>2</m:mn>
</m:msup>
</m:mrow>
<m:annotation encoding="LaTeX">\[\e^2\]</m:annotation>
</m:semantics>
</m:math> to 3 decimal places.</p>
<div class="">
<table class="">
<tbody class="">
<tr class="">
<td class="">
<textEntryInteraction expectedLength="20" id="textEntryInteraction0"
label="mathInput" responseIdentifier="RESPONSE"/>
</td>
<td class="">
<feedbackInline id="feedbackInline0" identifier="CORRECT"
outcomeIdentifier="FEEDBACK" showHide="show"> Correct </feedbackInline>
<feedbackInline id="feedbackInline1" identifier="INCORRECT"
outcomeIdentifier="FEEDBACK" showHide="show"> No, that is not
the correct answer</feedbackInline>
</td>
</tr>
</tbody>
</table>
</div>
<!-- this feedbackBlock contains the solution -->
<feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
<div class="">
<m:math display="block" id="mathML1">
<m:semantics>
<m:mtable>
<m:mtr>
<m:mtd columnalign="right">
<m:msup>
<m:mi>e</m:mi>
<m:mn>2</m:mn>
</m:msup>
</m:mtd>
<m:mtd columnalign="center">
<m:mo>=</m:mo>
</m:mtd>
<m:mtd columnalign="left">
<m:mi>exp</m:mi>
<m:mfenced close=")" open="(">
<m:mn>2</m:mn>
</m:mfenced>
</m:mtd>
</m:mtr>
<m:mtr>
<m:mtd columnalign="right"/>
<m:mtd columnalign="center">
<m:mo>=</m:mo>
</m:mtd>
<m:mtd columnalign="left">
<m:mn>7.389</m:mn>
</m:mtd>
</m:mtr>
</m:mtable>
<m:annotation encoding="SnuggleTeX">\begin{eqnarray*}e^2 &amp;=&amp;
\exp(2)\\ &amp;=&amp; 7.389\end{eqnarray*}</m:annotation>
</m:semantics>
</m:math>
</div>
</feedbackBlock>
<!-- Explain why the score is zero (after viewing solution) -->
<feedbackBlock identifier="SEEN-SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
<p> Since you have viewed the solution, your score for this question will be 0. </p>
</feedbackBlock>
<!-- show the solution button -->
<feedbackBlock identifier="asksolution" outcomeIdentifier="ASKSOLUTION" showHide="show">
<p><endAttemptInteraction responseIdentifier="SOLREQUEST" title="Show Solution"/></p>
</feedbackBlock>
</div>
</itemBody>
<responseProcessing>
<setOutcomeValue identifier="FEEDBACK">
<multiple>
<variable identifier="EMPTY"/>
</multiple>
</setOutcomeValue>
<responseCondition>
<responseIf>
<variable identifier="SOLREQUEST"/>
<!--In response processing, the outcome variable FEEDBACK is set to the identifier
(SOLUTION) of the solution feedbackBlock, so that the solution appears.-->
<setOutcomeValue identifier="FEEDBACK">
<multiple>
<baseValue baseType="identifier">SOLUTION</baseValue>
</multiple>
</setOutcomeValue>
<!--The seenSolution flag is set to true so that the message about the score will
appear if an answer is submitted.-->
<setOutcomeValue identifier="seenSolution">
<baseValue baseType="boolean">true</baseValue>
</setOutcomeValue>
<!--The built-in outcome variable completionStatus is set to completed this must
happen at some stage in any adaptive question otherwise the question is never
complete, which is a problem in tests.-->
<setOutcomeValue identifier="completionStatus">
<baseValue baseType="identifier">completed</baseValue>
</setOutcomeValue>
<!--The solution button is removed by setting the ASKSOLUTION outcome variable to null-->
<setOutcomeValue identifier="ASKSOLUTION">
<baseValue baseType="identifier">null</baseValue>
</setOutcomeValue>
</responseIf>
<responseElse>
<responseCondition>
<responseIf>
<isNull>
<variable identifier="RESPONSE"/>
</isNull>
<setOutcomeValue identifier="SCORE">
<baseValue baseType="float">0</baseValue>
</setOutcomeValue>
</responseIf>
<responseElse>
<responseCondition>
<responseIf>
<equalRounded figures="3" roundingMode="decimalPlaces">
<variable identifier="RESPONSE"/>
<correct identifier="RESPONSE"/>
</equalRounded>
<setOutcomeValue identifier="FEEDBACK">
<multiple>
<baseValue baseType="identifier">CORRECT</baseValue>
</multiple>
</setOutcomeValue>
<setOutcomeValue identifier="SCORE">
<baseValue baseType="float">2</baseValue>
</setOutcomeValue>
</responseIf>
<responseElse>
<setOutcomeValue identifier="FEEDBACK">
<multiple>
<baseValue baseType="identifier">INCORRECT</baseValue>
</multiple>
</setOutcomeValue>
<setOutcomeValue identifier="SCORE">
<baseValue baseType="float">0</baseValue>
</setOutcomeValue>
</responseElse>
</responseCondition>
<!--When an answer has been submitted, once again the built-in outcome variable completionStatus
is set to completed and the solution button is removed.-->
<setOutcomeValue identifier="completionStatus">
<baseValue baseType="identifier">completed</baseValue>
</setOutcomeValue>
<setOutcomeValue identifier="ASKSOLUTION">
<baseValue baseType="identifier">null</baseValue>
</setOutcomeValue>
<responseCondition>
<responseIf>
<!--When an answer has been submitted, if the solution has been displayed, the message
about the score is added to the FEEDBACK, and SCORE is set to 0.0.-->
<variable identifier="seenSolution"/>
<setOutcomeValue identifier="FEEDBACK">
<multiple>
<variable identifier="FEEDBACK"/>
<baseValue baseType="identifier">SEEN-SOLUTION</baseValue>
</multiple>
</setOutcomeValue>
<setOutcomeValue identifier="SCORE">
<baseValue baseType="float">0.0</baseValue>
</setOutcomeValue>
</responseIf>
</responseCondition>
</responseElse>
</responseCondition>
</responseElse>
</responseCondition>
</responseProcessing>
</assessmentItem>