Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / question / format / qti2 / templates / textEntry.tpl
blob6c03937998be6e0a1d1d56a22c7e459bd9f8d06b
1 {if $courselevelexport}<?xml version="1.0" encoding="UTF-8"?>{/if}
2 <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">
3         <responseDeclaration identifier="{$questionid}" cardinality="{$responsedeclarationcardinality}" baseType="string">
4                 <correctResponse>
5                 {section name=answer loop=$correctresponses}
6                         <value>{$correctresponses[answer].answer}</value>
7                 {/section}
8                 </correctResponse>
9                 <mapping lowerBound="0" upperBound="1" defaultValue="0">
10                 {section name=answer loop=$answers}
11                     {if $answers[answer].fraction != 0}
12                         <mapEntry mapKey="{$answers[answer].answer}" mappedValue="{$answers[answer].fraction}" />
13                         {/if}
14                 {/section}
15                 </mapping>
16         </responseDeclaration>
17         <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float"/>
18         <itemBody>
19                 <p>{$questionText}</p>
20                 <div class="interactive.textEntry">
21             <textEntryInteraction responseIdentifier="{$questionid}" expectedLength="15"/>
22                 </div>
23         {if $question_has_image == 1}
24                 <div class="media">
25             {if $hassize == 1}
26                         <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}" />
27                 {else}
28                         <object type="{$question->mediamimetype}" data="{$question->mediaurl}" />     
29                 {/if}
30                 </div>
31         {/if}
32         </itemBody>
33         <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">
34                 <responseCondition>
35                         <responseIf>
36                                 <isNull>
37                                         <variable identifier="{$questionid}"/>
38                                 </isNull>
39                                 <setOutcomeValue identifier="SCORE">
40                                         <baseValue baseType="integer">0</baseValue>
41                                 </setOutcomeValue>
42                         </responseIf>
43                         <responseElse>
44                                 <setOutcomeValue identifier="SCORE">
45                                         <mapResponse identifier="{$questionid}"/>
46                                 </setOutcomeValue>
47                         </responseElse>
48                 </responseCondition>
49         </responseProcessing>
50 </assessmentItem>