3b51ac018067b47eccbf04ff6ee0a059add71f2e
[atutor.git] / docs / themes / default / test_questions / ordering_qti_1p2.tmpl.php
1 <!-- ordering question -->
2                 <item title="Ordering 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                         </itemmetadata>
11                         <presentation>
12                                 <flow>
13                                         <material>
14                                                 <mattext texttype="text/html"><?php echo $this->row['question']; ?></mattext>
15                                         </material>
16                                         <response_lid ident="RESPONSE<?php echo $this->row['question_id']; ?>" rcardinality="Ordered">
17                                                 <render_choice shuffle="Yes" minnumber="<?php echo $this->num_choices;?>" maxnumber="<?php echo $this->num_choices;?>">
18                                                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
19                                                         <response_label ident="Choice<?php echo $i; ?>">        
20                                                                 <flow_mat>
21                                                                         <material>
22                                                                                 <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
23                                                                         </material>
24                                                                 </flow_mat>
25                                                         </response_label>
26                                                         <?php endfor; ?>
27                                                 </render_choice>
28                                         </response_lid>
29                                 </flow>
30                         </presentation>
31                         <resprocessing>
32                                 <outcomes>
33                                         <decvar varname="SCORE" />
34                                 </outcomes>
35                                 <?php for ($i=0; $i < $this->num_choices; $i++): ?>
36                                 <respcondition title="CorrectResponse">
37                                         <conditionvar>                                  
38                                                 <varequal respident="RESPONSE<?php echo $this->row['question_id']; ?>">Choice<?php echo $i; ?></varequal>
39                                         </conditionvar>
40                                         <setvar varname="Respondus_Correct"><?php echo (isset($this->row['weight']))?$this->row['weight']/$this->num_choices:1; ?></setvar>
41                                 </respcondition>
42                                 <?php endfor; ?>
43                         </resprocessing>
44                 <?php if ($this->row['feedback']): ?>
45                         <itemfeedback ident="FEEDBACK">
46                                 <solution>
47                                         <solutionmaterial>
48                                                 <flow_mat>
49                                                         <material>
50                                                                 <mattext texttype="text/html"><?php echo $this->row['feedback']; ?></mattext>
51                                                         </material>
52                                                 </flow_mat>
53                                         </solutionmaterial>
54                                 </solution>
55                         </itemfeedback>
56                 <?php endif; ?>
57                 </item>