Subversion Repositories wimsdev

Rev

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