made a copy
[atutor.git] / themes / default / test_questions / multianswer_qti_1p2.tmpl.php
1 <!-- multi answer multiple choice question with partial marks -->
2                 <item title="Multiple answer 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-response</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="Multiple">
23                                                 <render_choice shuffle="No">
24                                                 <?php for ($i=0; $i < $this->num_choices; $i++): ?>
25                                                         <response_label ident="Choice<?php echo $i; ?>">
26                                                                 <flow_mat>
27                                                                         <material>
28                                                                                 <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
29                                                                         </material>
30                                                                 </flow_mat>
31                                                         </response_label>
32                                                         <?php endfor; ?>
33                                                 </render_choice>
34                                         </response_lid>
35                                 </flow>
36                         </presentation>
37                         <resprocessing>
38                                 <outcomes>
39                                         <decvar/>
40                                 </outcomes>
41                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
42                                 <?php if ($this->row['answer_'.$i]): ?>
43                                 <respcondition title="CorrectResponse">
44                                         <conditionvar>                                          
45                                                 <varequal respident="RESPONSE<?php echo $this->row['question_id']; ?>">Choice<?php echo $i; ?></varequal>
46                                         </conditionvar>
47                                         <setvar varname="Respondus_Correct" action="Add"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
48                                 </respcondition>
49                                 <?php endif; ?>
50                         <?php endfor; ?>
51                         </resprocessing>
52                 <?php if ($this->row['feedback']): ?>
53                         <itemfeedback ident="FEEDBACK" view="All">
54                                 <material>
55                                         <mattext texttype="text/html"><?php echo $this->row['feedback']; ?></mattext>
56                                 </material>
57                         </itemfeedback>
58                 <?php endif; ?>
59                 </item>