Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
4136 bpr 1
type=game
13715 obado 2
textarea="data instruction"
3
iEdit="instruction"
4
 
4148 bpr 5
:A crossword made from words and clues to the words.
4136 bpr 6
 
13477 obado 7
<p class="wims_credits">
15179 lemaire 8
Author of the model: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a>
4136 bpr 9
</p>
10
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
11
 
12
Remove the above header if you destroy the model tags i.e. the lines starting
13
with a ':'. Otherwise the exercise might not be recognised by Createxo..
14
 
15
:%%%%%%%% Example parameters to redefine %%%%%%%%%%%%%%%%%
16
 
4148 bpr 17
:\title{Crossword}
5147 bpr 18
:\author{Csilla, Ducrocq}
5724 bpr 19
:\email{}
20
:\credits{}
13477 obado 21
 
4136 bpr 22
:Instruction
23
 
24
\text{instruction= Use the clues provided to write the corresponding words in the crossword puzzle}
25
 
26
:Maximum number of words
27
 
28
\text{N=7}
13477 obado 29
 
4136 bpr 30
:Options
8512 bpr 31
If the parameter chosen is  <span class="tt wims_code_words">allhelp</span>, all the clues are displayed.
5907 bpr 32
If the parameter chosen is <span class="tt wims_code_words">tooltip</span>,
4136 bpr 33
 the clues will be displayed in a pop-up window when clicking on the number in the crossword.
34
en "pop-up". Add a space to display the clues one by one on the side.
35
\text{none=allhelp}
36
 
4425 bpr 37
:Name of the data file
38
Only enter a name if you wish to create a separate data file
39
(in an OEF module)
40
of the following type
41
<pre>
4735 bpr 42
   &#58;accounting, the department that deals with finances
43
   &#58;marketing, the department that deals with customer relations
8512 bpr 44
   &#58;head, Chief executive officer
4735 bpr 45
   &#58;sales, the department that is in charge of selling the product
4425 bpr 46
</pre>
47
\text{file=}
48
 
4136 bpr 49
:Main data.
50
Write the words in lower case in the first column (no spaces allowed in a word),
51
write the clues in the second column.
52
 
53
\text{data=purchasing,the department that buys supplies.
54
maintenance, the department that is in charge of repairing technical installations
55
accounting, the department that deals with finances
56
marketing, the department that deals with customer relations
8512 bpr 57
head, Chief executive officer
4136 bpr 58
sales, the department that is in charge of selling the product
59
production, the department that makes the product
60
accountant, the person who is responsible for making out bills
61
secretary, the person who helps a manager by organising events and making phone calls or writing letters
62
receptionist, the person who receives visitors when they arrive
63
premises, the firm's buildings
64
headquarters,the administrative center of the firm
65
subsidiary, a company which is owned by a larger company}
66
 
11544 obado 67
:Embraced random items
8512 bpr 68
$embraced_randitem
11544 obado 69
\text{accolade=item(1,1 yes,
70
2 no)}
8512 bpr 71
 
4136 bpr 72
:%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%%
8512 bpr 73
\text{accolade=wims(word 1 of \accolade)}
4136 bpr 74
 
8512 bpr 75
\if{\file notsametext}{
76
  \text{file=randitem(\file)}
77
  \integer{datacnt=wims(recordcnt \file)}
78
  \integer{N=min(\N,\datacnt)}
79
  \text{choix=shuffle(\datacnt)}
80
  \text{choix=\choix[1..\N]}
81
  \text{data=}
82
  \for{s in \choix}{
83
    \text{data=\data
84
wims(record \s of \file)}
85
  }
86
  \matrix{data=\accolade=1 ?wims(randitem embraced \data)}
87
  \text{data=wims(replace internal ;; by ; in \data)}
88
}{
89
  \text{objet_cnt=rows(\data)}
90
  \integer{N=min(\N,\objet_cnt)}
91
  \text{bat=shuffle(\objet_cnt)}
92
  \text{bat=\bat[1..\N]}
93
  \matrix{data=\data}
94
  \matrix{data=\data[\bat;]}
95
}
4136 bpr 96
 
97
\text{data=slib(text/crossword \data) }
98
 
8512 bpr 99
\statement{ \instruction
4735 bpr 100
 
101
\embed{r1} }
8512 bpr 102
\answer{}{\data}{type=crossword}{option=\none}