Subversion Repositories wimsdev

Rev

Rev 13715 | Blame | Compare with Previous | Last modification | View Log | RSS feed

type=game
textarea="data instruction"
iEdit="instruction"

:A crossword made from words and clues to the words.

<p class="wims_credits">
Author of the model: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</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 redefine %%%%%%%%%%%%%%%%%

:\title{Crossword}
:\author{Csilla, Ducrocq}
:\email{}
:\credits{}

:Instruction

\text{instruction= Use the clues provided to write the corresponding words in the crossword puzzle}

:Maximum number of words

\text{N=7}

:Options
If the parameter chosen is  <span class="tt wims_code_words">allhelp</span>, all the clues are displayed.
If the parameter chosen is <span class="tt wims_code_words">tooltip</span>,
 the clues will be displayed in a pop-up window when clicking on the number in the crossword.
en "pop-up". Add a space to display the clues one by one on the side.
\text{none=allhelp}

:Name of the data file
Only enter a name if you wish to create a separate data file
(in an OEF module)
of the following type
<pre>
   &#58;accounting, the department that deals with finances
   &#58;marketing, the department that deals with customer relations
   &#58;head, Chief executive officer
   &#58;sales, the department that is in charge of selling the product
</pre>
\text{file=}

:Main data.
Write the words in lower case in the first column (no spaces allowed in a word),
write the clues in the second column.

\text{data=purchasing,the department that buys supplies.
maintenance, the department that is in charge of repairing technical installations
accounting, the department that deals with finances
marketing, the department that deals with customer relations
head, Chief executive officer
sales, the department that is in charge of selling the product
production, the department that makes the product
accountant, the person who is responsible for making out bills
secretary, the person who helps a manager by organising events and making phone calls or writing letters
receptionist, the person who receives visitors when they arrive
premises, the firm's buildings
headquarters,the administrative center of the firm
subsidiary, a company which is owned by a larger company}

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

:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
\text{accolade=wims(word 1 of \accolade)}

\if{\file notsametext}{
  \text{file=randitem(\file)}
  \integer{datacnt=wims(recordcnt \file)}
  \integer{N=min(\N,\datacnt)}
  \text{choix=shuffle(\datacnt)}
  \text{choix=\choix[1..\N]}
  \text{data=}
  \for{s in \choix}{
    \text{data=\data
wims(record \s of \file)}
  }
  \matrix{data=\accolade=1 ?wims(randitem embraced \data)}
  \text{data=wims(replace internal ;; by ; in \data)}
}{
  \text{objet_cnt=rows(\data)}
  \integer{N=min(\N,\objet_cnt)}
  \text{bat=shuffle(\objet_cnt)}
  \text{bat=\bat[1..\N]}
  \matrix{data=\data}
  \matrix{data=\data[\bat;]}
}

\text{data=slib(text/crossword \data) }

\statement{ \instruction

\embed{r1} }
\answer{}{\data}{type=crossword}{option=\none}