Permalink
Browse files

Smarty templates used for new qti export feature.

  • Loading branch information...
1 parent d613daf commit 425d616a1e370f69ed44ff6504cccd1b1fb0f8a2 thepurpleblob committed Feb 17, 2005
@@ -0,0 +1,70 @@
+{if $courselevelexport}<?xml version="1.0" encoding="UTF-8"?>{/if}
+<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ./imsqti_item_v2p0.xsd" identifier="{$assessmentitemidentifier}" title="{$assessmentitemtitle}" adaptive="false" timeDependent="false">
+ <responseDeclaration identifier="{$questionid}" cardinality="single" baseType="identifier">
+ <correctResponse>
+ <value>{$correctresponse.id}</value>
+ </correctResponse>
+ <mapping defaultValue="0">
+ <mapEntry mapKey="{$correctresponse.id}" mappedValue="{$correctresponse.fraction}"/>
+ </mapping>
+
+ </responseDeclaration>
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
+ <defaultValue>
+ <value>0</value>
+ </defaultValue>
+ </outcomeDeclaration>
+ <itemBody>
+ <p>{$questionText}</p>
+ <div class="intreactive.choiceSimple">
+ <choiceInteraction responseIdentifier="{$questionid}" shuffle="false" maxChoices="1">
+ {section name=answer loop=$answers}
+ <simpleChoice identifier="{$answers[answer].id}">{$answers[answer].answer}
+ {if $answers[answer].feedback != ''}
+ {if $answers[answer].answer != $correctresponse.answer}
+ <feedbackInline identifier="{$answers[answer].id}" outcomeIdentifier="FEEDBACK" showHide="hide">{$answers[answer].feedback}</feedbackInline>
+ {/if}
+ {/if}
+ </simpleChoice>
+ {/section}
+ </choiceInteraction>
+ {if $question_has_image == 1}
+ <div class="media">
+ {if $hassize == 1}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}" />
+ {else}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" />
+ {/if}
+ </div>
+ {/if}
+ </div>
+ </itemBody>
+ <responseProcessing xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ../imsqti_item_v2p0.xsd">
+ <responseCondition>
+ <responseIf>
+
+ <match>
+ <variable identifier="{$questionid}"/>
+ <correct identifier="{$questionid}"/>
+ </match>
+ <setOutcomeValue identifier="SCORE">
+ <baseValue baseType="float">1</baseValue>
+ </setOutcomeValue>
+ </responseIf>
+
+ <responseElse>
+ <setOutcomeValue identifier="SCORE">
+ <baseValue baseType="float">0</baseValue>
+ </setOutcomeValue>
+ </responseElse>
+ </responseCondition>
+ <setOutcomeValue identifier="FEEDBACK">
+ <variable identifier="{$questionid}"/>
+ </setOutcomeValue>
+ </responseProcessing>
+ {section name=answer loop=$answers}
+ {if $answers[answer].feedback != ''}
+ <modalFeedback outcomeIdentifier="FEEDBACK" identifier="{$answers[answer].id}" showHide="hide">{$answers[answer].feedback}</modalFeedback>
+ {/if}
+ {/section}
+</assessmentItem>
@@ -0,0 +1,64 @@
+{if $courselevelexport}<?xml version="1.0" encoding="UTF-8"?>{/if}
+<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ./imsqti_item_v2p0.xsd" identifier="{$assessmentitemidentifier}" title="{$assessmentitemtitle}" adaptive="false" timeDependent="false">
+ <responseDeclaration identifier="{$questionid}" cardinality="{$responsedeclarationcardinality}" baseType="identifier">
+ <correctResponse>
+ {section name=answer loop=$correctresponses}
+ <value>{$correctresponses[answer].id}</value>
+ {/section}
+ </correctResponse>
+ <mapping lowerBound="0" upperBound="1" defaultValue="-1">
+ {section name=answer loop=$answers}
+ {if $answers[answer].fraction != 0}
+ <mapEntry mapKey="{$answers[answer].id}" mappedValue="{$answers[answer].fraction}" />
+ {/if}
+ {/section}
+ </mapping>
+ </responseDeclaration>
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float" />
+ <itemBody>
+ <div class="assesmentItemBody">
+ <p>{$questionText}</p>
+ </div>
+ <div class="interactive.choiceMultiple">
+ <choiceInteraction responseIdentifier="{$questionid}" shuffle="false" maxChoices="{$maxChoices}">
+ {section name=answer loop=$answers}
+ <simpleChoice identifier="{$answers[answer].id}" fixed="false">{$answers[answer].answer}</simpleChoice>
+ {/section}
+ </choiceInteraction>
+ </div>
+ {if $question_has_image == 1}
+ <div class="media">
+ {if $hassize == 1}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}" />
+ {else}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" />
+ {/if}
+ </div>
+ {/if}
+ </itemBody>
+ <responseProcessing xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ../imsqti_item_v2p0.xsd">
+ <responseCondition>
+ <responseIf>
+ <isNull>
+ <variable identifier="{$questionid}"/>
+ </isNull>
+ <setOutcomeValue identifier="SCORE">
+ <baseValue baseType="float">0</baseValue>
+ </setOutcomeValue>
+ </responseIf>
+ <responseElse>
+ <setOutcomeValue identifier="SCORE">
+ <mapResponse identifier="{$questionid}"/>
+ </setOutcomeValue>
+ </responseElse>
+ </responseCondition>
+ <setOutcomeValue identifier="FEEDBACK">
+ <variable identifier="{$questionid}"/>
+ </setOutcomeValue>
+ </responseProcessing>
+ {section name=answer loop=$answers}
+ {if $answers[answer].feedback != ''}
+ <modalFeedback outcomeIdentifier="FEEDBACK" identifier="{$answers[answer].id}" showHide="show">{$answers[answer].feedback}</modalFeedback>
+ {/if}
+ {/section}
+</assessmentItem>
@@ -0,0 +1,101 @@
+{if $courselevelexport}<?xml version="1.0" encoding="UTF-8"?>{/if}
+<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ./imsqti_item_v2p0.xsd" identifier="{$assessmentitemidentifier}" title="{$assessmentitemtitle}" adaptive="false" timeDependent="false">
+ {section name=aid loop=$answers}
+ {if $answers[aid].answertype == 3}
+ <responseDeclaration identifier="{$questionid}{$answers[aid].id}" cardinality="single" baseType="identifier">
+ <correctResponse>
+ {section name=subanswer loop=$answers[aid].subanswers}
+ {if $answers[aid].subanswers[subanswer].fraction > 0}
+ <value>{$answers[aid].subanswers[subanswer].id}</value>
+ {/if}
+ {/section}
+ </correctResponse>
+ <mapping defaultValue="0">
+ {section name=subanswer loop=$answers[aid].subanswers}
+ {if $answers[aid].subanswers[subanswer].fraction != 0}
+ <mapEntry mapKey="{$answers[aid].subanswers[subanswer].id}" mappedValue="{$answers[aid].subanswers[subanswer].fraction}"/>
+ {/if}
+ {/section}
+ </mapping>
+ </responseDeclaration>
+ {elseif $answers[aid].answertype == 1}
+ <responseDeclaration identifier="{$questionid}{$answers[aid].id}" cardinality="single" baseType="string">
+ <correctResponse>
+ {section name=subanswer loop=$answers[aid].subanswers}
+ {if $answers[aid].subanswers[subanswer].fraction > 0}
+ <value>{$answers[aid].subanswers[subanswer].answer}</value>
+ {/if}
+ {/section}
+ </correctResponse>
+ <mapping lowerBound="0" upperBound="1" defaultValue="0">
+ {section name=subanswer loop=$answers[aid].subanswers}
+ {if $answers[aid].subanswers[subanswer].fraction != 0}
+ <mapEntry mapKey="{$answers[aid].subanswers[subanswer].answer}" mappedValue="{$answers[aid].subanswers[subanswer].fraction}" />
+ {/if}
+ {/section}
+ </mapping>
+ </responseDeclaration>
+ {/if}
+ {/section}
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float"/>
+ <itemBody>
+ {if $questionText != ''}
+ <div class="assesmentItemBody">
+ <p>{$questionText}</p>
+ </div>
+ {/if}
+ <div class="interactive.cloze"><p>
+ {section name=qid loop=$questions.question}
+ {$questions.text[qid]}
+ {if $questions.question[qid].id != $cloze_trailing_text_id}
+ {if $questions.question[qid].answertype == 3}
+ <inlineChoiceInteraction responseIdentifier="{$questionid}{$questions.question[qid].id}" shuffle="false">
+ {section name=aid loop=$questions.question[qid].subanswers}
+ <inlineChoice identifier="{$questions.question[qid].subanswers[aid].id}">{$questions.question[qid].subanswers[aid].answer}</inlineChoice>
+ {/section}
+ </inlineChoiceInteraction>
+ {elseif $questions.question[qid].answertype == 1}
+ <textEntryInteraction responseIdentifier="{$questionid}{$questions.question[qid].id}" expectedLength="15"/>
+ {/if}
+ {/if}
+ {/section}</p></div>
+ {if $question_has_image == 1}
+ <div class="media">
+ {if $hassize == 1}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}" />
+ {else}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" />
+ {/if}
+ </div>
+ {/if}
+ </itemBody>
+ <responseProcessing xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ../imsqti_item_v2p0.xsd">
+{section name=answer loop=$answers}{if $answers[answer].answertype == 1 || $answers[answer].answertype == 3}
+ <responseCondition>
+ <responseIf>
+ <isNull>
+ <variable identifier="{$questionid}{$answers[answer].id}"/>
+ </isNull>
+ <setOutcomeValue identifier="SCORE{$questionid}{$answers[answer].id}">
+ <baseValue baseType="float">0</baseValue>
+ </setOutcomeValue>
+ </responseIf>
+ <responseElse>
+ <setOutcomeValue identifier="SCORE{$questionid}{$answers[answer].id}">
+ <mapResponse identifier="{$questionid}{$answers[answer].id}"/>
+ </setOutcomeValue>
+ </responseElse>
+ </responseCondition>
+ <setOutcomeValue identifier="FEEDBACK">
+ <variable identifier="{$questionid}{$answers[answer].id}"/>
+ </setOutcomeValue>
+{/if}{/section}
+ </responseProcessing>
+{section name=answer loop=$answers}{if $answers[answer].answertype == 1 || $answers[answer].answertype == 3}
+ {section name=subanswer loop=$answers[answer].subanswers}
+ {if $answers[answer].subanswers[subanswer].feedback != ''}
+ <modalFeedback outcomeIdentifier="FEEDBACK" identifier="{$answers[answer].subanswers[subanswer].id}" showHide="show">{$answers[answer].subanswers[subanswer].feedback}</modalFeedback>
+{/if}{/section}
+ {/if}
+ {/section}
+</assessmentItem>
@@ -0,0 +1,17 @@
+{if $courselevelexport}<?xml version="1.0" encoding="UTF-8"?>{/if}
+<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ./imsqti_item_v2p0.xsd" identifier="{$assessmentitemidentifier}" title="{$assessmentitemtitle}" adaptive="false" timeDependent="false">
+ <responseDeclaration identifier="{$questionid}" cardinality="single" baseType="string"/>
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="integer"/>
+ <itemBody>
+ <p>{$questionText}</p>
+ {if $question_has_image == 1}
+ <div class="media">
+ {if $hassize == 1}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}" />
+ {else}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" />
+ {/if}
+ </div>
+ {/if}
+ </itemBody>
+</assessmentItem>
@@ -0,0 +1,27 @@
+{if $courselevelexport}<?xml version="1.0" encoding="UTF-8"?>{/if}
+<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ./imsqti_item_v2p0.xsd" identifier="{$assessmentitemidentifier}" title="{$assessmentitemtitle}" adaptive="false" timeDependent="false">
+ <responseDeclaration identifier="{$questionid}" cardinality="single" baseType="string"/>
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="integer"/>
+ <itemBody>
+ <div class="assesmentItemBody">
+ <p>{$questionText}</p>
+ </div>
+ <div class="interactive.extendedText">
+ <extendedTextInteraction responseIdentifier="{$questionid}" expectedLength="600">
+ </extendedTextInteraction>
+ </div>
+ {if $question_has_image == 1}
+ <div class="media">
+ {if $hassize == 1}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}" />
+ {else}
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" />
+ {/if}
+ </div>
+ {/if}
+ </itemBody>
+{if $question->feedback != ''}
+ <modalFeedback outcomeIdentifier="FEEDBACK" identifier="{$questionid}" showHide="hide">{$question->feedback}</modalFeedback>
+ <modalFeedback outcomeIdentifier="FEEDBACK" identifier="{$questionid}" showHide="show">{$question->feedback}</modalFeedback>
+{/if}
+</assessmentItem>
@@ -0,0 +1,33 @@
+{if $courselevelexport}<?xml version="1.0" encoding="UTF-8"?>{/if}
+<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_item_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_item_v2p0 ../imsqti_item_v2p0.xsd" identifier="{$assessmentitemidentifier}" title="{$assessmentitemtitle}" adaptive="false" timeDependent="false">
+ <responseDeclaration identifier="{$questionid}" cardinality="multiple" baseType="directedPair">
+ <correctResponse>
+ {section name=item loop=$gapitems}
+ <value>{$gapitems[item].id} {$gapitems[item].id}</value>
+ {/section}
+ </correctResponse>
+ <mapping defaultValue="1">
+ {section name=item loop=$gapitems}
+ <mapEntry mapKey="{$gapitems[item].id} {$gapitems[item].id}" mappedValue="1" />
+ {/section}
+ </mapping>
+ </responseDeclaration>
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float"/>
+ <itemBody>
+ <div class="assesmentItemBody"><p>{$questionText}</p></div>
+ <div class="interactive.graphicGapMatch">
+ <graphicGapMatchInteraction responseIdentifier="{$questionid}">
+ <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}"/>
+ {section name=item loop=$gapitems}
+ <gapImg identifier="{$gapitems[item].id}" matchMax="1">
+ <object type="{$gapitems[item].mediamimetype}" data="{$gapitems[item].media}" width="{$gapitems[item].snaptowidth}" height="{$gapitems[item].snaptoheight}" label="{$gapitems[item].questiontext}"/>
+ </gapImg>
+ {/section}
+ {section name=item loop=$gapitems}
+ <associableHotspot identifier="{$gapitems[item].id}" matchMax="{$hotspotmaxmatch}" shape="rect" coords="{$gapitems[item].targetx},{$gapitems[item].targety},{$gapitems[item].targetrx},{$gapitems[item].targetby}"/>
+ {/section}
+ </graphicGapMatchInteraction>
+ </div>
+ </itemBody>
+ <responseProcessing template="http://www.imsglobal.org/xml/imsqti_item_v2p0/rpMapResponse" templateLocation="../RPTemplates/rpMapResponse.xml"/>
+</assessmentItem>
Oops, something went wrong. Retry.

0 comments on commit 425d616

Please sign in to comment.