3b5ef7d679dd232b14eb994974972d1979accdcb
[acontent.git] / docs / themes / default / tests / test_questions / likert_qti_1p2.tmpl.php
1 <!-- likert question (aka multiple choice with no correct answer) -->
2                 <item title="Multiple choice question" ident="ITEM_<?php echo $this->row['question_id']; ?>">
3                         <itemmetadata>
4                                 <qtimetadata>
5                                         <qtimetadatafield>
6                                                 <fieldlabel>qmd_itemtype</fieldlabel>
7                                                 <fieldentry>Logical Identifier</fieldentry>
8                                         </qtimetadatafield>
9                                 </qtimetadata>
10                                 <qtimetadata>
11                                         <qtimetadatafield>
12                                                 <fieldlabel>qmd_questiontype</fieldlabel>
13                                                 <fieldentry>Multiple-choice</fieldentry>
14                                         </qtimetadatafield>
15                                 </qtimetadata>
16                         </itemmetadata>
17                         <presentation>
18                                 <flow>
19                                         <material>
20                                                 <mattext texttype="text/html"><?php echo $this->row['question']; ?></mattext>
21                                         </material>
22                                         <response_lid ident="RESPONSE<?php echo $this->row['question_id']; ?>" rcardinality="Single">
23                                                 <render_choice shuffle="No" minnumber="1" maxnumber="1">
24                                                         <flow_label>
25                                                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
26                                                                 <response_label ident="Choice<?php echo $i; ?>">        
27                                                                         <material>
28                                                                                 <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
29                                                                         </material>
30                                                                 </response_label>
31                                                         <?php endfor; ?>
32                                                         </flow_label>
33                                                 </render_choice>
34                                         </response_lid>
35                                 </flow>
36                         </presentation>
37
38                         <resprocessing>
39                                 <?php for ($i=0; $i < $this->num_choices; $i++): ?>
40                                 <respcondition title="CorrectResponse">
41                                         <conditionvar>                                  
42                                                 <varequal respident="RESPONSE<?php echo $this->row['question_id']; ?>">Choice<?php echo $i; ?></varequal>
43                                         </conditionvar>
44                                         <setvar varname="que_score" action="Set"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
45                                 </respcondition>
46                                 <?php endfor; ?>
47                         </resprocessing>
48                 </item>