Rev 13715 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=select |
13715 | obado | 2 | textarea="instruction data" |
3 | iEdit="instruction" |
||
4137 | bpr | 4 | |
5 | :Hide certain words in a sentence (flashcard). |
||
6 | |||
7 | Certain labels from among those shown have to be hid ("turned over") by clicking on them. |
||
13477 | obado | 8 | <p class="wims_credits"> |
15179 | lemaire | 9 | Author of the model : <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a> |
4137 | bpr | 10 | </p> |
11 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
12 | |||
13 | Remove the above header if you destroy the model tags i.e. the lines starting |
||
14 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
||
15 | |||
16 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
||
17 | |||
18 | :\title{Hide the labels} |
||
5147 | bpr | 19 | :\author{Csilla, Ducrocq} |
4137 | bpr | 20 | :\email{csilla.ducrocq@u-psud.fr} |
5724 | bpr | 21 | :\credits{} |
4137 | bpr | 22 | |
23 | :Instruction |
||
24 | \text{instruction=Hide the adjectives by clicking on the labels containing them.} |
||
25 | |||
26 | :The number of sentences displayed at a time (maximum 5) |
||
27 | \text{N=2} |
||
28 | |||
29 | :Name of the file |
||
30 | Only enter a name if you wish to create a separate data file |
||
31 | (in an OEF module). |
||
32 | <pre> |
||
33 | |||
13205 | bpr | 34 | :The ??black?? cat ate the ??white?? mouse hungrily. |
35 | :here's a ??green?? house standing on the ??small?? hill. |
||
4137 | bpr | 36 | </pre> |
37 | In this case the main data will not be taken into consideration. |
||
38 | otherwise, you need to enter the main data below. |
||
8512 | bpr | 39 | |
4137 | bpr | 40 | \text{file=} |
41 | |||
42 | :Main data. |
||
8512 | bpr | 43 | Add ?? before and after the words to be hidden in the sentences. |
4240 | bpr | 44 | |
4137 | bpr | 45 | \text{data=The ??black?? cat ate the ??white?? mouse hungrily. |
46 | There's a ??green?? house standing on the ??small?? hill. |
||
47 | I've got ??red?? and ??blue?? flowers swaying in my garden. |
||
4240 | bpr | 48 | He looked at the ??young?? boy sadly.} |
4137 | bpr | 49 | |
11544 | obado | 50 | :Embraced random items |
8512 | bpr | 51 | $embraced_randitem |
11544 | obado | 52 | \text{accolade=item(1,1 yes, |
53 | 2 no)} |
||
8512 | bpr | 54 | |
4137 | bpr | 55 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
8512 | bpr | 56 | \text{accolade=wims(word 1 of \accolade)} |
57 | |||
4137 | bpr | 58 | \integer{N=min(\N,5)} |
59 | \if{\file notsametext}{ |
||
60 | \integer{datacnt=wims(recordcnt \file)} |
||
61 | \integer{N=min(\N,\datacnt)} |
||
62 | \text{choix=shuffle(\datacnt)} |
||
63 | \text{choix=\choix[1..\N]} |
||
64 | \text{data=} |
||
65 | \for{s in \choix}{ |
||
66 | \text{data=\data |
||
67 | wims(record \s of \file)} |
||
68 | } |
||
69 | }{ |
||
70 | \integer{M=rows(\data)} |
||
71 | \integer{N=min(\N,\M)} |
||
72 | \integer{N=min(\N,10)} |
||
73 | \text{liste=shuffle(\M)} |
||
74 | \text{liste=\liste[1..\N]} |
||
75 | \matrix{data=\data} |
||
76 | \matrix{data=\data[\liste;]} |
||
77 | } |
||
78 | \text{Numero=} |
||
79 | \text{Texte=} |
||
80 | \text{cnt=} |
||
8512 | bpr | 81 | \text{data=\accolade=1 ?wims(embraced randitem \data)} |
4240 | bpr | 82 | \text{data=wims(replace internal ' by ’ in \data)} |
4137 | bpr | 83 | \for{u=1 to \N}{ |
84 | \matrix{texte=slib(text/markgroup \data[\u;])} |
||
85 | \matrix{numero=\texte[1..-4;]} |
||
86 | \text{cnt_mot = rows(\numero)} |
||
87 | \text{numero = wims(rows2lines \numero)} |
||
88 | \text{numero = wims(lines2items \numero)} |
||
89 | \text{Numero = wims(append line \numero to \Numero)} |
||
90 | \text{texte = \texte[-3;]} |
||
91 | \text{cc=items(\texte)} |
||
92 | \text{cnt = wims(append item \cc to \cnt)} |
||
93 | \text{Texte=wims(append line \texte to \Texte)} |
||
94 | } |
||
95 | \matrix{Texte=\Texte} |
||
96 | \matrix{Numero=\Numero} |
||
97 | \text{STEP=wims(makelist r x for x=1 to \N)} |
||
98 | \steps{\STEP} |
||
13488 | obado | 99 | |
100 | \statement{ |
||
101 | \instruction |
||
102 | \if{\N=1}{ |
||
103 | <div class="emptyline"> </div> |
||
104 | <div class="wimscenter"> |
||
105 | \for{j=1 to \cnt}{ |
||
106 | \embed{r 1,\j} |
||
107 | } |
||
108 | </div> |
||
109 | }{ |
||
110 | \for{ss=1 to \N}{ |
||
111 | <p>\ss :</p> |
||
112 | <div class="wimscenter"> |
||
113 | \for{j=1 to \cnt[\ss]}{ |
||
114 | \embed{r \ss,\j} |
||
115 | } |
||
116 | </div> |
||
117 | } |
||
118 | } |
||
4137 | bpr | 119 | } |
13488 | obado | 120 | |
4137 | bpr | 121 | \answer{1}{\Numero[1;];\Texte[1;]; }{type=flashcard}{option=show noanalyzeprint} |
122 | \answer{2}{\Numero[2;];\Texte[2;]; }{type=flashcard}{option=show noanalyzeprint} |
||
123 | \answer{3}{\Numero[3;];\Texte[3;]; }{type=flashcard}{option=show noanalyzeprint} |
||
124 | \answer{4}{\Numero[4;];\Texte[4;]; }{type=flashcard}{option=show noanalyzeprint} |
||
125 | \answer{5}{\Numero[5;];\Texte[5;]; }{type=flashcard}{option=show noanalyzeprint} |