adding some strings
[moodle-linuxchix.git] / question / format / qti2 / templates / mmchoiceMultiple.tpl
blob558e0774145e14fd0a96465d66bca7f6a79e6e3f
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="identifier">
4                 <correctResponse>
5                 {section name=answer loop=$correctresponses}
6                         <value>{$correctresponses[answer].id}</value>
7                 {/section}
8                 </correctResponse>
9                 <mapping lowerBound="0" upperBound="1" defaultValue="{$defaultvalue}">
10                 {section name=answer loop=$answers}
11                     {if $answers[answer].fraction != 0}
12                         <mapEntry mapKey="{$answers[answer].id}" mappedValue="{$answers[answer].fraction}" />
13                         {/if}
14                 {/section}
15                 </mapping>
16         </responseDeclaration>
17         <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float" />
18         <itemBody>
19            <div class="assesmentItemBody">
20                 <p>{$questionText}</p>
21        </div>
22                 <div class="interactive.choiceMultiple">
23                         <choiceInteraction responseIdentifier="{$questionid}" shuffle="false" maxChoices="{$maxChoices}">
24                 {section name=answer loop=$answers}
25                                 <simpleChoice identifier="{$answers[answer].id}" fixed="false"><p>{$answers[answer].choice}
26                         {if $answers[answer].media != ''}
27                                 <object type="{$answers[answer].mediamimetype}" data="{$answers[answer].media}" width="{$answers[answer].mediax}" height="{$answers[answer].mediay}" />
28                         {/if}</p>
29                         {if $answers[answer].feedback != ''}
30                                     <feedbackInline identifier="{$answers[answer].id}" outcomeIdentifier="FEEDBACK" showHide="show">{$answers[answer].feedback}</feedbackInline>
31                 {/if}
32                         {if $answers[answer].altfeedback != ''}
33                                     <feedbackInline identifier="{$answers[answer].id}" outcomeIdentifier="ALTFEEDBACK" showHide="hide">{$answers[answer].altfeedback}</feedbackInline>
34                 {/if}
35                                 </simpleChoice>
36                 {/section}
37                         </choiceInteraction>
38                 </div>
39         {if $question_has_image == 1}
40                 <div class="media">
41             {if $hassize == 1}
42                         <object type="{$question->mediamimetype}" data="{$question->mediaurl}" width="{$question->mediax}" height="{$question->mediay}" />
43                 {else}
44                         <object type="{$question->mediamimetype}" data="{$question->mediaurl}" />     
45                 {/if}
46                 </div>
47         {/if}
48         </itemBody>
49         <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">
50                 <responseCondition>
51                         <responseIf>
52                                 <isNull>
53                                         <variable identifier="{$questionid}"/>
54                                 </isNull>
55                                 <setOutcomeValue identifier="SCORE">
56                                         <baseValue baseType="float">0</baseValue>
57                                 </setOutcomeValue>
58                         </responseIf>
59                         <responseElse>
60                                 <setOutcomeValue identifier="SCORE">
61                                         <mapResponse identifier="{$questionid}"/>
62                                 </setOutcomeValue>
63                         </responseElse>
64                 </responseCondition>
65                 <responseCondition>
66                         <responseIf>
67                                 <gte>
68                                         <variable identifier="SCORE"/>
69                                         <baseValue baseType="float">{$question->feedbackfraction}</baseValue>
70                                 </gte>
71                                 <setOutcomeValue identifier="FEEDBACK">
72                                         <variable identifier="feedbackok"/>
73                                 </setOutcomeValue>
74                         </responseIf>
75                         <responseElse>
76                                 <setOutcomeValue identifier="FEEDBACK">
77                                         <variable identifier="feedbackmissed"/>
78                                 </setOutcomeValue>
79                         </responseElse>
80                 </responseCondition>
81         </responseProcessing>
82 {if $question->feedbackok != ''}
83         <modalFeedback outcomeIdentifier="FEEDBACK" identifier="feedbackok" showHide="show">{$question->feedbackok}</modalFeedback>
84 {/if}
85 {if $question->feedbackmissed != ''}
86         <modalFeedback outcomeIdentifier="FEEDBACK" identifier="feedbackmissed" showHide="hide">{$question->feedbackmissed}</modalFeedback>
87 {/if}
88 </assessmentItem>