Subversion Repositories wimsdev

Rev

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