Subversion Repositories wimsdev

Rev

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

type=datalist
textarea="data explain"

:Match two items.

Items are presented in a table in two columns. Match the
items by clicking on the two items that correspond.
<p>
To make an exercise with this model, type the list of
matching items.
<p>
With a slight modification, a variant of this exercise can accept images as items.
<p>
Author of the model: Gang Xiao <qualite@wimsedu.info>

:%%%%%%%%%%%%%%%%%      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{Correspondance}
:\author{Gang, Xiao}
:\email{qualite@wimsedu.info}
:\credits{}

:Number of (pairs of) matching items.
\integer{tot=6}

:The vertical size of labels in pixels.
Think of people who have to increase the font size of their browsers to see well!
Don't make the labels too small.


\integer{sizev=50}

:The horizontal size of left boxes in pixels.
Think of people who have to increase the font size of their browsers to see well!
Don't make the labels too small.
\integer{sizel=250}

:The horizontal size of right boxes in pixels.
Think of people who have to increase the font size of their browsers to see well!
Don't make the labels too small.
\integer{sizer=250}

:Main data.
Write one pair of corresponding items per line, separated by a comma.
\matrix{data=
Germany,                Berlin
Australia,              Canberra
Canada,                 Ottawa
China,                  Beijing
Spain,                  Madrid
United States,          Washington
France,                 Paris
Great Britain,          London
India,                  New Delhi
Indonesia,              Jacarta
Italy,                  Rome
Japon,                  Tokyo
Russia,                 Moscow
}

:Text that explains what should be done.
$embraced_randitem
\text{explain=Match the countries and their
capitals.}

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

\integer{datacnt=rows(\data)}
\integer{tot=\tot>\datacnt?\datacnt}

\text{shuf=item(1..\tot,shuffle(\datacnt))}
\text{data=row(\shuf,\data)}
\text{datal=column(1,\data)}
\text{datar=column(2,\data)}
\text{size=\sizev[]x\sizel[]x\sizer}
\text{explain=wims(embraced randitem \explain)}

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

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

The command to show the correspondance table, it is
\embed{reply 1,\size}

\statement{\explain

<p class="wimscenter">
\embed{reply 1,\size}
</p>

}

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

\answer{The reply}{\datal;\datar}{type=correspond}