Subversion Repositories wimsdev

Rev

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

type=select
textarea="data pre post"
iEdit="pre post"

:Select words in a text.

The exercise presents a piece of text where certain words can be "selected".
Select certain words according to the criterion mentioned in the exercise.<p>

To make an exercise with this model, type the list of
items and their properties.
<p class="wims_credits">
Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a>
</p>
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%

Remove the above header if you destroy the model tags i.e. the lines starting
with a ':'. Otherwise the exercise might not be recognised by Createxo..

:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%

:\title{Select words in a text}
:\author{XIAO, Gang}
:\email{qualite@wimsedu.info}
:\credits{}

:At least & word shoukld be selected in each exercise.
\integer{minmark=1}

:Maximum number of words that should be selected.
\integer{maxmark=8}

:Main data.
<p>Write one piece of text per line, and separate lines (and texts) by a semi-colon.
(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)
</p><p>
The words to be selected should be written between a pair of double-question marks "??".
Each field contains a list of words separated by commas.
The word shown to the student will be randomly drawn from the list.
If it is the word in the first position
it should be selected by the learner when exercising.
If the second alternative is drawn, it should not be selected.
You may decide not to provide a first alternative and leave this part of the field  empty.
</p><p>
Up to a hundred selectable words can be inserted in each sentence.</p>
$embraced_randitem

\text{data=
:{Jack,John,Peter,Michael,James} ??are,is?? a teacher. He ??{have,is},has?? 25 students in his class.
??It,There?? ??{is,have,has}are?? 10 girls and 15 boys.
;
??:Dear Lucie,<br/>
Thank you for your e-mail about your favourite pop singer.
I like Madonna too, but I prefer Diams. Diams ??has,is?? a French singer,
she sings rap songs about young people in France. She ??is,has got??
brown hair and brown eyes, She ??{haven't,isn't},hasn't?? got glasses.
She ??has got,is?? about 24 I think.<br/>
Write soon!<br/>
Sophie
;

:Dear Karen,<br/>
When you come on holiday to France. My dad will meet you at the airport.
He ??has got,is?? a bit plump, he ??{is,are,have got},has got??, short,
fair hair and
blue eyes. He ??has got,is?? 45 years old. At home you will meet my mum and
my little sister too. They ??{is,am},are?? very pretty, they ??is,have?? got
long, curly, fair hair. My mum ??{is,are},has got?? glasses. We ??has,have?? got
a big dog, it is very nice. It loves kids.<br/>
Have a nice trip!<br/>
Marie
;
:Dear Peter,<br/>
My name is Joelle, I ??{are,is},am?? French. I live in Paris. I ??have got,am??
thirteen years old. I ??am,have?? got two brothers, they ??{have got,is},are??
15 and 10 years old. Marc ??is,has got?? glasses but Nicholas
??haven't|hasn't?? got glasses.
Have you got any brothers or sisters?<br/>
Write soon!<br/>
Julie

;

}

:Text before the question. html tags allowed, can be empty.
$embraced_randitem
\text{pre=Please click on the mistakes in the text below.
}

:Text after the question. html tags allowed, can be empty.
\text{post=}

:Embraced random items
$embraced_randitem
\text{accolade=item(1,1 yes,
2 no)}

:Optional words.
Add the word "split" to the exercise if you allow a partial score for a
partially correct answer.
\text{option=split}

:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%

\text{accolade=wims(word 1 of \accolade)}
\text{data=wims(singlespace \data)}
\text{data=wims(nonempty rows \data)}
\text{data=randomrow(\data)}
\text{data=\accolade=1 ? wims(embraced randitem \data)}
\text{data=slib(text/cutchoice2 \data)}
\integer{qs=floor(rows(\data)/2)}
\text{list=}
\text{ind=}
\for{i=1 to \qs}{
 \text{d=\data[2*\i;]}
 \text{list=\list \d;}
 \if{\d[1] issametext }{\text{ind=\ind[]2,}}{\text{ind=\ind[]1,}}
}

\text{can=positionof(1,\ind)}
\text{cancnt=items(\can)}
\integer{tomark=randint(min(\minmark,\cancnt)..min(\maxmark,\cancnt))}
\text{can=\cancnt>1?shuffle(\can)}
\text{good=item(1..\tomark,\can)}
\text{good=wims(sort numeric items \good)}

\text{show=}
\for{i=1 to \qs}{
 \text{d=\i isitemof \good?\list[\i;1]:\list[\i;2]}
 \text{show=\show[]\d,}
}

\text{pre=\accolade=1 ? wims(embraced randitem \pre)}

:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%

::You don't need to modify this in general.

\statement{<div>
\pre
</div>
\data[1;]
\for{k=1 to \qs}{
\embed{r1,\k} \data[2*\k+1;]
}
\post
}

:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%

\answer{Field 1}{\good;\show}{type=mark}{option=\option}