7aad2c5a3cb84170f1906691c1f48d7633fb9e20
[acontent.git] / docs / themes / default / tests / 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                                 <qmd_itemtype>Matching</qmd_itemtype>
5                                 <qtimetadata>
6                                         <qtimetadatafield>
7                                                 <fieldlabel>qmd_itemtype</fieldlabel>
8                                                 <fieldentry>Logical Groups</fieldentry>
9                                         </qtimetadatafield>
10                                 </qtimetadata>
11                         </itemmetadata>
12                         <presentation>                          
13                                 <flow>
14                                         <material>
15                                                 <mattext texttype="text/html"><?php echo $this->row['question']; ?></mattext>
16                                         </material>
17                                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>             
18                                         <response_grp ident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>" rcardinality="Multiple">
19                                                 <material>
20                                                         <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
21                                                 </material>
22                                                 <render_choice shuffle="No">
23                                                 <?php for ($j=0; $j < $this->num_options; $j++): ?>
24                                                         <response_label ident="Option<?php echo $j; ?>">        
25                                                                 <flow_mat>
26                                                                         <material>
27                                                                                 <mattext texttype="text/html"><?php echo $this->row['option_'.$j]; ?></mattext>
28                                                                         </material>
29                                                                 </flow_mat>
30                                                         </response_label>
31                                                 <?php endfor; ?>
32                                                 </render_choice>
33                                         </response_grp>
34                                         <?php endfor; ?>
35                                 </flow>
36                         </presentation>
37
38
39                         <resprocessing>
40                                 <outcomes>
41                                         <decvar/>
42                                 </outcomes>
43                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
44                                 <?php if ($this->row['answer_'.$i] > -1): ?>
45                                 <respcondition title="CorrectResponse">
46                                         <conditionvar>                                          
47                                                 <varequal respident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>">Option<?php echo $this->row['answer_'.$i]; ?></varequal>
48                                         </conditionvar>
49                                         <setvar varname="Respondus_Correct" action="Add"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
50                                 </respcondition>
51                                 <?php endif; ?>
52                         <?php endfor; ?>
53                         </resprocessing>
54                 <?php if ($this->row['feedback']): ?>
55                         <itemfeedback ident="FEEDBACK" view="All">
56                                 <solution>
57                                         <solutionmaterial>
58                                                 <flow_mat>
59                                                         <material>
60                                                                 <mattext texttype="text/html"><?php echo $this->row['feedback']; ?></mattext>
61                                                         </material>
62                                                 </flow_mat>
63                                         </solutionmaterial>
64                                 </solution>
65                         </itemfeedback>
66                 <?php endif; ?>
67                 </item>