remove old readme
[atutor.git] / themes / default / test_questions / matching_qti_2p1.tmpl.php
1 <<?php echo '?'; ?>xml version="1.0" encoding="<?php echo $this->encoding; ?>"<?php echo '?'; ?>>
2 <!-- matching question with partial marks -->
3 <assessmentItem 
4         xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1" 
5         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
6         xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 imsqti_v2p1.xsd" 
7         identifier="ATUTOR-<?php echo $this->row['question_id']; ?>" 
8         title="<?php echo $this->row['question']; ?>" 
9         adaptive="false" 
10         timeDependent="false"
11         toolname="ATutor - atutor.ca"
12         toolversion="<?php echo VERSION; ?>"
13 >
14         <responseDeclaration identifier="RESPONSE" cardinality="multiple" baseType="directedPair">
15                 <correctResponse>
16                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
17                                 <?php if ($this->row['answer_'.$i] > -1): ?>
18                                         <value>Choice<?php echo $i; ?> Option<?php echo $this->row['answer_'.$i]; ?></value>
19                                 <?php endif; ?>
20                         <?php endfor; ?>
21                 </correctResponse>
22                 <mapping lowerBound="0" defaultValue="0">
23                         <?php for ($i=0; $i < $this->num_choices; $i++): ?>
24                                 <?php if ($this->row['answer_'.$i] > -1): ?>
25                                         <mapEntry mapKey="Choice<?php echo $i; ?> Option<?php echo $this->row['answer_'.$i]; ?>" mappedValue="1"/>
26                                 <?php endif; ?>
27                         <?php endfor; ?>
28                 </mapping>
29           <?php if ($this->row['feedback']): ?>
30                   <outcomeDeclaration identifier="FEEDBACK" cardinality="multiple" baseType="identifier"/>
31           <?php endif; ?>
32         </responseDeclaration>
33
34         <itemBody>
35                 <associateInteraction responseIdentifier="RESPONSE" shuffle="true" maxAssociations="<?php echo $this->num_choices; ?>">
36                         <prompt><?php echo $this->row['question']; ?></prompt>
37                         <simpleMatchSet>
38                                 <?php for ($i=0; $i < $this->num_choices; $i++): ?>
39                                         <simpleAssociableChoice identifier="Choice<?php echo $i; ?>" matchMax="1"><?php echo $this->row['choice_'.$i]; ?></simpleAssociableChoice>
40                                 <?php endfor; ?>
41                         </simpleMatchSet>
42
43                         <simpleMatchSet>
44                                 <?php for ($i=0; $i < $this->num_options; $i++): ?>
45                                         <simpleAssociableChoice identifier="Option<?php echo $i; ?>" matchMax="<?php echo $this->num_choices; ?>"><?php echo $this->row['option_'.$i]; ?></simpleAssociableChoice>
46                                 <?php endfor; ?>
47                         </simpleMatchSet>
48                 </associateInteraction>
49         </itemBody>
50
51         <?php if ($this->row['feedback']): ?>
52                 <modalFeedback outcomeIdentifier="FEEDBACK" identifier="FEEDBACK" showHide="hide"><?php echo $this->row['feedback']; ?></modalFeedback> 
53         <?php endif; ?>
54 </assessmentItem>