|
From: <dav...@us...> - 2010-03-29 11:15:40
|
Revision: 2405
http://qtitools.svn.sourceforge.net/qtitools/?rev=2405&view=rev
Author: davemckain
Date: 2010-03-29 11:15:32 +0000 (Mon, 29 Mar 2010)
Log Message:
-----------
MAE: Multiple cosmetic changes to make tests easier to debug:
* Added Graham's latest version of Test-006-score-03GMAX
* Test rendering now shows internal state the same way that item rendering does
* Test outcome values are now debugged in this way. (Note they've never been passed to the XSLT before now so won't go into feedback or anything else.)
Modified Paths:
--------------
branches/mathassess/QTIEngine/grails-app/conf/BootStrap.groovy
branches/mathassess/QTIEngine/grails-app/controllers/org/qtitools/mathassessengine/ArticleController.groovy
branches/mathassess/QTIEngine/grails-app/services/org/qtitools/mathassessengine/RenderingService.groovy
branches/mathassess/QTIEngine/src/java/org/qtitools/qti/controller/TestCoordinator.java
branches/mathassess/QTIEngine/src/java/org/qtitools/qti/rendering/Renderer.java
branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/qti-common.xsl
branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/test-item.xsl
branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/utils.xsl
branches/mathassess/QTIEngine/web-app/css/test.css
Added Paths:
-----------
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/assessment.xml
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-c4b3dde5f203/
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-c4b3dde5f203/DIAGNOSYS302.xml
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-cedf7e4a4900/
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-cedf7e4a4900/DIAGNOSYS105.xml
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-fb686909c633/
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-fb686909c633/DIAGNOSYS202.xml
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/imsmanifest.xml
branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/mathassess.xsd
Modified: branches/mathassess/QTIEngine/grails-app/conf/BootStrap.groovy
===================================================================
--- branches/mathassess/QTIEngine/grails-app/conf/BootStrap.groovy 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/grails-app/conf/BootStrap.groovy 2010-03-29 11:15:32 UTC (rev 2405)
@@ -100,6 +100,7 @@
/* Tests */
new Article(packageBasePath:"tests/test_package_minfilesG", sourceFileHref:"example/rtest.xml", type:TEST, packaging:BUILTIN).save();
new Article(packageBasePath:"tests/complex_hierarchy", sourceFileHref:"test/rtest.xml", type:TEST, packaging:BUILTIN).save();
+ new Article(packageBasePath:"tests/Test-006-score-03GMAX", sourceFileHref:"assessment.xml", type:TEST, packaging:BUILTIN).save();
new Article(packageBasePath:"tests/ModulePretest", sourceFileHref:"Test_Template.xml", type:TEST, packaging:BUILTIN).save();
Modified: branches/mathassess/QTIEngine/grails-app/controllers/org/qtitools/mathassessengine/ArticleController.groovy
===================================================================
--- branches/mathassess/QTIEngine/grails-app/controllers/org/qtitools/mathassessengine/ArticleController.groovy 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/grails-app/controllers/org/qtitools/mathassessengine/ArticleController.groovy 2010-03-29 11:15:32 UTC (rev 2405)
@@ -200,11 +200,10 @@
validation = validationResult.toString()
}
- Map itemParams = new HashMap()
- itemParams.put('showInternalState', true)
- itemParams.put('displayTitle', true)
- itemParams.put('article-id', key)
- if (validation) itemParams.put('validation', validation)
+ def itemParams = [ showInternalState: true,
+ displayTitle: true,
+ 'article-id': key ]
+ if (validation) itemParams[validation] = validation
/* Pick the most appropriate web page output, according to Accept/UserAgent headers */
def serializationMethod = renderingService.chooseSerializationMethod(request, params)
@@ -232,7 +231,10 @@
/* (Fresh test) */
/* Set up rendering parameters */
- def renderingParams = [ displayTitle:true, displayControls: false ]
+ def renderingParams = [ displayTitle:true,
+ showInternalState: true,
+ displayControls: false,
+ 'article-id': key ]
if (params.playrMode) {
log.info "Rendering for playr"
renderingParams.playrMode = true
@@ -248,35 +250,36 @@
null, renderingService.renderer, resourceBasePath, renderingParams, serializationMethod)
/* render the first instance only with error report (unless we're in playr) */
- testCoordinator.setValidate(!params.playrMode);
- testCoordinator.getNextQuestion(false);
+ testCoordinator.setValidate(!params.playrMode)
+ testCoordinator.getNextQuestion(false)
session.articlesBeingPlayed[key] = testCoordinator
}
else {
- testCoordinator.setValidate(false);
+ testCoordinator.setValidate(false)
+ def testController = testCoordinator.testController
if (params.containsKey('questionId') && params.questionId != testCoordinator.getCurrentQuestionId()) {
return render(text: testCoordinator.flashMessage("Oops, it appears that you have pressed the browser's back button! This is the question you should be viewing."),
contentType: serializationMethod.contentType,
encoding: 'UTF-8')
}
- else if (params.containsKey('next') && testCoordinator.getTestController().nextEnabled()) {
+ else if (params.containsKey('next') && testController.nextEnabled()) {
testCoordinator.getNextQuestion(false);
}
- else if (params.containsKey('forward') && testCoordinator.getTestController().forwardEnabled()) {
+ else if (params.containsKey('forward') && testController.forwardEnabled()) {
testCoordinator.getNextQuestion(true);
}
- else if (params.containsKey('previous') && testCoordinator.getTestController().previousEnabled()) {
+ else if (params.containsKey('previous') && testController.previousEnabled()) {
testCoordinator.getPreviousQuestion(false);
}
- else if (params.containsKey('backward') && testCoordinator.getTestController().backwardEnabled()) {
+ else if (params.containsKey('backward') && testController.backwardEnabled()) {
testCoordinator.getPreviousQuestion(true);
}
- else if (params.containsKey('skip') && testCoordinator.getTestController().skipEnabled()) {
+ else if (params.containsKey('skip') && testController.skipEnabled()) {
testCoordinator.skipCurrentQuestion();
}
- else if (testCoordinator.getTestController().getCurrentItemRef().isFinished()) {
+ else if (testController.getCurrentItemRef()?.isFinished()) {
return render(text: testCoordinator.flashMessage("Oops, it appears that you have pressed the browser's back button! This is the question you should be viewing."),
contentType: serializationMethod.contentType,
encoding: 'UTF-8')
Modified: branches/mathassess/QTIEngine/grails-app/services/org/qtitools/mathassessengine/RenderingService.groovy
===================================================================
--- branches/mathassess/QTIEngine/grails-app/services/org/qtitools/mathassessengine/RenderingService.groovy 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/grails-app/services/org/qtitools/mathassessengine/RenderingService.groovy 2010-03-29 11:15:32 UTC (rev 2405)
@@ -64,8 +64,8 @@
}
// DM: Sadly, this doesn't fit in currently 'cos we need to pass the renderer to the JQTI-Controller code
-// def renderTestItem(assessmentItem, resourceBasePath, itemPath, isResponded, assessmentParams, itemParams, serializationMethod) {
-// return renderer.renderTestItem(assessmentItem, resourceBasePath, itemPath, isResponded,
+// def renderTestItem(assessmentTest, assessmentItem, resourceBasePath, itemPath, isResponded, assessmentParams, itemParams, serializationMethod) {
+// return renderer.renderTestItem(assessmentTest, assessmentItem, resourceBasePath, itemPath, isResponded,
// assessmentItem.getResponseValues(), assessmentParams, itemParams, serializationMethod)
// }
}
Modified: branches/mathassess/QTIEngine/src/java/org/qtitools/qti/controller/TestCoordinator.java
===================================================================
--- branches/mathassess/QTIEngine/src/java/org/qtitools/qti/controller/TestCoordinator.java 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/src/java/org/qtitools/qti/controller/TestCoordinator.java 2010-03-29 11:15:32 UTC (rev 2405)
@@ -427,7 +427,7 @@
else {
isResponded = testController.getCurrentItemRef().isResponded();
}
- cachedRenderedContent = renderer.renderTestItem(assessmentItem, resourceBasePath, itemHref,
+ cachedRenderedContent = renderer.renderTestItem(testController.getTest(), assessmentItem, resourceBasePath, itemHref,
isResponded, responses, itemParams, renderingParameters, serializationMethod);
}
}
Modified: branches/mathassess/QTIEngine/src/java/org/qtitools/qti/rendering/Renderer.java
===================================================================
--- branches/mathassess/QTIEngine/src/java/org/qtitools/qti/rendering/Renderer.java 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/src/java/org/qtitools/qti/rendering/Renderer.java 2010-03-29 11:15:32 UTC (rev 2405)
@@ -145,13 +145,13 @@
* This is possibly temporary. It renders an {@link AssessmentItem} as part
* of an {@link AssessmentTest}
*/
- public String renderTestItem(AssessmentItem assessmentItem,
+ public String renderTestItem(AssessmentTest assessmentTest, AssessmentItem assessmentItem,
String resourceBasePath, String itemHref, boolean isResponded,
Map<String, Value> responses, Map<String, Object> itemParams,
Map<String, Object> renderingParameters, SerializationMethod serializationMethod) {
- logger.info("renderTestItem(item={}, resourceBasePath={}, itemHref={}, isResponded={}"
+ logger.info("renderTestItem(test={}, item={}, resourceBasePath={}, itemHref={}, isResponded={}"
+ "responses={}, itemParameters={}, renderingParameters={}, serializationMethod={}",
- new Object[] { assessmentItem.getIdentifier(),
+ new Object[] { assessmentTest.getIdentifier(), assessmentItem.getIdentifier(),
resourceBasePath, itemHref,
isResponded, responses,
itemParams, renderingParameters, serializationMethod
@@ -179,6 +179,7 @@
parameters.put("templateValues", xsltParamBuilder.convertTemplates(assessmentItem.getTemplateValues()));
parameters.put("responseValues", xsltParamBuilder.convertResponses(responses));
parameters.put("outcomeValues", xsltParamBuilder.convertOutcomes(assessmentItem.getOutcomeValues()));
+ parameters.put("testOutcomeValues", xsltParamBuilder.convertOutcomes(assessmentTest.getOutcomeValues()));
return doTransform(assessmentItem.toXmlString(), testItemStylesheetUri, parameters, serializationMethod);
}
Modified: branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/qti-common.xsl
===================================================================
--- branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/qti-common.xsl 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/qti-common.xsl 2010-03-29 11:15:32 UTC (rev 2405)
@@ -37,6 +37,7 @@
<xsl:param name="templateValues" select="()" as="element(jqti:template)*"/>
<xsl:param name="responseValues" select="()" as="element(jqti:response)*"/>
<xsl:param name="outcomeValues" select="()" as="element(jqti:outcome)*"/>
+ <xsl:param name="testOutcomeValues" select="()" as="element(jqti:outcome)*"/>
<!-- Debugging Params -->
<xsl:param name="overrideFeedback" select="false()" as="xs:boolean"/> <!-- enable all feedback -->
Modified: branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/test-item.xsl
===================================================================
--- branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/test-item.xsl 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/test-item.xsl 2010-03-29 11:15:32 UTC (rev 2405)
@@ -21,6 +21,7 @@
<!-- Import stylesheet to fix-up QTI 2.0 questions before processing -->
<xsl:import href="qti20-fixer.xsl"/>
+ <xsl:param name="article-id" as="xs:string?"/>
<xsl:param name="isResponded" select="false()" as="xs:boolean"/>
<xsl:param name="title" select="''" as="xs:string"/> <!-- assessment title -->
<xsl:param name="timeRemaining" select="-1" as="xs:integer"/> <!-- time remaining -->
@@ -41,7 +42,6 @@
<xsl:param name="skipEnabled" select="false()" as="xs:boolean"/>
<xsl:param name="allowCandidateComment" select="false()" as="xs:boolean"/>
<xsl:param name="view" select="false()" as="xs:boolean"/> <!-- view mode (unset shows everthing) -->
- <xsl:param name="debug" select="false()" as="xs:boolean"/> <!-- display debug panel -->
<xsl:param name="flash" as="xs:string?"/>
<xsl:param name="displayTitle" select="true()" as="xs:boolean"/>
<xsl:param name="displayControls" select="true()" as="xs:boolean"/>
@@ -114,135 +114,126 @@
<!-- Test styling -->
<link rel="stylesheet" href="{$engineBasePath}/css/test.css" type="text/css" media="screen"/>
+ <link rel="stylesheet" href="{$engineBasePath}/css/item-layout.css" type="text/css" media="screen"/>
<!-- Styling for JQuery dialog -->
<link rel="stylesheet" href="{$engineBasePath}/css/ui-lightness/jquery-ui-1.7.2.custom.css" type="text/css"/>
</head>
- <body class="qtiengine mathassessengine">
- <div class="qtiengine mathassessengine test">
- <xsl:if test="not($playrMode) and $timeRemaining >= 0">
- <xsl:attribute name="onload" select="concat('initTimer(', $timeRemaining, ')')"/>
- </xsl:if>
+ <body class="mathassessengine qtiengine">
+ <xsl:if test="not($playrMode)">
+ <div class="logo">
+ <img src="{$engineBasePath}/images/mathassessengine.png" alt="MathAssessEngine"/>
+ </div>
+ <div class="nav">
+ <span class="menuButton"><a class="home" href="{$engineBasePath}">Home</a></span>
+ <span class="menuButton"><a class="list" href="{$engineBasePath}/article/list">Item & Test list</a></span>
+ <span class="menuButton"><a class="reset" href="{$engineBasePath}/article/reset/{$article-id}">Reset and replay</a></span>
+ <span class="menuButton"><a class="source" href="{$engineBasePath}/article/source/{$article-id}">View source XML</a></span>
+ </div>
+ </xsl:if>
+ <div class="renderingBody">
+ <div class="qtiengine mathassessengine test">
+ <xsl:if test="not($playrMode) and $timeRemaining >= 0">
+ <xsl:attribute name="onload" select="concat('initTimer(', $timeRemaining, ')')"/>
+ </xsl:if>
- <xsl:if test="exists($validation)">
- <pre class="validation">
- <xsl:value-of select="$validation"/>
- </pre>
- </xsl:if>
+ <xsl:if test="exists($validation)">
+ <pre class="validation">
+ <xsl:value-of select="$validation"/>
+ </pre>
+ </xsl:if>
- <!-- TODO: Not sure this is the optimal place for this now? -->
- <xsl:if test="$displayTitle">
- <h1><xsl:value-of select="@title"/></h1>
- </xsl:if>
+ <!-- TODO: Not sure this is the optimal place for this now? -->
+ <xsl:if test="$displayTitle">
+ <h1><xsl:value-of select="@title"/></h1>
+ </xsl:if>
- <xsl:if test="exists($flash)">
- <div class="flash">
- <xsl:value-of select="$flash"/>
- </div>
- </xsl:if>
-
- <div id="navbar">
- <xsl:if test="$timeRemaining >= 0">
- <div id="controls">
- Time to complete <b><xsl:value-of select="$numberRemaining"/></b> remaining items is <b id="timer">...</b>.
+ <xsl:if test="exists($flash)">
+ <div class="flash">
+ <xsl:value-of select="$flash"/>
</div>
</xsl:if>
- </div>
- <div id="body">
- <div id="body-container">
- <!-- (test only) titles -->
- <xsl:if test="exists($title)">
- <h1><xsl:value-of select="$title"/></h1>
+ <div id="navbar">
+ <xsl:if test="$timeRemaining >= 0">
+ <div id="controls">
+ Time to complete <b><xsl:value-of select="$numberRemaining"/></b> remaining items is <b id="timer">...</b>.
+ </div>
</xsl:if>
- <xsl:if test="exists($sectionTitles)">
- <h2>
- <xsl:for-each select="$sectionTitles">
- <xsl:value-of select="."/>
- <br />
- </xsl:for-each>
- </h2>
- </xsl:if>
+ </div>
- <!-- (test only) rubric -->
- <xsl:if test="exists($rubric)">
- <xsl:call-template name="rubric"/>
- </xsl:if>
+ <div id="body">
+ <div id="body-container">
+ <!-- (test only) titles -->
+ <xsl:if test="exists($title)">
+ <h1><xsl:value-of select="$title"/></h1>
+ </xsl:if>
+ <xsl:if test="exists($sectionTitles)">
+ <h2>
+ <xsl:for-each select="$sectionTitles">
+ <xsl:value-of select="."/>
+ <br />
+ </xsl:for-each>
+ </h2>
+ </xsl:if>
- <xsl:choose>
- <xsl:when test="qti:itemBody">
- <!-- Render itemBody -->
- <xsl:apply-templates select="qti:itemBody"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- DM-TODO: Maybe have a separate stylesheet if we're not actually rendering anything? -->
- <!-- End of test. Just render any feedback -->
- <xsl:if test="exists($testPartFeedback) or exists($assessmentFeedback)">
- <xsl:call-template name="test-feedback"/>
- </xsl:if>
+ <!-- (test only) rubric -->
+ <xsl:if test="exists($rubric)">
+ <xsl:call-template name="rubric"/>
+ </xsl:if>
- <p>This assessment is now complete.</p>
- <xsl:if test="not($playrMode)">
- <p><a href="#" onclick="window.open('?report=yes', 'report');">Click here to view the test report</a></p>
- <p><a href="?exit">Click here to return to the main page</a></p>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
-
- <!-- Display active modal feedback (only after responseProcessing) -->
- <xsl:if test="$isResponded">
- <xsl:variable name="modalFeedback" as="element()*">
- <xsl:for-each select="qti:modalFeedback">
- <xsl:variable name="feedback" as="node()*">
+ <xsl:choose>
+ <xsl:when test="qti:itemBody">
+ <!-- Render itemBody -->
+ <xsl:apply-templates select="qti:itemBody"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- DM-TODO: Maybe have a separate stylesheet if we're not actually rendering anything? -->
+ <!-- End of test. Just render any feedback -->
+ <xsl:if test="exists($testPartFeedback) or exists($assessmentFeedback)">
<xsl:call-template name="test-feedback"/>
- </xsl:variable>
- <xsl:if test="$feedback">
- <div class="modalFeedback">
- <xsl:if test="@title"><h3><xsl:value-of select="@title"/></h3></xsl:if>
- <xsl:sequence select="$feedback"/>
- </div>
</xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="exists($modalFeedback)">
- <hr/>
- <h2>Feedback</h2>
- <xsl:sequence select="$modalFeedback"/>
- </xsl:if>
- </xsl:if>
- </div>
- </div>
- <!-- Test debugging stuff -->
- <xsl:if test="$debug">
- <div style="position:fixed; bottom:20px; right:20px; border: 1px solid black; padding: 10px; font: 10pt san-serif; background-color:#f5f5f5;">
- <div>
- <b>Debug Panel</b>
+ <p>This assessment is now complete.</p>
+ <xsl:if test="not($playrMode)">
+ <p><a href="#" onclick="window.open('?report=yes', 'report');">Click here to view the test report</a></p>
+ <p><a href="?exit">Click here to return to the main page</a></p>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Display active modal feedback (only after responseProcessing) -->
+ <xsl:if test="$isResponded">
+ <xsl:variable name="modalFeedback" as="element()*">
+ <xsl:for-each select="qti:modalFeedback">
+ <xsl:variable name="feedback" as="node()*">
+ <xsl:call-template name="test-feedback"/>
+ </xsl:variable>
+ <xsl:if test="$feedback">
+ <div class="modalFeedback">
+ <xsl:if test="@title"><h3><xsl:value-of select="@title"/></h3></xsl:if>
+ <xsl:sequence select="$feedback"/>
+ </div>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="exists($modalFeedback)">
+ <hr/>
+ <h2>Feedback</h2>
+ <xsl:sequence select="$modalFeedback"/>
+ </xsl:if>
+ </xsl:if>
</div>
- <div>
- <a style="color:blue"><xsl:attribute name="href">?reset</xsl:attribute>reset session</a>
- </div>
- <div>
- <a style="color:blue" target="_blank"><xsl:attribute name="href">?viewSource</xsl:attribute>view
- qti page source</a>
- </div>
- <div>
- <a style="color:blue" target="_blank"><xsl:attribute name="href">?viewLogic</xsl:attribute>view qti
- assessment</a>
- </div>
- <div>
- <a style="color:blue"><xsl:attribute name="href">?exitDebug</xsl:attribute>exit
- debug mode</a>
- </div>
</div>
- </xsl:if>
-
- <!-- Internal state dump (not previously done in tests) -->
- <xsl:if test="$showInternalState">
+ </div>
+ </div>
+ <!-- Optional debugging information -->
+ <xsl:if test="not($playrMode) and $showInternalState">
+ <div id="debug_panel">
<xsl:call-template name="internalState"/>
- </xsl:if>
</div>
- </body>
+ </xsl:if>
+ </body>
</html>
</xsl:template>
Modified: branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/utils.xsl
===================================================================
--- branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/utils.xsl 2010-03-29 11:12:20 UTC (rev 2404)
+++ branches/mathassess/QTIEngine/web-app/WEB-INF/jqti-rendering-resources/org/qtitools/qti/rendering/mathassessengine/utils.xsl 2010-03-29 11:15:32 UTC (rev 2405)
@@ -22,23 +22,29 @@
<div id="debug_internal_state">
<h2>Internal State</h2>
<xsl:if test="exists($templateValues)">
- <h3>Template vars</h3>
+ <h3>Item Template vars</h3>
<xsl:call-template name="dump-values">
<xsl:with-param name="valueHolders" select="$templateValues"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="exists($responseValues)">
- <h3>Response vars</h3>
+ <h3>Item Response vars</h3>
<xsl:call-template name="dump-values">
<xsl:with-param name="valueHolders" select="$responseValues"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="exists($outcomeValues)">
- <h3>Outcome vars</h3>
+ <h3>Item Outcome vars</h3>
<xsl:call-template name="dump-values">
<xsl:with-param name="valueHolders" select="$outcomeValues"/>
</xsl:call-template>
</xsl:if>
+ <xsl:if test="exists($testOutcomeValues)">
+ <h3>Test Outcome vars</h3>
+ <xsl:call-template name="dump-values">
+ <xsl:with-param name="valueHolders" select="$testOutcomeValues"/>
+ </xsl:call-template>
+ </xsl:if>
</div>
</xsl:template>
Added: branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/assessment.xml
===================================================================
--- branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/assessment.xml (rev 0)
+++ branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/assessment.xml 2010-03-29 11:15:32 UTC (rev 2405)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:lip="http://www.imsglobal.org/xsd/imslip_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" toolVersion="0.1" toolName="Spectatus" title="DIAGNOSYS Test 6" identifier="SPECTATUS-GENERATED-TEST" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 imsqti_v2p1.xsd">
+ <outcomeDeclaration identifier="TEST_SCORE" cardinality="single" baseType="float">
+ <defaultValue>
+ <value>0.0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="MAXIMUM_SCORE" cardinality="single" baseType="float">
+ <defaultValue>
+ <value>0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="SECTION_1_SCORE" cardinality="single" baseType="float">
+ <defaultValue>
+ <value>0.0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="SECTION_2_SCORE" cardinality="single" baseType="float">
+ <defaultValue>
+ <value>0.0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="SECTION_3_SCORE" cardinality="single" baseType="float">
+ <defaultValue>
+ <value>0.0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="TEST_FEEDBACK" cardinality="multiple" baseType="identifier"/>
+ <testPart submissionMode="simultaneous" navigationMode="nonlinear" identifier="TP">
+ <assessmentSection identifier="S1" visible="true" title="Section 1">
+ <rubricBlock view="candidate">
+ <div>Answer all these questions</div>
+ </rubricBlock>
+ <assessmentItemRef identifier="id-cedf7e4a4900" href="id-cedf7e4a4900/DIAGNOSYS105.xml"/>
+ </assessmentSection>
+ <assessmentSection identifier="id-ca97d472d4cb" visible="true" title="Section 2">
+ <rubricBlock view="candidate">
+ <div>These questions build on the skills you used in Section 1</div>
+ </rubricBlock>
+ <assessmentItemRef identifier="id-fb686909c633" href="id-fb686909c633/DIAGNOSYS202.xml"/>
+
+ </assessmentSection>
+ <assessmentSection identifier="id-ee0039d725e8" visible="true" title="Section 3">
+ <rubricBlock view="candidate">
+ <div>These questions build on the skills you used in Section 2</div>
+ </rubricBlock>
+ <assessmentItemRef identifier="id-c4b3dde5f203" href="id-c4b3dde5f203/DIAGNOSYS302.xml"/>
+
+ </assessmentSection>
+ </testPart>
+ <outcomeProcessing>
+ <setOutcomeValue identifier="SECTION_1_SCORE">
+ <sum>
+ <testVariables sectionIdentifier="S1" variableIdentifier="SCORE" baseType="float"/>
+ </sum>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="SECTION_2_SCORE">
+ <sum>
+ <variable identifier="id-fb686909c633.SCORE"/>
+ </sum>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="SECTION_3_SCORE">
+ <sum>
+ <variable identifier="id-c4b3dde5f203.SCORE"/>
+ </sum>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="MAXIMUM_SCORE">
+ <sum>
+ <outcomeMaximum outcomeIdentifier="normalMaximum"/>
+ </sum>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="TEST_SCORE">
+ <sum>
+ <testVariables variableIdentifier="SCORE" baseType="float"/>
+ </sum>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="TEST_FEEDBACK">
+ <multiple>
+ <baseValue baseType="identifier">S1_END_FB</baseValue>
+ <baseValue baseType="identifier">S2_END_FB</baseValue>
+ <baseValue baseType="identifier">S3_END_FB</baseValue>
+ <baseValue baseType="identifier">TEST_FB</baseValue>
+ </multiple>
+ </setOutcomeValue>
+
+ </outcomeProcessing>
+ <testFeedback outcomeIdentifier="TEST_FEEDBACK" identifier="S1_FB"
+ showHide="show" access = "during">
+ <p>You have completed Section 1.</p>
+ </testFeedback>
+ <testFeedback outcomeIdentifier="TEST_FEEDBACK" identifier="S2_FB"
+ showHide="show" access = "during">
+ <p>You have completed Section 2.</p>
+ </testFeedback>
+ <testFeedback outcomeIdentifier="TEST_FEEDBACK" identifier="S3_FB"
+ showHide="show" access = "during">
+ <p>You have completed Section 3.</p>
+ </testFeedback>
+ <testFeedback outcomeIdentifier="TEST_FEEDBACK" identifier="S1_END_FB"
+ showHide="show" access = "atEnd">
+ <p> Section 1 score - <printedVariable
+ identifier="SECTION_1_SCORE" format="%.1f"/>.</p>
+ </testFeedback>
+ <testFeedback outcomeIdentifier="TEST_FEEDBACK" identifier="S2_END_FB"
+ showHide="show" access = "atEnd">
+ <p> Section 2 score - <printedVariable
+ identifier="SECTION_2_SCORE" format="%.1f"/>.</p>
+ </testFeedback>
+ <testFeedback outcomeIdentifier="TEST_FEEDBACK" identifier="S3_END_FB"
+ showHide="show" access = "atEnd">
+ <p> Section 3 score - <printedVariable
+ identifier="SECTION_3_SCORE" format="%.1f"/>.</p>
+ </testFeedback>
+ <testFeedback outcomeIdentifier="TEST_FEEDBACK" identifier="TEST_FB"
+ showHide="show" access = "atEnd">
+ <p>You have reached the end of the test.</p>
+ <p> Your Total Score - <printedVariable identifier="TEST_SCORE"
+ format="%.1f"/>,</p>
+ <p> Out of a possible - <printedVariable identifier="MAXIMUM_SCORE"
+ format="%.1f"/>.</p>
+
+ </testFeedback>
+</assessmentTest>
Property changes on: branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/assessment.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Id Date Revision Author
Added: svn:eol-style
+ native
Added: branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-c4b3dde5f203/DIAGNOSYS302.xml
===================================================================
--- branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-c4b3dde5f203/DIAGNOSYS302.xml (rev 0)
+++ branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-c4b3dde5f203/DIAGNOSYS302.xml 2010-03-29 11:15:32 UTC (rev 2405)
@@ -0,0 +1,450 @@
+<?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="DIAGNOSYS302" timeDependent="false" title="Scientific notation">
+ <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" normalMaximum="2.0" normalMinimum="0.0">
+ <defaultValue>
+ <value>0.0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="FEEDBACK" cardinality="multiple" baseType="identifier"/>
+ <outcomeDeclaration identifier="EMPTY" cardinality="single" baseType="identifier"/>
+ <outcomeDeclaration identifier="seenSolution" cardinality="single" baseType="boolean">
+ <defaultValue>
+ <value>false</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="seenHint" cardinality="single" baseType="boolean">
+ <defaultValue>
+ <value>false</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="fIn" cardinality="single" baseType="float"/>
+ <outcomeDeclaration identifier="iLeft" cardinality="single" baseType="integer"/>
+ <outcomeDeclaration identifier="iRight" cardinality="single" baseType="integer"/>
+ <outcomeDeclaration identifier="nSF" cardinality="single" baseType="integer"/>
+ <outcomeDeclaration baseType="identifier" cardinality="single" identifier="oNumber" />
+
+ <templateDeclaration baseType="boolean" cardinality="single" identifier="keepRandomSeed"/>
+ <templateDeclaration baseType="integer" cardinality="ordered" identifier="iRandomState"/>
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iRandomSeed"/>
+ <templateDeclaration baseType="boolean" cardinality="single" identifier="SIMPFLAG">
+ <defaultValue>
+ <value>false</value>
+ </defaultValue>
+ </templateDeclaration>
+ <templateDeclaration baseType="boolean" cardinality="single" identifier="tDummy" mathVariable="false" paramVariable="false"/>
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iA" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iB" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iADP" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iBDP" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iN" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iZ" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iAns" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="identifier" cardinality="single" identifier="sNumber" mathVariable="false" paramVariable="false" />
+ <templateDeclaration baseType="identifier" cardinality="single" identifier="tNumber" mathVariable="false" paramVariable="false" />
+ <templateDeclaration baseType="float" cardinality="single" identifier="fA" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="float" cardinality="single" identifier="fB" mathVariable="true" paramVariable="false" />
+ <templateProcessing>
+ <setTemplateValue identifier="tDummy">
+ <customOperator class="org.qtitools.mathassess.ScriptRule" ma:syntax="text/x-maxima">
+ <baseValue baseType="string">
+ <![CDATA[
+ s1 : make_random_state(true)$ set_random_state(s1);
+ choose(list) := list[1+random(length(list))];
+ r0([range]) := if length(range) = 2 then
+ choose(makelist(i, i, range[1], range[2])) else
+ choose(makelist(i, i, min(range[1],0), max(range[1], 0)));
+ r1([range]) := if length(range) = 2 then
+ choose(delete(0, makelist(i, i, range[1], range[2]))) else
+ if signum(range[1])=1 then
+ choose(makelist(i, i, 1, range[1])) else
+ choose(makelist(i, i, range[1], -1));
+
+ nExponent(p) := ev(floor(log(p)/log(10))+1,numer,simp);
+ simp:true;
+ iA: r1(101,9999);
+ iB: nExponent(iA);
+ fA: ev(iA/10^(iB-1),numer,simp);
+ iADP: ev(iB-1,numer,simp);
+ iN: r1(-3,3);
+ fB: ev(fA*10^iN,numer,simp);
+ iBDP: if (iN<0) then ev(iADP+abs(iN),numer,simp) elseif (iN>=iADP) then 0 else ev(iADP-iN,numer,simp);
+ iZ: iN;
+ iAns: iN;
+
+ ]]>
+
+ </baseValue>
+ </customOperator>
+ </setTemplateValue>
+ <templateCondition>
+ <templateIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">0</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP0</baseValue>
+ </setTemplateValue>
+ </templateIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">1</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP1</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">2</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP2</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">3</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP3</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">4</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP4</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">5</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP5</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">6</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP6</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iBDP" />
+ <baseValue baseType="integer">7</baseValue>
+ </equal>
+ <setTemplateValue identifier="tNumber">
+ <baseValue baseType="identifier">BDP7</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ </templateCondition>
+
+ <templateCondition>
+ <templateIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iADP" />
+ <baseValue baseType="integer">2</baseValue>
+ </equal>
+ <setTemplateValue identifier="sNumber">
+ <baseValue baseType="identifier">ADP2</baseValue>
+ </setTemplateValue>
+ </templateIf>
+ <templateElseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="iADP" />
+ <baseValue baseType="integer">3</baseValue>
+ </equal>
+ <setTemplateValue identifier="sNumber">
+ <baseValue baseType="identifier">ADP3</baseValue>
+ </setTemplateValue>
+ </templateElseIf>
+ </templateCondition>
+
+
+ </templateProcessing>
+ <itemBody><!-- contains MathML -->
+ <p>We can write the number  
+ <templateInline identifier="BDP0" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%9.0f"/>
+ </templateInline>
+ <templateInline identifier="BDP1" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%9.1f"/>
+ </templateInline>
+ <templateInline identifier="BDP2" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%10.2f"/>
+ </templateInline>
+ <templateInline identifier="BDP3" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%10.3f"/>
+ </templateInline>
+ <templateInline identifier="BDP4" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%11.4f"/>
+ </templateInline>
+ <templateInline identifier="BDP5" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%11.5f"/>
+ </templateInline>
+ <templateInline identifier="BDP6" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.6f"/>
+ </templateInline>
+ <templateInline identifier="BDP7" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.7f"/>
+ </templateInline>
+   in the form  
+ <templateInline identifier="ADP2" templateIdentifier="sNumber" showHide="show">
+ <printedVariable identifier="fA" format="%12.2f"/>
+ </templateInline>
+ <templateInline identifier="ADP3" templateIdentifier="sNumber" showHide="show">
+ <printedVariable identifier="fA" format="%12.3f"/>
+ </templateInline>
+ <m:math id="mathML1">
+ <m:semantics>
+ <m:mrow>
+ <m:mo>×</m:mo>
+ <m:msup>
+ <m:mn>10</m:mn>
+ <m:mi>n</m:mi>
+ </m:msup>
+ </m:mrow>
+ <m:annotation encoding="SnuggleTeX">\[\qv{fB} \times 10^n\]</m:annotation>
+ </m:semantics>
+ </m:math>, what is the number n?
+ </p>
+ <div>
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <textEntryInteraction expectedLength="20" base="10" responseIdentifier="RESPONSE" />
+ </td>
+ <td>
+ <feedbackInline identifier="CORRECT" outcomeIdentifier="FEEDBACK" showHide="show">
+ Correct
+ </feedbackInline>
+ <feedbackInline identifier="WRONG-SIGN" outcomeIdentifier="FEEDBACK" showHide="show">
+ You have the wrong sign.
+ </feedbackInline>
+ <feedbackInline identifier="INCORRECT" outcomeIdentifier="FEEDBACK" showHide="show">
+ Incorrect
+ </feedbackInline>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
+ <p>
+ <templateInline identifier="BDP0" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.0f"/>
+ </templateInline>
+ <templateInline identifier="BDP1" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.1f"/>
+ </templateInline>
+ <templateInline identifier="BDP2" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.2f"/>
+ </templateInline>
+ <templateInline identifier="BDP3" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.3f"/>
+ </templateInline>
+ <templateInline identifier="BDP4" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.4f"/>
+ </templateInline>
+ <templateInline identifier="BDP5" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.5f"/>
+ </templateInline>
+ <templateInline identifier="BDP6" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.6f"/>
+ </templateInline>
+ <templateInline identifier="BDP7" templateIdentifier="tNumber" showHide="show">
+ <printedVariable identifier="fB" format="%12.7f"/>
+ </templateInline>
+   =  
+ <templateInline identifier="ADP2" templateIdentifier="sNumber" showHide="show">
+ <printedVariable identifier="fA" format="%12.2f"/>
+ </templateInline>
+ <templateInline identifier="ADP3" templateIdentifier="sNumber" showHide="show">
+ <printedVariable identifier="fA" format="%12.3f"/>
+ </templateInline>
+ <m:math id="mathML2">
+ <m:semantics>
+ <m:mrow>
+ <m:mo>×</m:mo>
+ <m:msup>
+ <m:mn>10</m:mn>
+ <m:mi>iAns</m:mi>
+ </m:msup>
+ </m:mrow>
+ <m:annotation encoding="SnuggleTeX">\[\qv{fB} = \qv{fA} \times 10^\qv{iAns}\]</m:annotation>
+ </m:semantics>
+ </m:math>
+ </p>
+ </feedbackBlock>
+
+ <feedbackBlock identifier="HINT" outcomeIdentifier="FEEDBACK" showHide="show" >
+ <p class="">If a number is multiplied by e.g.<m:math id="mathML3">
+ <m:semantics>
+ <m:msup>
+ <m:mn>10</m:mn>
+ <m:mn>-1</m:mn>
+ </m:msup>
+ <m:annotation encoding="SnuggleTeX">\[10^{-1}\]</m:annotation>
+ </m:semantics>
+ </m:math>, that means it is divided by 10, or multiplied by<m:math id="mathML4">
+ <m:semantics>
+ <m:msup>
+ <m:mn>10</m:mn>
+ <m:mn>2</m:mn>
+ </m:msup>
+ <m:annotation encoding="SnuggleTeX">\[10^2\]</m:annotation>
+ </m:semantics>
+ </m:math>means multiplied by 100.</p>
+ </feedbackBlock>
+ <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>
+ <feedbackBlock identifier="SEEN-HINT" outcomeIdentifier="FEEDBACK" showHide="show">
+ <p>Since you have viewed the hint, your score for this question will be halved.</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 -->
+ <setOutcomeValue identifier="FEEDBACK">
+ <multiple>
+ <variable identifier="EMPTY"/>
+ </multiple>
+ </setOutcomeValue>
+ <responseCondition>
+ <responseIf>
+ <variable identifier="HINTREQUEST"/>
+ <setOutcomeValue identifier="FEEDBACK">
+ <multiple>
+ <baseValue baseType="identifier">HINT</baseValue>
+ </multiple>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="seenHint">
+ <baseValue baseType="boolean">true</baseValue>
+ </setOutcomeValue>
+ </responseIf>
+ <responseElseIf>
+ <variable identifier="SOLREQUEST"/>
+ <setOutcomeValue identifier="seenSolution">
+ <baseValue baseType="boolean">true</baseValue>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="FEEDBACK">
+ <multiple>
+ <baseValue baseType="identifier">SOLUTION</baseValue>
+ </multiple>
+ </setOutcomeValue>
+ </responseElseIf>
+ <responseElse>
+ <responseCondition>
+ <responseIf>
+ <isNull>
+ <variable identifier="RESPONSE"/>
+ </isNull>
+ <setOutcomeValue identifier="SCORE">
+ <baseValue baseType="float">0</baseValue>
+ </setOutcomeValue>
+ </responseIf>
+ <responseElse>
+ <responseCondition>
+ <responseIf>
+ <equal toleranceMode="exact">
+ <variable identifier="RESPONSE"/>
+ <variable identifier="iAns"/>
+ </equal>
+ <setOutcomeValue identifier="FEEDBACK">
+ <multiple>
+ <baseValue baseType="identifier">CORRECT</baseValue>
+ </multiple>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="SCORE">
+ <baseValue baseType="float">2</baseValue>
+ </setOutcomeValue>
+ </responseIf>
+ <responseElseIf>
+ <equal toleranceMode="exact">
+ <sum>
+ <variable identifier="RESPONSE"/>
+ <variable identifier="iAns"/>
+ </sum>
+ <baseValue baseType="integer">0</baseValue>
+ </equal>
+ <setOutcomeValue identifier="FEEDBACK">
+ <multiple>
+ <baseValue baseType="identifier">WRONG-SIGN</baseValue>
+ </multiple>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="SCORE">
+ <baseValue baseType="float">1</baseValue>
+ </setOutcomeValue>
+ </responseElseIf>
+ <responseElse>
+ <setOutcomeValue identifier="FEEDBACK">
+ <multiple>
+ <baseValue baseType="identifier">INCORRECT</baseValue>
+ </multiple>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="SCORE">
+ <baseValue baseType="float">0</baseValue>
+ </setOutcomeValue>
+ </responseElse>
+ </responseCondition>
+ <responseCondition>
+ <responseIf>
+ <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>
+ <responseElseIf>
+ <variable identifier="seenHint"/>
+ <setOutcomeValue identifier="FEEDBACK">
+ <multiple>
+ <variable identifier="FEEDBACK"/>
+ <baseValue baseType="identifier">SEEN-HINT</baseValue>
+ </multiple>
+ </setOutcomeValue>
+ <setOutcomeValue identifier="SCORE">
+ <divide>
+ <variable identifier="SCORE"/>
+ <baseValue baseType="float">2.0</baseValue>
+ </divide>
+ </setOutcomeValue>
+ </responseElseIf>
+ </responseCondition>
+ </responseElse>
+ </responseCondition>
+ </responseElse>
+ </responseCondition>
+ </responseProcessing>
+</assessmentItem>
Property changes on: branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-c4b3dde5f203/DIAGNOSYS302.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Id Date Revision Author
Added: svn:eol-style
+ native
Added: branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-cedf7e4a4900/DIAGNOSYS105.xml
===================================================================
--- branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-cedf7e4a4900/DIAGNOSYS105.xml (rev 0)
+++ branches/mathassess/QTIEngine/web-app/content/tests/Test-006-score-03GMAX/id-cedf7e4a4900/DIAGNOSYS105.xml 2010-03-29 11:15:32 UTC (rev 2405)
@@ -0,0 +1,572 @@
+<?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="DIAGNOSYS105" timeDependent="false" title="Decimal Places">
+ <responseDeclaration identifier="RESPONSE" cardinality="record" />
+ <responseDeclaration identifier="sInput" cardinality="single" baseType="string" />
+ <responseDeclaration baseType="boolean" cardinality="single" identifier="HINTREQUEST" />
+ <responseDeclaration baseType="boolean" cardinality="single" identifier="SOLREQUEST" />
+
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float" normalMaximum="2.0" normalMinimum="0.0">
+ <defaultValue>
+ <value>0.0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+
+ <outcomeDeclaration identifier="FEEDBACK" cardinality="multiple" baseType="identifier"/>
+ <outcomeDeclaration identifier="EMPTY" cardinality="single" baseType="identifier"/>
+ <outcomeDeclaration identifier="oNumber" cardinality="single" baseType="identifier"/>
+ <outcomeDeclaration identifier="seenSolution" cardinality="single" baseType="boolean">
+ <defaultValue>
+ <value>false</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="seenHint" cardinality="single" baseType="boolean">
+ <defaultValue>
+ <value>false</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <outcomeDeclaration identifier="nDP" cardinality="single" baseType="integer"/>
+ <outcomeDeclaration baseType="boolean" cardinality="single" identifier="oDummy" />
+ <outcomeDeclaration baseType="boolean" cardinality="single" identifier="okPattern" />
+ <outcomeDeclaration baseType="boolean" cardinality="single" identifier="okValue" />
+ <outcomeDeclaration identifier="cInput" cardinality="single" baseType="string" />
+ <outcomeDeclaration identifier="fInput" cardinality="single" baseType="float" />
+ <outcomeDeclaration identifier="mInput" cardinality="record" />
+
+ <templateDeclaration baseType="boolean" cardinality="single" identifier="keepRandomSeed"/>
+ <templateDeclaration baseType="integer" cardinality="ordered" identifier="iRandomState"/>
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iRandomSeed"/>
+ <templateDeclaration baseType="boolean" cardinality="single" identifier="SIMPFLAG">
+ <defaultValue>
+ <value>false</value>
+ </defaultValue>
+ </templateDeclaration>
+ <templateDeclaration baseType="boolean" cardinality="single" identifier="tDummy" mathVariable="false" paramVariable="false"/>
+ <templateDeclaration baseType="integer" cardinality="single" identifier="iA" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="identifier" cardinality="single" identifier="sNumber" mathVariable="false" paramVariable="false" />
+ <templateDeclaration baseType="identifier" cardinality="single" identifier="tNumber" mathVariable="false" paramVariable="false" />
+ <templateDeclaration baseType="float" cardinality="single" identifier="fA" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="float" cardinality="single" identifier="fWrongSign" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="float" cardinality="single" identifier="truncA" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="float" cardinality="single" identifier="truncAPlus" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="float" cardinality="single" identifier="fAns" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="string" cardinality="single" identifier="sAns" mathVariable="true" paramVariable="false" />
+ <templateDeclaration baseType="string" cardinality="single" identifier="sRound" mathVariable="true" paramVariable="false" />
+ <templateDeclaration cardinality="single" baseType="integer" identifier="iDP" mathVariable="true" paramVariable="false"/>
+ <templateDeclaration cardinality="single" baseType="integer" identifier="iFix" mathVariable="true" paramVariable="false"/>
+ <templateDeclaration cardinality="single" baseType="integer" identifier="lenA" mathVariable="true" paramVariable="false"/>
+ <templateDeclaration cardinality="single" baseType="integer" identifier="iDecider" mathVariable="true" paramVariable="false"/>
+ <templateProcessing>
+ <setTemplateValue identifier="tDummy">
+ <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;
+ iFix:444;
+ for j:1 step 1 while (iFix>0) do(
+ iAFigs: ev(random(2)+3,numer,simp),
+ iA: if iAFigs=3 then ev(random(898)+100,numer,simp) else ev(random(8999)+1000,numer,simp),
+ iB: ev(random(8998)+1001,numer,simp),
+ iB: if (equal(iB,round(iB/10)*10)) then ev(iB+random(9)+1,numer,simp) else iB,
+ fA: ev(iA+(iB/10000),numer,simp),
+ iDP: ev(random(3)+1,numer,simp),
+ iDecider: ev(floor(fA*(10^(iDP+1)))-floor(fA*(10^iDP))*10,numer,simp),
+ truncA: ev(floor(fA*(10^(iDP)))/10^iDP,...
[truncated message content] |