Subversion Repositories wimsdev

Rev

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