Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
11375 bpr 1
type=select
13716 obado 2
textarea="data instruction"
3
iEdit="instruction"
4096 bpr 4
 
12167 mquerol 5
:Amagar certes paraules d'una frase (tipus flashcard).
4096 bpr 6
 
12167 mquerol 7
Es presenten les etiquetes. Es tracta d'amagar-ne algunes.
13476 obado 8
<p class="wims_credits">
15179 lemaire 9
Autor del model : <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a>
4096 bpr 10
</p>
11
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
12
 
14822 mquerol 13
Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle !
4096 bpr 14
(Ce sont les lignes qui commencent par un ':'.)
15
Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo.
16
 
14822 mquerol 17
:%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%%
12167 mquerol 18
:\title{Amagar les etiquetes}
5147 bpr 19
:\author{Bernadette, Perrin-Riou}
6132 bpr 20
:\email{bpr@math.u-psud.fr}
21
:\credits{}
13476 obado 22
 
12167 mquerol 23
:Enunciat
24
\text{instruction=Amagar els adjectius clicant damunt la seva etiqueta.}
13476 obado 25
 
14822 mquerol 26
:Nombre de frases proposades (màxim 5)
4096 bpr 27
\text{N=2}
13476 obado 28
 
12167 mquerol 29
:Nom del fitxer
14822 mquerol 30
Ompliu-ho només si voleu transferir el codi d'aquest exercici a un compte de Modtool
31
i utilitzeu un fitxer de dades (en un mòdul OEF)
12167 mquerol 32
del tipus
4096 bpr 33
<pre>
14822 mquerol 34
 &#58;El gat ??negre?? s'ha menjat el ratolí ??blanc.??
35
 &#58;El gat ??blanc?? s'ha menjat el ratolí ??negre.??
4096 bpr 36
</pre>
12167 mquerol 37
En aquest cas, les dades principals no es tindran en compte.
38
En cas contrari, ompliu les dades principals.
4096 bpr 39
 
40
\text{file=}
41
 
12167 mquerol 42
:Dades principals.
43
Posar les frases envoltant amb ?? les paraules a amagar.
14822 mquerol 44
\text{data=El gat ??negre?? s'ha menjat el ratolí ??blanc.??
45
La casa ??verda?? està situada al turó.
46
Al jardí, hi ha flors ??blanques?? i ??vermelles.??}
4096 bpr 47
 
13476 obado 48
:S'accepta text aleatori posat entre claus
6132 bpr 49
$embraced_randitem
14822 mquerol 50
\text{accolade=item(1,1 sí,
12167 mquerol 51
2 no)}
6132 bpr 52
 
14822 mquerol 53
:%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%%
6132 bpr 54
\text{accolade=wims(word 1 of \accolade)}
55
 
4096 bpr 56
\integer{N=min(\N,5)}
57
\if{\file notsametext}{
58
  \integer{datacnt=wims(recordcnt \file)}
59
  \integer{N=min(\N,\datacnt)}
60
  \text{choix=shuffle(\datacnt)}
61
  \text{choix=\choix[1..\N]}
62
  \text{data=}
63
  \for{s in \choix}{
64
    \text{data=\data
65
wims(record \s of \file)}
66
   }
67
  }{
68
  \integer{M=rows(\data)}
69
  \integer{N=min(\N,\M)}
70
  \integer{N=min(\N,10)}
71
  \text{liste=shuffle(\M)}
72
  \text{liste=\liste[1..\N]}
73
  \matrix{data=\data}
74
  \matrix{data=\data[\liste;]}
75
}
76
\text{Numero=}
77
\text{Texte=}
78
\text{cnt=}
6132 bpr 79
\text{data=\accolade=1 ?wims(embraced randitem \data)}
4240 bpr 80
\text{data=wims(replace internal ' by &#146; in \data)}
4096 bpr 81
\for{u=1 to \N}{
82
  \matrix{texte=slib(text/markgroup \data[\u;])}
83
  \matrix{numero=\texte[1..-4;]}
84
  \text{cnt_mot = rows(\numero)}
85
  \text{numero = wims(rows2lines \numero)}
86
  \text{numero = wims(lines2items \numero)}
87
  \text{Numero = wims(append line \numero to \Numero)}
88
  \text{texte = \texte[-3;]}
89
  \text{cc=items(\texte)}
90
  \text{cnt = wims(append item  \cc to \cnt)}
91
  \text{Texte=wims(append line \texte to \Texte)}
92
}
93
\matrix{Texte=\Texte}
94
\matrix{Numero=\Numero}
95
\text{STEP=wims(makelist r x for x=1 to \N)}
96
\steps{\STEP}
97
\statement{\instruction
98
\if{\N=1}{<div class="emptyline"> </div>
11375 bpr 99
<div class="wimscenter">\for{j=1 to \cnt}{
4096 bpr 100
   \embed{r 1,\j}
6132 bpr 101
 }</div>
4096 bpr 102
}{
13488 obado 103
 \for{ss=1 to \N}{<p> \ss :</p>
6132 bpr 104
 <div class="wimscenter">\for{j=1 to \cnt[\ss]}{
4096 bpr 105
   \embed{r \ss,\j}
6132 bpr 106
 }</div>
4096 bpr 107
 }
108
}
109
}
110
\answer{1}{\Numero[1;];\Texte[1;];&nbsp;}{type=flashcard}{option=show noanalyzeprint}
111
\answer{2}{\Numero[2;];\Texte[2;];&nbsp;}{type=flashcard}{option=show noanalyzeprint}
112
\answer{3}{\Numero[3;];\Texte[3;];&nbsp;}{type=flashcard}{option=show noanalyzeprint}
113
\answer{4}{\Numero[4;];\Texte[4;];&nbsp;}{type=flashcard}{option=show noanalyzeprint}
114
\answer{5}{\Numero[5;];\Texte[5;];&nbsp;}{type=flashcard}{option=show noanalyzeprint}
115