Subversion Repositories wimsdev

Rev

Rev 15179 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11375 bpr 1
type=select
13715 obado 2
textarea="data pre post"
3
iEdit="pre post"
23 reyssat 4
 
4135 bpr 5
:Select words in a text.
23 reyssat 6
 
8002 bpr 7
The exercise presents a piece of text where certain words can be "selected".
4135 bpr 8
Select certain words according to the criterion mentioned in the exercise.<p>
9
 
10
To make an exercise with this model, type the list of
11
items and their properties.
13477 obado 12
<p class="wims_credits">
15179 lemaire 13
Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a>
13477 obado 14
</p>
23 reyssat 15
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
16
 
4136 bpr 17
Remove the above header if you destroy the model tags i.e. the lines starting
18
with a ':'. Otherwise the exercise might not be recognised by Createxo..
23 reyssat 19
 
20
:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%
21
 
4135 bpr 22
:\title{Select words in a text}
5147 bpr 23
:\author{XIAO, Gang}
8002 bpr 24
:\email{qualite@wimsedu.info}
5724 bpr 25
:\credits{}
23 reyssat 26
 
4135 bpr 27
:At least & word shoukld be selected in each exercise.
23 reyssat 28
\integer{minmark=1}
29
 
4135 bpr 30
:Maximum number of words that should be selected.
23 reyssat 31
\integer{maxmark=8}
32
 
33
:Main data.
13705 obado 34
<p>Write one piece of text per line, and separate lines (and texts) by a semi-colon.
35
(Therefore the texts themselves cannot contain semi-colons. If you want to add semi-colons in a text, use the html code of the semi-colon)
36
</p><p>
37
The words to be selected should be written between a pair of double-question marks "??".
38
Each field contains a list of words separated by commas.
39
The word shown to the student will be randomly drawn from the list.
40
If it is the word in the first position
41
it should be selected by the learner when exercising.
42
If the second alternative is drawn, it should not be selected.
4135 bpr 43
You may decide not to provide a first alternative and leave this part of the field  empty.
13705 obado 44
</p><p>
45
Up to a hundred selectable words can be inserted in each sentence.</p>
23 reyssat 46
$embraced_randitem
47
 
48
\text{data=
4135 bpr 49
:{Jack,John,Peter,Michael,James} ??are,is?? a teacher. He ??{have,is},has?? 25 students in his class.
50
??It,There?? ??{is,have,has}are?? 10 girls and 15 boys.
23 reyssat 51
;
17175 bpr 52
??:Dear Lucie,<br>
4135 bpr 53
Thank you for your e-mail about your favourite pop singer.
54
I like Madonna too, but I prefer Diams. Diams ??has,is?? a French singer,
55
she sings rap songs about young people in France. She ??is,has got??
56
brown hair and brown eyes, She ??{haven't,isn't},hasn't?? got glasses.
17175 bpr 57
She ??has got,is?? about 24 I think.<br>
58
Write soon!<br>
4135 bpr 59
Sophie
60
;
23 reyssat 61
 
17175 bpr 62
:Dear Karen,<br>
4135 bpr 63
When you come on holiday to France. My dad will meet you at the airport.
8002 bpr 64
He ??has got,is?? a bit plump, he ??{is,are,have got},has got??, short,
65
fair hair and
4135 bpr 66
blue eyes. He ??has got,is?? 45 years old. At home you will meet my mum and
67
my little sister too. They ??{is,am},are?? very pretty, they ??is,have?? got
68
long, curly, fair hair. My mum ??{is,are},has got?? glasses. We ??has,have?? got
17175 bpr 69
a big dog, it is very nice. It loves kids.<br>
70
Have a nice trip!<br>
4135 bpr 71
Marie
23 reyssat 72
;
17175 bpr 73
:Dear Peter,<br>
4135 bpr 74
My name is Joelle, I ??{are,is},am?? French. I live in Paris. I ??have got,am??
8002 bpr 75
thirteen years old. I ??am,have?? got two brothers, they ??{have got,is},are??
76
15 and 10 years old. Marc ??is,has got?? glasses but Nicholas
4135 bpr 77
??haven't|hasn't?? got glasses.
17175 bpr 78
Have you got any brothers or sisters?<br>
79
Write soon!<br>
4135 bpr 80
Julie
23 reyssat 81
 
82
;
83
 
84
}
85
 
86
:Text before the question. html tags allowed, can be empty.
87
$embraced_randitem
8512 bpr 88
\text{pre=Please click on the mistakes in the text below.
23 reyssat 89
}
90
 
91
:Text after the question. html tags allowed, can be empty.
92
\text{post=}
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
 
4135 bpr 99
:Optional words.
100
Add the word "split" to the exercise if you allow a partial score for a
23 reyssat 101
partially correct answer.
102
\text{option=split}
103
 
104
:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
105
 
8512 bpr 106
\text{accolade=wims(word 1 of \accolade)}
23 reyssat 107
\text{data=wims(singlespace \data)}
108
\text{data=wims(nonempty rows \data)}
109
\text{data=randomrow(\data)}
8512 bpr 110
\text{data=\accolade=1 ? wims(embraced randitem \data)}
23 reyssat 111
\text{data=slib(text/cutchoice2 \data)}
112
\integer{qs=floor(rows(\data)/2)}
113
\text{list=}
114
\text{ind=}
115
\for{i=1 to \qs}{
116
 \text{d=\data[2*\i;]}
117
 \text{list=\list \d;}
118
 \if{\d[1] issametext }{\text{ind=\ind[]2,}}{\text{ind=\ind[]1,}}
119
}
120
 
121
\text{can=positionof(1,\ind)}
122
\text{cancnt=items(\can)}
123
\integer{tomark=randint(min(\minmark,\cancnt)..min(\maxmark,\cancnt))}
124
\text{can=\cancnt>1?shuffle(\can)}
125
\text{good=item(1..\tomark,\can)}
126
\text{good=wims(sort numeric items \good)}
127
 
128
\text{show=}
129
\for{i=1 to \qs}{
130
 \text{d=\i isitemof \good?\list[\i;1]:\list[\i;2]}
131
 \text{show=\show[]\d,}
132
}
133
 
8512 bpr 134
\text{pre=\accolade=1 ? wims(embraced randitem \pre)}
23 reyssat 135
 
136
:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%
137
 
138
::You don't need to modify this in general.
139
 
8512 bpr 140
\statement{<div>
141
\pre
142
</div>
23 reyssat 143
\data[1;]
144
\for{k=1 to \qs}{
145
\embed{r1,\k} \data[2*\k+1;]
146
}
147
\post
148
}
149
 
150
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%
151
 
152
\answer{Field 1}{\good;\show}{type=mark}{option=\option}
153