AC_4897, AC_4898, AC_4899: Multifile uploader fixes.
[acontent.git] / themes / default / tests / test_questions / multichoice_qti_1p2.tmpl.php
1 <!-- single answer multiple choice question -->
2                 <item title="Multiple choice 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                                         <qtimetadatafield>
10                                                 <fieldlabel>qmd_questiontype</fieldlabel>
11                                                 <fieldentry>Multiple-choice</fieldentry>
12                                         </qtimetadatafield>
13                     <qtimetadatafield>
14                         <fieldlabel>cc_profile</fieldlabel>
15                         <fieldentry>cc.mutliple_choice.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                                         <response_lid ident="RESPONSE<?php echo $this->row['question_id']; ?>" rcardinality="Single">
29                                                 <render_choice shuffle="No" minnumber="1" maxnumber="1">
30                                                 <?php for ($i=0; $i < $this->num_choices; $i++): ?>
31                                                         <response_label ident="Choice<?php echo $i; ?>">
32                                                                 <flow_mat>
33                                                                         <material>
34                                                                                 <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
35                                                                         </material>
36                                                                 </flow_mat>
37                                                         </response_label>
38                                                 <?php endfor; ?>
39                                                 </render_choice>
40                                         </response_lid>
41                                 </flow>
42                         </presentation>
43                         <resprocessing>
44                                 <outcomes>
45                                         <decvar varname="SCORE" />
46                                 </outcomes>
47                                 <?php for ($i=0; $i < $this->num_choices; $i++): ?>
48                                         <?php if ($this->row['answer_'.$i]): ?>
49                                 <respcondition title="CorrectResponse">
50                                         <conditionvar>                                          
51                                                 <varequal respident="RESPONSE<?php echo $this->row['question_id']; ?>">Choice<?php echo $i; ?></varequal>
52                                         </conditionvar>
53                                         <setvar varname="que_score" action="Set"><?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">
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>