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