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