Subversion Repositories wimsdev

Rev

Rev 13781 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11375 bpr 1
type=gapfill first
13781 bpr 2
textarea="explain data"
3
iEdit="explain"
4
asis="explain"
23 reyssat 5
 
6376 bpr 6
:Multiple choice questions embedded in a non variable text.
23 reyssat 7
 
13704 obado 8
This exercise presents a text where multiple-choice fields are inserted.
23 reyssat 9
<p>
13704 obado 10
To build an exercise with this model, just enter the texts.
11
An easy syntax allows to incorporate the fields of choice in the texts.
13477 obado 12
</p>
15179 lemaire 13
<p class="wims_credits">Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a></p>
23 reyssat 14
 
15
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
16
 
11544 obado 17
Remove the above header if you destroy the model tags! (The lines starting
18
with a ':'.) Otherwise the exercise might not be taken back by Createxo.
23 reyssat 19
 
11544 obado 20
:%%%%%%%% Sample parameters to be redefined %%%%%%%%%%%%%%%%%
23 reyssat 21
 
13704 obado 22
:\title{Drop-down menus in a text}
5724 bpr 23
:\author{XIAO, Gang}
8002 bpr 24
:\email{qualite@wimsedu.info}
5724 bpr 25
:\credits{}
13781 bpr 26
:Consigne pour les apprenants
23 reyssat 27
 
13781 bpr 28
\text{explain=Fill in:}
29
 
13477 obado 30
:Main data.
13704 obado 31
Questions to ask should be between a pair of double-question marks "??":
32
the different choices are separated by commas,
33
the correct answer being first.
34
You can ask up to 20 questions in one sentence.
35
<p>The text here is fixed.
36
  To vary the texts, choose the <strong>Choices in Texts</strong> template instead.</p>
23 reyssat 37
$embraced_randitem
8512 bpr 38
\text{data=
13704 obado 39
Linux was created in ??1991,1995,1998,1986,1989,2001?? by Linus Torvalds,
40
who was a ??Finnish, Swedish, American, English, Nordic?? student
41
at the time working on the ??Minix,Unix,Solaris?? system on
42
??Intel 386,Sun,Macintosh,Bull,Microsoft?? architecture machines.<br/>
43
He posted on a newsgroup the first version of his system,
44
 which was version ??0.02,0.00,0.01,0.12,1.00??.</p>
23 reyssat 45
}
46
 
11544 obado 47
:Embraced random items
8512 bpr 48
$embraced_randitem
11544 obado 49
\text{accolade=item(1,1 yes,
50
2 no)}
8512 bpr 51
 
11544 obado 52
:%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%%
8512 bpr 53
\text{accolade=wims(word 1 of \accolade)}
23 reyssat 54
\text{data=wims(singlespace \data)}
8512 bpr 55
\text{data=\accolade=1 ? wims(embraced randitem \data)}
23 reyssat 56
\text{data=slib(text/cutchoice2 \data)}
57
\integer{qs=min(20,floor(rows(\data)/2))}
58
 
59
\text{good=}
60
\text{field=}
61
\for{i=1 to \qs}{
62
 \text{f=\data[2*\i;]}
63
 \text{g=\f[1]}
64
 \text{f=wims(sort items \f)}
65
 \text{g=positionof(\g,\f)}
66
 \text{good=\good\g,}
67
 \text{field=\field\f;}
68
}
69
 
8512 bpr 70
\text{pre=\accolade=1 ? wims(embraced randitem \pre)}
71
\text{post=\accolade=1 ? wims(embraced randitem \post)}
23 reyssat 72
\text{qlist=wims(makelist reply x for x=1 to \qs)}
73
\steps{\qlist}
74
 
11544 obado 75
:%%%%%%%%%%%%% Now the statement in HTML. %%%%%%%%%%%%%%%%%%%%
23 reyssat 76
 
11544 obado 77
::You don't need to modify this in general.
23 reyssat 78
 
13781 bpr 79
\statement{<div>\explain</div>
80
  \data[1;]
81
  \for{k=1 to \qs}{
82
    \embed{r \k} \data[2*\k+1;]
83
  }
23 reyssat 84
}
85
 
11544 obado 86
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
23 reyssat 87
 
13704 obado 88
\answer{Field 1}{\good[1];\field[1;]}{type=menu}
89
\answer{Field 2}{\good[2];\field[2;]}{type=menu}
90
\answer{Field 3}{\good[3];\field[3;]}{type=menu}
91
\answer{Field 4}{\good[4];\field[4;]}{type=menu}
92
\answer{Field 5}{\good[5];\field[5;]}{type=menu}
93
\answer{Field 6}{\good[6];\field[6;]}{type=menu}
94
\answer{Field 7}{\good[7];\field[7;]}{type=menu}
95
\answer{Field 8}{\good[8];\field[8;]}{type=menu}
96
\answer{Field 9}{\good[9];\field[9;]}{type=menu}
97
\answer{Field 10}{\good[10];\field[10;]}{type=menu}
98
\answer{Field 11}{\good[11];\field[11;]}{type=menu}
99
\answer{Field 12}{\good[12];\field[12;]}{type=menu}
100
\answer{Field 13}{\good[13];\field[13;]}{type=menu}
101
\answer{Field 14}{\good[14];\field[14;]}{type=menu}
102
\answer{Field 15}{\good[15];\field[15;]}{type=menu}
103
\answer{Field 16}{\good[16];\field[16;]}{type=menu}
104
\answer{Field 17}{\good[17];\field[17;]}{type=menu}
105
\answer{Field 18}{\good[18];\field[18;]}{type=menu}
106
\answer{Field 19}{\good[19];\field[19;]}{type=menu}
107
\answer{Field 20}{\good[20];\field[20;]}{type=menu}