Subversion Repositories wimsdev

Rev

Rev 15703 | Blame | Compare with Previous | Last modification | View Log | RSS feed

type=order
textarea="instruction data1 data2 data3 data4 data5"
iEdit="instruction"

:Hacer una palabra con las letras
Se pueden ingresar hasta 5 listas de palabras.
Se toma una palabra al azar de cada lista cada vez. Una indicación
se puede poner para cada palabra.
<p><span class="wims_warning">$wims_name_warning</span>. Debes verificar
que otras palabras no son factibles con las mismas letras
o poner una indicación que permita diferenciar.
</p><p class="wims_credits">Autor del modelo: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a></p>

:%%%%%%%%%%%%%%%%%      ATENCIÓN      %%%%%%%%%%%%%%%%%%%%

Elimine la cabecera anterior si borra las etiquetas para el modelo!
(Son las líneas que comienzan con un ':'.)
En caso contrario el ejercicio puede no funcionar bajo Createxo.

:%%%%%%%% Parámetros del ejemplo a redefinir %%%%%%%%%%%%%%%%%

:\title{Mezcla de letras}
:\author{Bernadette, Perrin-Riou}
:\email{bpr@math.u-psud.fr}
:\credits{}

:Enunciado
\text{instruction= Formar una palabra con todas las letras dadas.}

:Número de palabras (máximo 5)
El número de palabras debe ser menor que 5 y menor que el número de listas
completado a continuación.
\integer{N=3}

:Primera lista de palabras
Coloque una palabra (o grupo de palabras) por línea, posiblemente seguida de una indicación. Si es
de un grupo de palabras, reemplace el espacio con  <span class="tt">_</span>.
\text{data1=canicas,un juego
dominó,un juego
damas,un juego}
:Segunda lista de palabras
\text{data2=niño
madre
padre}
:Tercera lista de palabras
\text{data3=casa
edificio
villa
habitación
}
:Cuarta lista de palabras
\text{data4=}
:Quinta lista de palabras
\text{data5=}

:%%%%%%%%%%%%%% Nada que modificar hasta el enunciado %%%%%%%%%%%%%%%%
\css{<style>
  .word_jumble{
    font-size:large;
    padding:6px;
    margin-left:10px;
    border: 1px solid #555;
  }</style>}

\matrix{data1=\data1}
\text{mot1=wims(nonempty items \data1[;1])}
\text{mot1=items(\mot1)>=2 ? shuffle(\mot1)}
\text{mot1=\mot1[1]}
\text{indication1=wims(select \data1 where column 1 issametext \mot1)}
\text{indication1=\indication1[2]}
\text{indication1=\indication1 issametext ? xxx}
\text{mot=\mot1}
\matrix{indication=\indication1}

\matrix{data2=\data2}
\text{mot2=wims(nonempty items \data2[;1])}
\text{mot2=items(\mot2)>=2 ? shuffle(\mot2)}
\text{mot2=\mot2[1]}
\if{\mot2!=}{
 \text{indication2=wims(select \data2 where column 1 issametext \mot2)}
 \text{indication2=\indication2[2]}
 \text{indication2=\indication2 issametext ? xxx}
 \text{mot=wims(append item \mot2 to \mot)}
 \matrix{indication=wims(append line \indication2 to \indication)}
}

\matrix{data3=\data3}
\text{mot3=wims(nonempty items \data3[;1])}
\text{mot3=items(\mot3)>=2 ? shuffle(\mot3)}
\text{mot3=\mot3[1]}
\if{\mot3!=}{
  \text{indication3=wims(select \data3 where column 1 issametext \mot3)}
  \text{indication3=\indication3[2]}
  \text{indication3=\indication3 issametext ? xxx}
  \text{mot=wims(append item \mot3 to \mot)}
  \matrix{indication=wims(append line \indication3 to \indication)}
}

\matrix{data4=\data4}
\text{mot4=wims(nonempty items \data4[;1])}
\text{mot4=items(\mot4)>=2 ? shuffle(\mot4)}
\text{mot4=\mot4[1]}
\if{\mot4!=}{
  \text{indication4=wims(select \data4 where column 1 issametext \mot4)}
  \text{indication4=\indication4[2]}
  \text{indication4=\indication4 issametext ? xxx}
  \text{mot=wims(append item \mot4 to \mot)}
  \matrix{indication=wims(append line \indication4 to \indication)}
}

\matrix{data5=\data5}
\text{mot5=wims(nonempty items \data5[;1])}
\text{mot5=items(\mot5)>=2 ? shuffle(\mot5)}
\text{mot5=\mot5[1]}
\if{\mot5!=}{
  \text{indication5=wims(select \data5 where column 1 issametext \mot5)}
  \text{indication5=\indication5[2]}
  \text{indication5=\indication5 issametext ? xxx}
  \text{mot=wims(append item \mot5 to \mot)}
  \matrix{indication=wims(append line \indication5 to \indication)}
}

\integer{N1=items(\mot)}
\text{bat=shuffle(\N1)}
\integer{N=min(\N1,\N)}

\text{mot=\mot[\bat]}
\matrix{indication=\indication[\bat;]}
\text{mot1=wims(text expand \mot[1] using 01)}
\text{mot1=wims(words2items \mot1)}
\text{mot1=wims(replace internal _ by &nbsp; in \mot1)}

\text{mot2=wims(text expand \mot[2] using 01)}
\text{mot2=wims(words2items \mot2)}
\text{mot2=wims(replace internal _ by &nbsp; in \mot2)}

\text{mot3=wims(text expand \mot[3] using 01)}
\text{mot3=wims(words2items \mot3)}
\text{mot3=wims(replace internal _ by &nbsp; in \mot3)}

\text{mot4=wims(text expand \mot[4] using 01)}
\text{mot4=wims(words2items \mot4)}
\text{mot4=wims(replace internal _ by &nbsp; in \mot4)}

\text{mot5=wims(text expand \mot[5] using 01)}
\text{mot5=wims(words2items \mot5)}
\text{mot5=wims(replace internal _ by &nbsp; in \mot5)}

\text{Mot=}
\text{STEP=wims(makelist r x for x=1 to \N)}
\text{STEP=r1}
\nextstep{\STEP}

\statement{
  \for{a=1 to \step-1}{
    \if{\a <= \N}{
    <div class="word_jumble">\Mot[\a;]
      \if{ \indication[\a;] notsametext xxx }{<em class="indication">(\indication[\a;])</em>}</div>
    }
  }
  \if{\step <= \N}{
    <div class="wims_question">\instruction</div>
    <div class="wimscenter">
      \embed{r \step,50 x 50}
      \if{ \indication[\step;] notsametext xxx }{
      <span class="indication">(\indication[\step;])</span> }
    </div>
  }
}
\answer{}{\mot1}{type=dragfill}{option=nonstop}
\answer{}{\mot2}{type=dragfill}{option=nonstop}
\answer{}{\mot3}{type=dragfill}{option=nonstop}
\answer{}{\mot4}{type=dragfill}{option=nonstop}
\answer{}{\mot5}{type=dragfill}{option=nonstop}

\text{Mot=\reply1
\reply2
\reply3
\reply4
\reply5}
\text{Mot=wims(replace , by in \Mot)}
\matrix{Mot=\Mot}
\text{STEP=\step <= \N ? r \step:}