Subversion Repositories wimsdev

Rev

Rev 13476 | Rev 13716 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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