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