AC_4897, AC_4898, AC_4899: Multifile uploader fixes.
[acontent.git] / 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                                 <qtimetadata>
5                                         <qtimetadatafield>
6                                                 <fieldlabel>qmd_itemtype</fieldlabel>
7                                                 <fieldentry>Logical Groups</fieldentry>
8                                         </qtimetadatafield>
9                                         <qtimetadatafield>
10                                                 <fieldlabel>qmd_questiontype</fieldlabel>
11                                                 <fieldentry>Drag-and-drop</fieldentry>
12                                         </qtimetadatafield>
13                     <qtimetadatafield>
14                         <fieldlabel>cc_profile</fieldlabel>
15                         <fieldentry>cc.pattern_match.v0p1</fieldentry>
16                     </qtimetadatafield>
17                     <qtimetadatafield>
18                         <fieldlabel>cc_weighting</fieldlabel>
19                         <fieldentry><?php echo $this->weight; ?></fieldentry>
20                     </qtimetadatafield>
21                                 </qtimetadata>
22                         </itemmetadata>
23                         <presentation>
24                                 <flow>
25                                         <material>
26                                                 <mattext texttype="text/html"><?php echo $this->row['question']; ?></mattext>
27                                         </material>
28                                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>             
29                                         <response_lid ident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>" rcardinality="Multiple">
30                                                 <material>
31                                                         <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
32                                                 </material>
33                                                 <render_choice shuffle="No">
34                                                 <?php for ($j=0; $j < $this->num_options; $j++): ?>
35                                                         <response_label ident="Option<?php echo $j; ?>">        
36                                                                 <flow_mat>
37                                                                         <material>
38                                                                                 <mattext texttype="text/html"><?php echo $this->row['option_'.$j]; ?></mattext>
39                                                                         </material>
40                                                                 </flow_mat>
41                                                         </response_label>
42                                                 <?php endfor; ?>
43                                                 </render_choice>
44                                         </response_lid>
45                                         <?php endfor; ?>
46                                 </flow>
47                         </presentation>
48
49                         <resprocessing>
50                                 <outcomes>
51                                         <decvar varname="SCORE" />
52                                 </outcomes>
53                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
54                                 <?php if ($this->row['answer_'.$i] > -1): ?>
55                                 <respcondition title="CorrectResponse">
56                                         <conditionvar>                                          
57                                                 <varequal respident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>">Option<?php echo $this->row['answer_'.$i]; ?></varequal>
58                                         </conditionvar>
59                                         <setvar varname="Respondus_Correct"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
60                                 </respcondition>
61                                 <?php endif; ?>
62                         <?php endfor; ?>
63                         </resprocessing>
64                 <?php if ($this->row['feedback']): ?>
65                         <itemfeedback ident="FEEDBACK">
66                                 <solution>
67                                         <solutionmaterial>
68                                                 <flow_mat>
69                                                         <material>
70                                                                 <mattext texttype="text/html"><?php echo $this->row['feedback']; ?></mattext>
71                                                         </material>
72                                                 </flow_mat>
73                                         </solutionmaterial>
74                                 </solution>
75                         </itemfeedback>
76                 <?php endif; ?>
77                 </item>