ATutor 2.0
[atutor.git] / themes / default / test_questions / matching_qti_1p2.tmpl.php
1 <!-- matching question with partial marks -->
2                 <item title="Mathcing question" ident="ITEM_<?php echo $this->row['question_id']; ?>">
3                         <itemmetadata>
4                                 <qtimetadata>
5                                         <qtimetadatafield>
6                                                 <fieldlabel>qmd_itemtype</fieldlabel>
7                                                 <fieldentry>Logical Groups</fieldentry>
8                                         </qtimetadatafield>
9                                 </qtimetadata>
10                                 <qtimetadata>
11                                         <qtimetadatafield>
12                                                 <fieldlabel>qmd_questiontype</fieldlabel>
13                                                 <fieldentry>Drag-and-drop</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                                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>             
23                                         <response_grp ident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>" rcardinality="Multiple">
24                                                 <material>
25                                                         <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
26                                                 </material>
27                                                 <render_choice shuffle="No">
28                                                 <?php for ($j=0; $j < $this->num_options; $j++): ?>
29                                                         <response_label ident="Option<?php echo $j; ?>">        
30                                                                 <flow_mat>
31                                                                         <material>
32                                                                                 <mattext texttype="text/html"><?php echo $this->row['option_'.$j]; ?></mattext>
33                                                                         </material>
34                                                                 </flow_mat>
35                                                         </response_label>
36                                                 <?php endfor; ?>
37                                                 </render_choice>
38                                         </response_grp>
39                                         <?php endfor; ?>
40                                 </flow>
41                         </presentation>
42
43                         <resprocessing>
44                                 <outcomes>
45                                         <decvar/>
46                                 </outcomes>
47                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
48                                 <?php if ($this->row['answer_'.$i] > -1): ?>
49                                 <respcondition title="CorrectResponse">
50                                         <conditionvar>                                          
51                                                 <varequal respident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>">Option<?php echo $this->row['answer_'.$i]; ?></varequal>
52                                         </conditionvar>
53                                         <setvar varname="Respondus_Correct" action="Add"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
54                                 </respcondition>
55                                 <?php endif; ?>
56                         <?php endfor; ?>
57                         </resprocessing>
58                 <?php if ($this->row['feedback']): ?>
59                         <itemfeedback ident="FEEDBACK" view="All">
60                                 <solution>
61                                         <solutionmaterial>
62                                                 <flow_mat>
63                                                         <material>
64                                                                 <mattext texttype="text/html"><?php echo $this->row['feedback']; ?></mattext>
65                                                         </material>
66                                                 </flow_mat>
67                                         </solutionmaterial>
68                                 </solution>
69                         </itemfeedback>
70                 <?php endif; ?>
71                 </item>