move code up one directory
[atutor.git] / themes / default / test_questions / truefalse_qti_1p2.tmpl.php
1 <!-- true or false question (aka multiple choice with two choices) -->
2                 <item title="True or False 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>True/false</fieldentry>
12                                         </qtimetadatafield>
13                     <qtimetadatafield>
14                                                 <fieldlabel>cc_profile</fieldlabel>
15                                                 <fieldentry>cc.true_false.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">
30                                                         <response_label ident="ChoiceT">        
31                                                                 <flow_mat>
32                                                                         <material>
33                                                                                 <mattext texttype="text/html"><?php echo _AT('true'); ?></mattext>
34                                                                         </material>
35                                                                 </flow_mat>
36                                                         </response_label>
37                                                         <response_label ident="ChoiceF">        
38                                                                 <flow_mat>
39                                                                         <material>
40                                                                                 <mattext texttype="text/html"><?php echo _AT('false'); ?></mattext>
41                                                                         </material>
42                                                                 </flow_mat>
43                                                         </response_label>
44                                                 </render_choice>
45                                         </response_lid>
46                                 </flow>
47                         </presentation>
48                         <resprocessing>
49                                 <outcomes>
50                                         <decvar varname="SCORE" />
51                                 </outcomes>
52                                 <respcondition title="CorrectResponse">
53                                         <conditionvar>
54                                                 <varequal respident="RESPONSE<?php echo $this->row['question_id']; ?>">
55                                                         <?php 
56                                                                 if ($this->row['answer_0'] == 1) {
57                                                                         echo 'ChoiceT'; 
58                                                                 } else {
59                                                                         echo 'ChoiceF';
60                                                                 }
61                                                         ?>
62                                                 </varequal>
63                                         </conditionvar>
64                                         <setvar varname="que_score" action="Set"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
65                                 </respcondition>
66                         </resprocessing>
67                 <?php if ($this->row['feedback']): ?>
68                         <itemfeedback ident="FEEDBACK">
69                                 <solution>
70                                         <solutionmaterial>
71                                                 <flow_mat>
72                                                         <material>
73                                                                 <mattext texttype="text/html"><?php echo $this->row['feedback']; ?></mattext>
74                                                         </material>
75                                                 </flow_mat>
76                                         </solutionmaterial>
77                                 </solution>
78                         </itemfeedback>
79                 <?php endif; ?>
80                 </item>