|
From: <dav...@us...> - 2010-04-08 14:58:22
|
Revision: 2435
http://qtitools.svn.sourceforge.net/qtitools/?rev=2435&view=rev
Author: davemckain
Date: 2010-04-08 14:58:10 +0000 (Thu, 08 Apr 2010)
Log Message:
-----------
QTIEngine(trunk): Removed remaining links with the
old MathAssess extensions. MathAssess is now served via
the new MathAssessEngine fork of QTIEngine.
Modified Paths:
--------------
trunk/projects/QTIEngine/grails-app/conf/BootStrap.groovy
trunk/projects/QTIEngine/grails-app/conf/BuildConfig.groovy
trunk/projects/QTIEngine/grails-app/controllers/ItemController.groovy
trunk/projects/QTIEngine/grails-app/services/TestService.groovy
Removed Paths:
-------------
trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01b-SR-Choice-arr.xml
trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01d-SR-Num-arr.xml
trunk/projects/QTIEngine/web-app/content/items-mathassess/MAC02-SR-demo.xml
trunk/projects/QTIEngine/web-app/content/items-mathassess/MAD03a.xml
trunk/projects/QTIEngine/web-app/content/items-mathassess/MAD03b.xml
trunk/projects/QTIEngine/web-app/content/items-mathassess/MAD05-SRinCO.xml
trunk/projects/QTIEngine/web-app/content/items-mathassess/MANum01CP.xml
trunk/projects/QTIEngine/web-app/content/items-mathassess/MANum01SR.xml
trunk/projects/QTIEngine/web-app/content/items-testing/mathInteraction.xml
Modified: trunk/projects/QTIEngine/grails-app/conf/BootStrap.groovy
===================================================================
--- trunk/projects/QTIEngine/grails-app/conf/BootStrap.groovy 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/grails-app/conf/BootStrap.groovy 2010-04-08 14:58:10 UTC (rev 2435)
@@ -5,20 +5,11 @@
new Item(itemFolderPath: "items-testing", itemFilename:"templated-inlinechoice.xml").save();
new Item(itemFolderPath: "items-testing", itemFilename:"error.xml").save();
new Item(itemFolderPath: "items-testing", itemFilename:"math4.xml").save();
- new Item(itemFolderPath: "items-testing", itemFilename:"mathInteraction.xml").save();
new Item(itemFolderPath: "items-mathassess", itemFilename:"MA-UT-01a-NoTP-Choice.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MA-UT-01b-SR-Choice-arr.xml").save();
new Item(itemFolderPath: "items-mathassess", itemFilename:"MA-UT-01c-NoTP-Num.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MA-UT-01d-SR-Num-arr.xml").save();
new Item(itemFolderPath: "items-mathassess", itemFilename:"MAA01a.xml").save();
new Item(itemFolderPath: "items-mathassess", itemFilename:"MAB01a.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MAC02-SR-demo.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MAD03a.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MAD03b.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MAD05-SRinCO.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MANum01CP.xml").save();
- new Item(itemFolderPath: "items-mathassess", itemFilename:"MANum01SR.xml").save();
new Item(itemFolderPath: "tests/onjira/FunctionPointAnalysis1", itemFilename:"question10.xml").save();
@@ -93,4 +84,4 @@
}
def destroy = {
}
-}
\ No newline at end of file
+}
Modified: trunk/projects/QTIEngine/grails-app/conf/BuildConfig.groovy
===================================================================
--- trunk/projects/QTIEngine/grails-app/conf/BuildConfig.groovy 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/grails-app/conf/BuildConfig.groovy 2010-04-08 14:58:10 UTC (rev 2435)
@@ -31,7 +31,6 @@
//runtime 'org.slf4j:slf4j-log4j12:1.4.2'
runtime 'javax.mail:mail:1.4'
compile 'org.qtitools:QTItoolsUtils:1.0-SNAPSHOT'
- //runtime 'org.qtitools:MathAssess:1.0-SNAPSHOT'
}
}
Modified: trunk/projects/QTIEngine/grails-app/controllers/ItemController.groovy
===================================================================
--- trunk/projects/QTIEngine/grails-app/controllers/ItemController.groovy 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/grails-app/controllers/ItemController.groovy 2010-04-08 14:58:10 UTC (rev 2435)
@@ -179,7 +179,6 @@
assessmentSource.getExtensionIncludes().addAll(Renderer.DEFAULT_ASSESSMENT_XSLT_SOURCE.getExtensionIncludes());
ExtensibleXSLTSource itemSource = new ExtensibleXSLTSource();
- itemSource.getExtensionIncludes().add("/org/qtitools/mathassess/MathInteraction.xsl");
itemSource.getExtensionIncludes().addAll(Renderer.DEFAULT_ITEM_XSLT_SOURCE.getExtensionIncludes());
session.renderer[item.itemFolderPath] = new Renderer("../../content/"+item.itemFolderPath+"/",
Modified: trunk/projects/QTIEngine/grails-app/services/TestService.groovy
===================================================================
--- trunk/projects/QTIEngine/grails-app/services/TestService.groovy 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/grails-app/services/TestService.groovy 2010-04-08 14:58:10 UTC (rev 2435)
@@ -41,7 +41,6 @@
assessmentSource.getExtensionIncludes().addAll(Renderer.DEFAULT_ASSESSMENT_XSLT_SOURCE.getExtensionIncludes());
ExtensibleXSLTSource itemSource = new ExtensibleXSLTSource();
- itemSource.getExtensionIncludes().add("/org/qtitools/mathassess/MathInteraction.xsl");
itemSource.getExtensionIncludes().addAll(Renderer.DEFAULT_ITEM_XSLT_SOURCE.getExtensionIncludes());
def folder = test.testFolderPath
Deleted: trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01b-SR-Choice-arr.xml
===================================================================
--- trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01b-SR-Choice-arr.xml 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01b-SR-Choice-arr.xml 2010-04-08 14:58:10 UTC (rev 2435)
@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<assessmentItem
- xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ma="http://mathassess.qtitools.org/xsd/mathassess"
- xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 imsqti_v2p1.xsd
- http://mathassess.qtitools.org/xsd/mathassess mathassess.xsd"
- xmlns:m="http://www.w3.org/1998/Math/MathML" adaptive="false"
- identifier="MA-UT-01b-SRP-Choice-arr" timeDependent="false" title="Algebraic Fractions - Is evaluation possible? (1b)">
-<!--
-Simple ScriptRule template processing, textEntryInteraction and numerical judging in response processing
--->
- <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
- <correctResponse>
- <value>ChoiceA</value>
- </correctResponse>
- </responseDeclaration>
- <responseDeclaration baseType="boolean" cardinality="single" identifier="HINTREQUEST" />
- <responseDeclaration baseType="boolean" cardinality="single" identifier="SOLREQUEST" />
- <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
- <defaultValue>
- <value>0.0</value>
- </defaultValue>
- </outcomeDeclaration>
- <outcomeDeclaration identifier="FEEDBACK" cardinality="single" baseType="identifier"/>
- <templateDeclaration baseType="boolean"
- cardinality="single" identifier="keepRandomSeed" mathVariable="false"
- paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iRandomSeed"
- mathVariable="false" paramVariable="false"/>
- <templateDeclaration baseType="boolean" cardinality="single" identifier="dummy" mathVariable="false" paramVariable="false"/>
- <templateDeclaration baseType="integer" cardinality="single" identifier="iA" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iAbsA" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iSignA" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iB" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iP" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iP2" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iQ" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mX" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mY" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mZ" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mNum" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mDen" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pNum" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pDen" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pX" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pZ" mathVariable="true" paramVariable="false" />
- <templateProcessing>
- <!-- simple randomisation begins -->
- <setTemplateValue identifier="dummy">
- <customOperator class="org.qtitools.mathassess.ScriptRule" ma:syntax="text/x-maxima">
- <baseValue baseType="string">
- <![CDATA[
- s1 : make_random_state(true)$ set_random_state(s1);
- simp:true;
- iAbsA : ev((random(9)+1),simp);
- iSignA : ev(random(3),simp);
- if iSignA>0 then iA : ev(iAbsA,simp) else iA : ev(-iAbsA,simp);
- iB: ev(((random(9)+1)*(random(2)*2-1)),simp);
- array(aarr,6);
- fillarray(aarr,[a,c,p,r,s,u,x]);
- mX:aarr[random(7)];
- fillarray(aarr,[b,h,j,t,v,y,z]);
- mY:aarr[random(7)];
- fillarray(aarr,[d,g,k,m,n,q,w]);
- mZ:aarr[random(7)];
- mNum:mX+iB;
- iP:ev(-iA,simp);
- iQ:ev(-iB,simp);
- iP2:ev(2*iP,simp);
- simp:false;
- if iSignA=0 then mDen: mZ + iAbsA else (if iSignA=1 then mDen: mZ-iAbsA else mDen:iAbsA-mZ );
- ]]>
- </baseValue>
- </customOperator>
- </setTemplateValue>
- <setTemplateValue identifier="pNum">
- <fieldValue fieldIdentifier="PMathML">
- <variable identifier="mNum"/>
- </fieldValue>
- </setTemplateValue>
- <setTemplateValue identifier="pDen">
- <fieldValue fieldIdentifier="PMathML">
- <variable identifier="mDen"/>
- </fieldValue>
- </setTemplateValue>
- <setTemplateValue identifier="pX">
- <fieldValue fieldIdentifier="PMathML">
- <variable identifier="mZ"/>
- </fieldValue>
- </setTemplateValue>
- <setTemplateValue identifier="pZ">
- <fieldValue fieldIdentifier="PMathML">
- <variable identifier="mZ"/>
- </fieldValue>
- </setTemplateValue>
- </templateProcessing>
- <itemBody><!-- contains MathML -->
- <p>For what value of  
- <m:math>
- <m:semantics>
- <m:mrow>
- <m:mi>iA</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{iA}\]</m:annotation>
- </m:semantics>
- </m:math>  will it not be possible to evaluate
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mfrac>
- <m:mrow>
- <m:mi>mNum</m:mi>
- </m:mrow>
- <m:mrow>
- <m:mi>mDen</m:mi>
- </m:mrow>
- </m:mfrac>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\frac{\qv{mNum}}{\qv{mDen}}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <div>
- <table>
- <tbody>
- <tr>
- <td>
- <choiceInteraction responseIdentifier="RESPONSE" shuffle="true" maxChoices="1">
- <!--<prompt>Select one of these options:</prompt>-->
- <simpleChoice identifier="ChoiceA">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iA</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iA}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK" identifier="ChoiceA" showHide="show">  Correct answer, 1 mark.</feedbackInline>
- </simpleChoice>
- <simpleChoice identifier="ChoiceB">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iP</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iP}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackBlock outcomeIdentifier="FEEDBACK" identifier="ChoiceB" showHide="show"><p>  The fraction cannot be evaluated when the denominator evaluates to zero.</p>
- <p>However, when  
- <m:math>
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iP</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iP}\]</m:annotation>
- </m:semantics>
- </m:math>  it evaluates to <printedVariable identifier="iP2"/>.
- </p>
- <p>You have the wrong sign, 0.5 marks.</p></feedbackBlock>
- </simpleChoice>
- <simpleChoice identifier="ChoiceC">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mX</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iB</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mX}=\qv{iB}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK" identifier="ChoiceC" showHide="show">  The fraction cannot be evaluated when the denominator evaluates to zero; the value of the numerator does not affect this.</feedbackInline>
- </simpleChoice>
- <simpleChoice identifier="ChoiceD">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mX</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iQ</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mX}=\qv{iQ}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK" identifier="ChoiceD" showHide="show">  The fraction cannot be evaluated when the denominator evaluates to zero; the value of the numerator does not affect this.</feedbackInline>
- </simpleChoice>
- </choiceInteraction>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
- <div>
- <p>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mfrac>
- <m:mrow>
- <m:mi>mNum</m:mi>
- </m:mrow>
- <m:mrow>
- <m:mi>mDen</m:mi>
- </m:mrow>
- </m:mfrac>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\frac{\qv{mNum}}{\qv{mDen}}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <p>cannot be evaluated when the denominator takes the value zero, since it is not possible to divide by zero.</p>
- <p>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mDen</m:mi>
- <m:mo>=</m:mo>
- <m:mn>0</m:mn>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mDen}=0\]</m:annotation>
- </m:semantics>
- </m:math>  when  
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iA</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iA}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <p>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mfrac>
- <m:mrow>
- <m:mi>mNum</m:mi>
- </m:mrow>
- <m:mrow>
- <m:mi>mDen</m:mi>
- </m:mrow>
- </m:mfrac>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\frac{\qv{mNum}}{\qv{mDen}}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <p>cannot be evaluated when  
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iA</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iA}\]</m:annotation>
- </m:semantics>
- </m:math>.
- </p>
- </div>
- </feedbackBlock>
- <feedbackBlock identifier="HINT" outcomeIdentifier="FEEDBACK" showHide="show" >
- <p>When is it impossible to evaluate a fraction?</p>
- </feedbackBlock>
- <p>
- <endAttemptInteraction responseIdentifier="HINTREQUEST" title="Show Hint" />
- <endAttemptInteraction responseIdentifier="SOLREQUEST" title="Show Solution" />
- </p>
- </itemBody>
- <responseProcessing><!-- basic string match, includes feedback on specific errors -->
- <responseCondition>
- <responseIf>
- <variable identifier="HINTREQUEST"/>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">HINT</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <variable identifier="SOLREQUEST"/>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">SOLUTION</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElse>
- <responseCondition>
- <responseIf>
- <match>
- <variable identifier="RESPONSE"/>
- <correct identifier="RESPONSE"/>
- </match>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">1</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <match>
- <variable identifier="RESPONSE"/>
- <baseValue baseType="identifier">ChoiceB</baseValue>
- </match>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">0.5</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElse>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">0</baseValue>
- </setOutcomeValue>
- </responseElse>
- </responseCondition>
- <setOutcomeValue identifier="FEEDBACK">
- <variable identifier="RESPONSE"/>
- </setOutcomeValue>
- </responseElse>
- </responseCondition>
- </responseProcessing>
-</assessmentItem>
Deleted: trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01d-SR-Num-arr.xml
===================================================================
--- trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01d-SR-Num-arr.xml 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/web-app/content/items-mathassess/MA-UT-01d-SR-Num-arr.xml 2010-04-08 14:58:10 UTC (rev 2435)
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<assessmentItem
- xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ma="http://mathassess.qtitools.org/xsd/mathassess"
- xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 imsqti_v2p1.xsd
- http://mathassess.qtitools.org/xsd/mathassess mathassess.xsd"
- xmlns:m="http://www.w3.org/1998/Math/MathML" adaptive="false"
- identifier="MA-UT-01d-SR-Num" timeDependent="false" title="Algebraic Fractions - Is evaluation possible? (1d)">
-<!--
-Simple ScriptRule template processing, textEntryInteraction and numerical judging in response processing
--->
- <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="integer" />
- <responseDeclaration baseType="boolean" cardinality="single" identifier="HINTREQUEST" />
- <responseDeclaration baseType="boolean" cardinality="single" identifier="SOLREQUEST" />
- <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
- <defaultValue>
- <value>0.0</value>
- </defaultValue>
- </outcomeDeclaration>
- <outcomeDeclaration identifier="FEEDBACK" cardinality="single" baseType="identifier"/>
- <templateDeclaration baseType="boolean"
- cardinality="single" identifier="keepRandomSeed" mathVariable="false"
- paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iRandomSeed"
- mathVariable="false" paramVariable="false"/>
- <templateDeclaration baseType="boolean" cardinality="single" identifier="dummy" mathVariable="false" paramVariable="false"/>
- <templateDeclaration baseType="integer" cardinality="single" identifier="iA" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iAbsA" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iSignA" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iP" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iP2" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mX" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mY" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mZ" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mNum" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record" identifier="mDen" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pNum" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pDen" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pX" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="string" cardinality="single" identifier="pZ" mathVariable="true" paramVariable="false" />
- <templateProcessing>
- <!-- simple randomisation begins -->
- <setTemplateValue identifier="dummy">
- <customOperator class="org.qtitools.mathassess.ScriptRule" ma:syntax="text/x-maxima">
- <baseValue baseType="string">
- <![CDATA[
- s1 : make_random_state(true)$ set_random_state(s1);
- iAbsA : ev((random(9)+1),simp);
- iSignA : ev(random(3),simp);
- if iSignA>0 then ev(iAbsA,simp) else iA : ev(-iAbsA,simp);
- array(aarr,6);
- fillarray(aarr,[a,c,p,r,s,u,x]);
- mX:aarr[random(7)];
- fillarray(aarr,[b,h,j,t,v,y,z]);
- mY:aarr[random(7)];
- fillarray(aarr,[d,g,k,m,n,q,w]);
- mZ:aarr[random(7)];
- mNum:mX+mY;
- iP:ev(-iA,simp);
- iP2:ev(2*iP,simp);
- simp:false;
- if iSignA=0 then mDen: mZ + iAbsA else (if iSignA=1 then mDen: mZ-iAbsA else mDen:iAbsA-mZ );
- ]]>
- </baseValue>
- </customOperator>
- </setTemplateValue>
- <setTemplateValue identifier="pNum">
- <fieldValue fieldIdentifier="PMathML">
- <variable identifier="mNum"/>
- </fieldValue>
- </setTemplateValue>
- <setTemplateValue identifier="pDen">
- <fieldValue fieldIdentifier="PMathML">
- <variable identifier="mDen"/>
- </fieldValue>
- </setTemplateValue>
- <setTemplateValue identifier="pZ">
- <fieldValue fieldIdentifier="PMathML">
- <variable identifier="mZ"/>
- </fieldValue>
- </setTemplateValue>
- </templateProcessing>
- <itemBody><!-- contains MathML -->
- <p>For what value of  
- <m:math>
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}\]</m:annotation>
- </m:semantics>
- </m:math>  will it not be possible to evaluate
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mfrac>
- <m:mrow>
- <m:mi>mNum</m:mi>
- </m:mrow>
- <m:mrow>
- <m:mi>mDen</m:mi>
- </m:mrow>
- </m:mfrac>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\frac{\qv{mNum}}{\qv{mDen}}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <div>
- <table>
- <tbody>
- <tr>
- <td>
- <textEntryInteraction expectedLength="10" responseIdentifier="RESPONSE" label="mathInput" />
- </td>
- <td>
- <feedbackInline identifier="CORRECT" outcomeIdentifier="FEEDBACK" showHide="show">
- Correct, 1 mark.
- </feedbackInline>
- <feedbackBlock identifier="INCORR-SIGN" outcomeIdentifier="FEEDBACK" showHide="show">
- <p>The fraction cannot be evaluated when the denominator evaluates to zero.</p>
- <p>However, when  
- <m:math>
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iP</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iP}\]</m:annotation>
- </m:semantics>
- </m:math>  it evaluates to <printedVariable identifier="iP2"/>.
- </p>
- <p>You have the wrong sign, 0.5 marks.</p>
- </feedbackBlock>
- <feedbackInline identifier="INCORRECT" outcomeIdentifier="FEEDBACK" showHide="show">
- You should ask for tutor help on this question.
- </feedbackInline>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
- <div>
- <p>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mfrac>
- <m:mrow>
- <m:mi>mNum</m:mi>
- </m:mrow>
- <m:mrow>
- <m:mi>mDen</m:mi>
- </m:mrow>
- </m:mfrac>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\frac{\qv{mNum}}{\qv{mDen}}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <p>cannot be evaluated when the denominator takes the value zero, since it is not possible to divide by zero.</p>
- <p>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mDen</m:mi>
- <m:mo>=</m:mo>
- <m:mn>0</m:mn>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mDen}=0\]</m:annotation>
- </m:semantics>
- </m:math>  when  
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iA</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iA}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <p>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mfrac>
- <m:mrow>
- <m:mi>mNum</m:mi>
- </m:mrow>
- <m:mrow>
- <m:mi>mDen</m:mi>
- </m:mrow>
- </m:mfrac>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\frac{\qv{mNum}}{\qv{mDen}}\]</m:annotation>
- </m:semantics>
- </m:math>
- </p>
- <p>cannot be evaluated when  
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>mZ</m:mi>
- <m:mo>=</m:mo>
- <m:mi>iA</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{mZ}=\qv{iA}\]</m:annotation>
- </m:semantics>
- </m:math>.
- </p>
- </div>
- </feedbackBlock>
- <feedbackBlock identifier="HINT" outcomeIdentifier="FEEDBACK" showHide="show" >
- <p>When is it impossible to evaluate a fraction?</p>
- </feedbackBlock>
- <p>
- <endAttemptInteraction responseIdentifier="HINTREQUEST" title="Show Hint" />
- <endAttemptInteraction responseIdentifier="SOLREQUEST" title="Show Solution" />
- </p>
- </itemBody>
- <responseProcessing><!-- basic string match, includes feedback on specific errors -->
- <responseCondition>
- <responseIf>
- <variable identifier="HINTREQUEST"/>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">HINT</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <variable identifier="SOLREQUEST"/>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">SOLUTION</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElse>
- <responseCondition>
- <responseIf>
- <isNull>
- <variable identifier="RESPONSE"/>
- </isNull>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">0</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <match>
- <variable identifier="RESPONSE"/>
- <variable identifier="iA"/>
- </match>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">CORRECT</baseValue>
- </setOutcomeValue>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">1</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElseIf>
- <match>
- <variable identifier="RESPONSE"/>
- <variable identifier="iP"/>
- </match>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">INCORR-SIGN</baseValue>
- </setOutcomeValue>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">0.5</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElse>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">INCORRECT</baseValue>
- </setOutcomeValue>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">0</baseValue>
- </setOutcomeValue>
- </responseElse>
- </responseCondition>
- </responseElse>
- </responseCondition>
- </responseProcessing>
-</assessmentItem>
Deleted: trunk/projects/QTIEngine/web-app/content/items-mathassess/MAC02-SR-demo.xml
===================================================================
--- trunk/projects/QTIEngine/web-app/content/items-mathassess/MAC02-SR-demo.xml 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/web-app/content/items-mathassess/MAC02-SR-demo.xml 2010-04-08 14:58:10 UTC (rev 2435)
@@ -1,411 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ma="http://mathassess.qtitools.org/xsd/mathassess"
- xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 imsqti_v2p1.xsd
- http://mathassess.qtitools.org/xsd/mathassess mathassess.xsd"
- xmlns:m="http://www.w3.org/1998/Math/MathML" adaptive="false"
- identifier="MAC02-SR" timeDependent="false"
- title="Expand brackets in a(x+b)+cx and simplify">
- <!--
- template processing with ScriptRule randomisation, ChoiceInteraction
- -->
- <responseDeclaration identifier="RESPONSE"
- cardinality="single" baseType="identifier">
- <correctResponse>
- <value>ChoiceA</value>
- </correctResponse>
- </responseDeclaration>
- <responseDeclaration baseType="boolean"
- cardinality="single" identifier="HINTREQUEST" />
- <responseDeclaration baseType="boolean"
- cardinality="single" identifier="SOLREQUEST" />
- <outcomeDeclaration identifier="SCORE" cardinality="single"
- baseType="float">
- <defaultValue>
- <value>0.0</value>
- </defaultValue>
- </outcomeDeclaration>
- <outcomeDeclaration identifier="FEEDBACK"
- cardinality="single" baseType="identifier" />
- <!-- add template processing, using QTIv2.1 native elements -->
- <templateDeclaration baseType="boolean"
- cardinality="single" identifier="keepRandomSeed" mathVariable="false"
- paramVariable="false" />
- <templateDeclaration baseType="integer" cardinality="single" identifier="iRandomSeed"
- mathVariable="false" paramVariable="false"/>
- <templateDeclaration baseType="boolean"
- cardinality="single" identifier="dummy" mathVariable="false"
- paramVariable="false" />
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iA" mathVariable="true"
- paramVariable="false">
- <defaultValue>
- <value>0</value>
- </defaultValue>
- </templateDeclaration>
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iAbsA" mathVariable="true"
- paramVariable="false" />
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iB" mathVariable="true"
- paramVariable="false">
- <defaultValue>
- <value>0</value>
- </defaultValue>
- </templateDeclaration>
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iAbsB" mathVariable="true"
- paramVariable="false" />
- <templateDeclaration cardinality="record"
- identifier="mSignB" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iC" mathVariable="true"
- paramVariable="false">
- <defaultValue>
- <value>0</value>
- </defaultValue>
- </templateDeclaration>
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iAbsC" mathVariable="true"
- paramVariable="false" />
- <templateDeclaration cardinality="record"
- identifier="mSignC" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iAB" mathVariable="true"
- paramVariable="false" />
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iAbsAB" mathVariable="true"
- paramVariable="false" />
- <templateDeclaration cardinality="record"
- identifier="mSignAB" mathVariable="true" paramVariable="false" />
- <templateDeclaration cardinality="record"
- identifier="mBadSignAB" mathVariable="true" paramVariable="false" />
- <templateDeclaration baseType="integer"
- cardinality="single" identifier="iApC" mathVariable="true"
- paramVariable="false" />
- <templateDeclaration cardinality="record"
- identifier="mX" mathVariable="true" paramVariable="false" />
- <templateProcessing>
- <!--
- now do the randomisation and mathematical calculations, using maxima
- -->
- <setTemplateValue identifier="dummy">
- <customOperator class="org.qtitools.mathassess.ScriptRule"
- ma:syntax="text/x-maxima">
- <baseValue baseType="string">
- <![CDATA[
- for iI:1 step 1 unless (not(abs(iA)=1) and not((iA+iC)=0) and not(abs(iA+iC)=1) and not(abs(iC)=0) and gcd(iA*iB,iA+iC)=1) do block(
- iA: ev((random(9)+1),simp),
- iB: ev((random(9)+1)*(-1),simp),
- iC: ev((random(9)+1),simp));
- iAbsA: ev(abs(iA),simp);
- iAbsB: ev(abs(iB),simp);
- iAbsC: ev(abs(iC),simp);
- iAB: ev(iA*iB,simp);
- iAbsAB: ev(abs(iAB),simp);
- iApC: ev(iA+iC,simp);
- array(aarr,19);
- fillarray(aarr,[a,b,c,d,g,h,k,m,n,p,q,r,s,t,u,v,w,x,y,z]);
- mX:aarr[random(19)];
- ]]>
- </baseValue>
- </customOperator>
- </setTemplateValue>
- </templateProcessing>
- <itemBody>
- <!--
- templateVariables are used in the question statement, choices and
- feedback, including some of type string with mathVariable set;
- printedVariable for these should produce MathML
- -->
- <p>
- Expand the brackets in
- <m:math>
- <m:semantics>
- <m:mrow>
- <m:mi>iA</m:mi>
- <m:mo>(</m:mo>
- <m:mi>mX</m:mi>
- <m:mo>-</m:mo>
- <!-- Using variable substitution in mo (QTI extension) -->
- <m:mi>iAbsB</m:mi>
- <m:mo>)</m:mo>
- <m:mo>+</m:mo>
- <!-- Using variable substitution in mo (QTI extension) -->
- <m:mi>iAbsC</m:mi>
- <m:mi>mX</m:mi>
- <!--
- Using variable substitution for our random letter (QTI
- extension)
- -->
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{iA}(\qv{mX}
- - \qv{iAbs}) + \qv{iAbsC} \qv{mX}\]
- </m:annotation>
- </m:semantics>
- </m:math>
- and simplify the result.
- </p>
- <choiceInteraction responseIdentifier="RESPONSE"
- shuffle="true" maxChoices="1">
- <!--<prompt>Select one of these options:</prompt>-->
- <simpleChoice identifier="ChoiceA">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>iApC</m:mi>
- <m:mi>mX</m:mi>
- <m:mo>-</m:mo>
- <m:mi>iAbsAB</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{iApC} \qv{mX}
- - \qv{iAbsAB}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK"
- identifier="ChoiceA" showHide="show">Well done - you got the
- correct answer. Two marks.</feedbackInline>
- </simpleChoice>
- <simpleChoice identifier="ChoiceB">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>iApC</m:mi>
- <m:mi>mX</m:mi>
- <m:mo>-</m:mo>
- <m:mi>iAbsB</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{iApC} \qv{mX}
- - \qv{iAbsB}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK"
- identifier="ChoiceB" showHide="show">Remember that, when
- expanding brackets, all terms inside must be multiplied by
- whatever is outside. However, you got one term in the answer correct, so 1
- mark.</feedbackInline>
- </simpleChoice>
- <simpleChoice identifier="ChoiceC">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>iApC</m:mi>
- <m:mi>mX</m:mi>
- <m:mo>+</m:mo>
- <m:mi>iAbsAB</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{iApC} \qv{mX}
- + \qv{iAbsAB}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK"
- identifier="ChoiceC" showHide="show">
- When expanding the bracket the product of
- <printedVariable identifier="iA" />
- and
- <printedVariable identifier="iB" />
- is
- <printedVariable identifier="iAB" />
- .
- However, you got one term in the answer correct so 1 mark.
- </feedbackInline>
- </simpleChoice>
- <simpleChoice identifier="ChoiceD">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>iA</m:mi>
- <m:mi>mX</m:mi>
- <m:mo>-</m:mo>
- <m:mi>iAbsAB</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{iA} \qv{mX}
- - \qv{iAbsAB}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK"
- identifier="ChoiceD" showHide="show">
- Remember to include both of the terms in
- <m:math>
- <m:semantics>
- <m:mrow>
- <m:mi>mX</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[mX\]</m:annotation>
- </m:semantics>
- </m:math>
- . However, you got one term in the answer correct so 1 mark.
- </feedbackInline>
- </simpleChoice>
- <simpleChoice identifier="ChoiceE">
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>iA</m:mi>
- <m:mi>mX</m:mi>
- <m:mo>-</m:mo>
- <m:mi>iAbsB</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[\qv{iA} \qv{mX}
- - \qv{iAbsB}\]</m:annotation>
- </m:semantics>
- </m:math>
- <feedbackInline outcomeIdentifier="FEEDBACK"
- identifier="ChoiceE" showHide="show">You should ask for tutor
- help on this question.</feedbackInline>
- </simpleChoice>
- </choiceInteraction>
- <feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK"
- showHide="show">
- <table>
- <tbody>
- <tr>
- <td>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>iA</m:mi>
- <m:mo>(</m:mo>
- <m:mi>mX</m:mi>
- <m:mo>-</m:mo>
- <m:mi>iAbsB</m:mi>
- <m:mo>)</m:mo>
- <m:mo>+</m:mo>
- <m:mi>iAbsC</m:mi>
- <m:mi>mX</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[= \qv{iA}(\qv{mX}
- - \qv{iAbsB}) + \qv{iAbsC} \qv{mX}\]
- </m:annotation>
- </m:semantics>
- </m:math>
- </td>
- <td>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mo>=</m:mo>
- <m:mrow>
- <m:mi>iA</m:mi>
- <m:mo>×</m:mo>
- <m:mi>mX</m:mi>
- </m:mrow>
- <m:mo>-</m:mo>
- <m:mrow>
- <m:mi>iAbsA</m:mi>
- <m:mo>×</m:mo>
- <m:mi>iAbsB</m:mi>
- </m:mrow>
- <m:mo>+</m:mo>
- <m:mrow>
- <m:mi>iAbsC</m:mi>
- <m:mo>×</m:mo>
- <m:mi>mX</m:mi>
- </m:mrow>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[= \qv{iA} \times
- \qv{mX} - \qv{iAbsA} \times \qv{iAbsB} +
- \qv{iAbsC} \times \qv{mX}\]</m:annotation>
- </m:semantics>
- </m:math>
- </td>
- </tr>
- <tr>
- <td> </td>
- <td>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mo>=</m:mo>
- <m:mi>iApC</m:mi>
- <m:mi>mX</m:mi>
- <m:mo>-</m:mo>
- <m:mi>iAbsAB</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[= \qv{iApC} \qv{mX}
- - \qv{iAbsAB}\]</m:annotation>
- </m:semantics>
- </m:math>
- </td>
- </tr>
- </tbody>
- </table>
- </feedbackBlock>
- <feedbackBlock identifier="HINT" outcomeIdentifier="FEEDBACK"
- showHide="show">
- <p>Expand the bracket and collect like terms.</p>
- </feedbackBlock>
- <p>
- <endAttemptInteraction responseIdentifier="HINTREQUEST"
- title="Show Hint" />
- <endAttemptInteraction responseIdentifier="SOLREQUEST"
- title="Show Solution" />
- </p>
- </itemBody>
- <responseProcessing>
- <!-- basic match, includes feedback on specific errors -->
- <responseCondition>
- <responseIf>
- <variable identifier="HINTREQUEST" />
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">HINT</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <variable identifier="SOLREQUEST" />
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">SOLUTION</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElse>
- <responseCondition>
- <responseIf>
- <match>
- <variable identifier="RESPONSE" />
- <correct identifier="RESPONSE" />
- </match>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">2</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <match>
- <variable identifier="RESPONSE" />
- <baseValue baseType="identifier">ChoiceB</baseValue>
- </match>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">1</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElseIf>
- <match>
- <variable identifier="RESPONSE" />
- <baseValue baseType="identifier">ChoiceC</baseValue>
- </match>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">1</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElseIf>
- <match>
- <variable identifier="RESPONSE" />
- <baseValue baseType="identifier">ChoiceD</baseValue>
- </match>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">1</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElse>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">0</baseValue>
- </setOutcomeValue>
- </responseElse>
- </responseCondition>
- <setOutcomeValue identifier="FEEDBACK">
- <variable identifier="RESPONSE" />
- </setOutcomeValue>
- </responseElse>
- </responseCondition>
- </responseProcessing>
-</assessmentItem>
-
Deleted: trunk/projects/QTIEngine/web-app/content/items-mathassess/MAD03a.xml
===================================================================
--- trunk/projects/QTIEngine/web-app/content/items-mathassess/MAD03a.xml 2010-04-08 14:56:12 UTC (rev 2434)
+++ trunk/projects/QTIEngine/web-app/content/items-mathassess/MAD03a.xml 2010-04-08 14:58:10 UTC (rev 2435)
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<assessmentItem
- xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ma="http://mathassess.qtitools.org/xsd/mathassess"
- xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 imsqti_v2p1.xsd
- http://mathassess.qtitools.org/xsd/mathassess mathassess.xsd"
- xmlns:m="http://www.w3.org/1998/Math/MathML" adaptive="false"
- identifier="MAD03a" timeDependent="false" title="Nxpand brackets in a(x+b)+cx and simplify (4)">
-<!--
-No randomisation in template processing, CasProcess to set answer and buggy answers, MathEntryInteraction, casCompare in response processing
--->
-
- <responseDeclaration identifier="RESPONSE" cardinality="record" />
- <responseDeclaration baseType="string" cardinality="single" identifier="printMath" />
- <responseDeclaration baseType="boolean" cardinality="single" identifier="HINTREQUEST" />
- <responseDeclaration baseType="boolean" cardinality="single" identifier="SOLREQUEST" />
- <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
- <defaultValue>
- <value>0.0</value>
- </defaultValue>
- </outcomeDeclaration>
- <outcomeDeclaration identifier="FEEDBACK" cardinality="single" baseType="identifier"/>
- <templateDeclaration baseType="boolean" cardinality="single" identifier="dummy" mathVariable="false" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mAns" mathVariable="true" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mBad1" mathVariable="true" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mBad2" mathVariable="true" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mBad3" mathVariable="true" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mBad4" mathVariable="true" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mBad5" mathVariable="true" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mBad6" mathVariable="true" paramVariable="false"/>
- <templateDeclaration cardinality="record" identifier="mBad7" mathVariable="true" paramVariable="false"/>
- <templateProcessing>
-
- <setTemplateValue identifier="dummy">
- <customOperator class="org.qtitools.mathassess.ScriptRule" ma:syntax="text/x-maxima">
- <baseValue baseType="string">
- <![CDATA[
- simp:false;
- mAns:6*x-10;
- mBad1:-10+6*x;
- mBad2:2*x-10+4*x;
- mBad3:6*x-5;
- mBad4:5*x-10;
- mBad5:6*x+10;
- mBad6:2*(3*x-5);
- mBad7:2*(x-5)+4*x;
- ]]>
- </baseValue>
- </customOperator>
- </setTemplateValue>
-
- </templateProcessing>
- <itemBody><!-- contains MathML -->
- <p>Expand the brackets in   
- <m:math >
- <m:semantics>
- <m:mrow>
- <m:mn>2</m:mn>
- <m:mo>(</m:mo>
- <m:mi>x</m:mi>
- <m:mo>-</m:mo>
- <m:mn>5</m:mn>
- <m:mo>)</m:mo>
- <m:mo>+</m:mo>
- <m:mn>4</m:mn>
- <m:mi>x</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[ 2(x-5)+4x\]</m:annotation>
- </m:semantics>
- </m:math>   and simplify the result.
- </p>
- <div>
- <table>
- <tbody>
- <tr>
- <td>
- <customInteraction class="org.qtitools.mathassess.MathEntryInteraction" responseIdentifier="RESPONSE" ma:syntax="text/x-maxima" ma:expectedLength="20" ma:printIdentifier="printMath" />
- </td>
- <td>
- <feedbackInline identifier="CORRECT" outcomeIdentifier="FEEDBACK" showHide="show">
- Correct
- </feedbackInline>
- <feedbackInline identifier="CORRECT-ORD" outcomeIdentifier="FEEDBACK" showHide="show">
- Your answer is correct, so you gain two marks, but it would be more usual to write it in the form   
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mn>6</m:mn>
- <m:mi>x</m:mi>
- <m:mo>-</m:mo>
- <m:mn>10</m:mn>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[6x-10\]</m:annotation>
- </m:semantics>
- </m:math>.
- </feedbackInline>
- <feedbackInline identifier="NOT-SIMP" outcomeIdentifier="FEEDBACK" showHide="show">
- You have expanded the bracket correctly but failed to simplify as the question asks; 1 mark.
- </feedbackInline>
- <feedbackInline identifier="NOT-ALL-MULT" outcomeIdentifier="FEEDBACK" showHide="show">
- Remember that, when expanding brackets, all terms inside must be multiplied by whatever is outside.
- However, you got one term in the answer correct, so 1 mark.
- </feedbackInline>
- <feedbackInline identifier="WRONG-SIGN-CONSTANT" outcomeIdentifier="FEEDBACK" showHide="show">
- When expanding the bracket the product of 2 and -5 is -10.
- However, you got one term in the answer correct so 1 mark.
- </feedbackInline>
- <feedbackInline identifier="FACTOR-ALL" outcomeIdentifier="FEEDBACK" showHide="show">
- The question expects you to rewrite the expression without brackets.
- </feedbackInline>
- <feedbackInline identifier="ORIG-EXPR" outcomeIdentifier="FEEDBACK" showHide="show">
- Your input is equivalent to the expression we started with!
- </feedbackInline>
- <feedbackInline identifier="INCORRECT" outcomeIdentifier="FEEDBACK" showHide="show">
- You should ask for tutor help on this question.
- </feedbackInline>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
- <div>
- <table>
- <tbody>
- <tr>
- <td>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mi>2</m:mi>
- <m:mo>(</m:mo>
- <m:mi>x</m:mi>
- <m:mo>-</m:mo>
- <m:mi>5</m:mi>
- <m:mo>)</m:mo>
- <m:mo>+</m:mo>
- <m:mi>4</m:mi>
- <m:mi>x</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[ 2(x-5)+4x\]</m:annotation>
- </m:semantics>
- </m:math>
- </td>
- <td>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mo> = </m:mo>
- <m:mrow>
- <m:mi>2</m:mi>
- <m:mo>×</m:mo>
- <m:mi>x</m:mi>
- </m:mrow>
- <m:mo>-</m:mo>
- <m:mrow>
- <m:mi>2</m:mi>
- <m:mo>×</m:mo>
- <m:mi>5</m:mi>
- </m:mrow>
- <m:mo>+</m:mo>
- <m:mrow>
- <m:mi>4</m:mi>
- <m:mo>×</m:mo>
- <m:mi>x</m:mi>
- </m:mrow>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[ = 2 \times x - 2 \times 5 + 4 \times x\]</m:annotation>
- </m:semantics>
- </m:math>
- </td>
- </tr>
- <tr>
- <td> </td>
- <td>
- <m:math display="block">
- <m:semantics>
- <m:mrow>
- <m:mo> = </m:mo>
- <m:mi>6</m:mi>
- <m:mi>x</m:mi>
- <m:mo>-</m:mo>
- <m:mi>10</m:mi>
- </m:mrow>
- <m:annotation encoding='LaTeX'>\[ = 6x - 10\]</m:annotation>
- </m:semantics>
- </m:math>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </feedbackBlock>
- <feedbackBlock identifier="HINT" outcomeIdentifier="FEEDBACK" showHide="show" >
- <p>Expand the bracket and collect like terms.</p>
- </feedbackBlock>
- <p>
- <endAttemptInteraction responseIdentifier="HINTREQUEST" title="Show Hint" />
- <endAttemptInteraction responseIdentifier="SOLREQUEST" title="Show Solution" />
- </p>
- </itemBody>
- <responseProcessing><!-- basic string match, includes feedback on specific errors -->
- <responseCondition>
- <responseIf>
- <variable identifier="HINTREQUEST"/>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">HINT</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <variable identifier="SOLREQUEST"/>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">SOLUTION</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElse>
- <responseCondition>
- <responseIf>
- <isNull>
- <variable identifier="RESPONSE"/>
- </isNull>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">0</baseValue>
- </setOutcomeValue>
- </responseIf>
- <responseElseIf>
- <customOperator class ="org.qtitools.mathassess.CasCompare" ma:syntax="text/x-maxima" ma:action="syntequal" ma:simplify="false">
- <variable identifier = "RESPONSE"/>
- <variable identifier = "mAns"/>
- </customOperator>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">CORRECT</baseValue>
- </setOutcomeValue>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">2</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElseIf>
- <customOperator class ="org.qtitools.mathassess.CasCompare" ma:syntax="text/x-maxima" ma:action="syntequal" ma:simplify="false">
- <variable identifier = "RESPONSE"/>
- <variable identifier = "mBad1"/>
- </customOperator>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">CORRECT-ORD</baseValue>
- </setOutcomeValue>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">2</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElseIf>
- <!--<customOperator class ="org.qtitools.mathassess.CasCompare" ma:syntax="text/x-maxima" ma:action="syntequal" ma:simplify="false">
- <variable identifier = "RESPONSE"/>
- <variable identifier = "mBad2"/>
- </customOperator>-->
- <customOperator class ="org.qtitools.mathassess.CasCondition" ma:syntax="text/x-maxima" ma:simplify="false" ma:code="is(polynomialp($1,[x])and(is(hipow(expand($1),x)=hipow(expand($2),x)))and(not(coeff($1,x,1)=coeff($2,x,1))or(not(coeff($1,x,0)=coeff($2,x,0))))and(is(ev($1-$2,simp)=0)));">
- <variable identifier = "RESPONSE"/>
- <variable identifier = "mAns"/>
- </customOperator>
- <setOutcomeValue identifier="FEEDBACK">
- <baseValue baseType="identifier">NOT-SIMP</baseValue>
- </setOutcomeValue>
- <setOutcomeValue identifier="SCORE">
- <baseValue baseType="float">1</baseValue>
- </setOutcomeValue>
- </responseElseIf>
- <responseElseIf>
- <customOperator class ="org.qtitools.mathassess.CasCompare" ma:syntax="text/x-maxima" ma:action="syntequal" ma:simplify="false">
- <variable identifier = "RESPONSE"/>
- <variable identifier = "mBad3"/>
- </customOperator>
- <...
[truncated message content] |