Rev 13704 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=question first |
23 | reyssat | 2 | textarea="datatrue datafalse explain" |
13704 | obado | 3 | iEdit="explain" |
8515 | obado | 4 | asis="datatrue datafalse explain" |
23 | reyssat | 5 | |
4135 | bpr | 6 | :A multiple choice exercise with random permutation. |
23 | reyssat | 7 | |
4135 | bpr | 8 | A standard multiple choice exercise; The answers as well as their order may be randomized. |
15179 | lemaire | 9 | <p>Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a></p> |
23 | reyssat | 10 | |
11 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
12 | |||
4135 | bpr | 13 | Remove the above header if you destroy the model tags i.e. the lines starting |
14 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
||
23 | reyssat | 15 | |
16 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
||
17 | |||
18 | :\title{Multiple choice} |
||
5147 | bpr | 19 | :\author{XIAO, Gang} |
8002 | bpr | 20 | :\email{qualite@wimsedu.info} |
5724 | bpr | 21 | :\credits{} |
23 | reyssat | 22 | |
4135 | bpr | 23 | :Maximum 10 possible answers will be shown to the learner at a time. |
24 | It is recommended that you provide a large number of possible answers for the exercise , |
||
25 | otherwise the exercise will only show |
||
23 | reyssat | 26 | what is available. |
27 | \integer{tot=5} |
||
28 | |||
4135 | bpr | 29 | :The number of correct answers in each exercise must not exceed the total. |
23 | reyssat | 30 | \integer{givetrue=2} |
31 | |||
4135 | bpr | 32 | :Number of "mandatory" wrong answers. |
33 | For example if this number is 2, the first two wrong answers in the list will |
||
23 | reyssat | 34 | always be presented in the generated exercise. |
11544 | obado | 35 | <p> If doubtful, put 0.</p> |
23 | reyssat | 36 | \integer{minfalse=0} |
37 | |||
38 | :Text that explains what should be done. |
||
39 | $embraced_randitem |
||
8515 | obado | 40 | \text{explain=<p>Here is a model of multiple choice exercise. The answers are presented in random order. |
41 | Change the text here below to make your own multiple choice exercise.</p> |
||
4135 | bpr | 42 | Select the correct answer. |
43 | When there are several correct answers, you can select any of them. |
||
23 | reyssat | 44 | } |
45 | |||
4135 | bpr | 46 | :The correct answers - write one per line. |
47 | You can write several here (one per line) for random pickup. |
||
48 | Avoid very long sentences! No semi-colons are allowed in the sentence. |
||
23 | reyssat | 49 | $embraced_randitem |
50 | \matrix{datatrue= |
||
4135 | bpr | 51 | First correct answer. |
52 | Second correct answer. |
||
53 | Third correct answer. |
||
54 | Fourth correct answer. |
||
23 | reyssat | 55 | } |
56 | |||
11544 | obado | 57 | :The wrong answers -write one per line. |
4135 | bpr | 58 | You can write several here (one per line) for random pickup. |
59 | Avoid very long sentences! No semi-colons are allowed in the sentence. |
||
23 | reyssat | 60 | $embraced_randitem |
61 | \matrix{datafalse= |
||
4135 | bpr | 62 | First wrong answer. |
63 | Second wrong answer. |
||
64 | Third wrong answer. |
||
65 | Fourth wrong answer. |
||
66 | Fifth wrong answer. |
||
67 | Sixth wrong answer. |
||
68 | Seventh wrong answer. |
||
69 | Eighth wrong answer. |
||
23 | reyssat | 70 | } |
71 | |||
4135 | bpr | 72 | :Optional words: "checkbox", "split". |
73 | Add the word "checkbox" if there are several correct answers and if the student |
||
74 | must seelct all of them (instead of just any one). If you authorise a partial score |
||
75 | for when only part of the correct answers have been selected, enter the word 'split'. |
||
76 | |||
23 | reyssat | 77 | \text{option=} |
78 | |||
11544 | obado | 79 | :General feedback |
80 | This text will be displayed after the learner response, whether it's right or wrong. |
||
8512 | bpr | 81 | \text{feedback_general=} |
23 | reyssat | 82 | |
11544 | obado | 83 | :Feedback for a good answer |
84 | This text will be displayed after the learner response, only if it's right. |
||
85 | \text{feedback_good=} |
||
8512 | bpr | 86 | |
11544 | obado | 87 | :Feedback for a bad answer |
88 | This text will be displayed after the learner response, only if it's wrong. |
||
89 | \text{feedback_bad=} |
||
8512 | bpr | 90 | |
11653 | obado | 91 | :Hint |
92 | A text that can give tips to leaners on how to find the answer |
||
93 | \text{exo_hint=} |
||
94 | |||
11544 | obado | 95 | :Embraced random items |
8512 | bpr | 96 | $embraced_randitem |
11544 | obado | 97 | \text{accolade=item(1,1 yes, |
98 | 2 no)} |
||
8512 | bpr | 99 | |
9980 | obado | 100 | :%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%% |
8512 | bpr | 101 | \text{accolade=wims(word 1 of \accolade)} |
102 | |||
103 | \text{empty=} |
||
104 | \if{\feedback_general != \empty}{ |
||
105 | \text{feedback_general=<p class="feedback">\feedback_general</p>} |
||
106 | } |
||
11544 | obado | 107 | \if{\feedback_good != \empty}{ |
108 | \text{feedback_good=<p class="feedback good_answer">\feedback_good</p>} |
||
8512 | bpr | 109 | } |
11544 | obado | 110 | \if{\feedback_bad != \empty}{ |
111 | \text{feedback_bad=<p class="feedback bad_answer">\feedback_bad</p>} |
||
8512 | bpr | 112 | } |
11653 | obado | 113 | \if{\exo_hint != \empty}{ |
114 | \hint{\exo_hint} |
||
115 | } |
||
8512 | bpr | 116 | |
23 | reyssat | 117 | \text{datatrue=wims(nonempty rows \datatrue)} |
118 | \text{datafalse=wims(nonempty rows \datafalse)} |
||
119 | \integer{truecnt=rows(\datatrue)} |
||
120 | \integer{falsecnt=rows(\datafalse)} |
||
121 | \integer{givetrue=\givetrue<1?1} |
||
122 | \integer{givetrue=\givetrue>\truecnt?\truecnt} |
||
123 | \integer{tot=\tot > \falsecnt+\givetrue?\falsecnt+\givetrue} |
||
124 | \integer{givetrue=\givetrue>\tot-1?\tot-1} |
||
125 | \integer{minfalse=\minfalse>\tot-\givetrue?\tot-\givetrue} |
||
126 | \text{tsh=shuffle(\truecnt)} |
||
127 | \text{true=row(\tsh,\datatrue)} |
||
128 | \if{\minfalse>0}{ |
||
129 | \text{false1=row(1..\minfalse,\datafalse);} |
||
130 | \text{false2=row(\minfalse+1..\falsecnt,\datafalse)} |
||
131 | }{ |
||
132 | \integer{minfalse=0} |
||
133 | \text{false1=} |
||
134 | \text{false2=\datafalse} |
||
135 | } |
||
136 | \text{fsh=shuffle(\falsecnt)} |
||
137 | \text{false2=row(\fsh,\false2)} |
||
138 | \text{pick=row(1..\givetrue,\true);\false1 row(1..\tot-\givetrue-\minfalse,\false2)} |
||
139 | \text{ind=wims(makelist 1 for x=1 to \givetrue),wims(makelist 0 for x=1 to \tot-\givetrue)} |
||
140 | |||
141 | \text{sh=shuffle(\tot)} |
||
142 | \text{ind=item(\sh,\ind)} |
||
143 | \text{pick=row(\sh,\pick)} |
||
8512 | bpr | 144 | \text{pick=\accolade=1 ? wims(embraced randitem \pick)} |
145 | \text{explain=\accolade=1 ? wims(embraced randitem \explain)} |
||
23 | reyssat | 146 | \text{ans=positionof(1,\ind)} |
147 | \text{list=item(1..\tot,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)} |
||
148 | \text{anstype=checkbox iswordof \option?checkbox:radio} |
||
149 | |||
11544 | obado | 150 | :%%%%%%%%%%%%% Now the statement in HTML. %%%%%%%%%%%%%%%%%%%% |
23 | reyssat | 151 | |
152 | ::You don't need to modify this in general. |
||
153 | |||
1362 | obado | 154 | \statement{ |
9924 | obado | 155 | <div class="oef_explain">\explain</div> |
156 | \for{i=1 to \tot} |
||
12208 | obado | 157 | {<div class="oefreply">\embed{reply 1,\i, \list[\i] : \pick[\i;]}</div>} |
23 | reyssat | 158 | } |
159 | |||
11544 | obado | 160 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
23 | reyssat | 161 | |
162 | \answer{The reply}{\ans;\list}{type=\anstype}{option=\option} |
||
163 | |||
8512 | bpr | 164 | \feedback{1=1}{\feedback_general} |
11544 | obado | 165 | \feedback{\reply1 isitemof \list[\ans]}{\feedback_good} |
166 | \feedback{\reply1 notitemof \list[\ans]}{\feedback_bad} |