Subversion Repositories wimsdev

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

% TOEF 1.0 type1
% This file is automatically generated. Do not edit by hand!
% Generated by WIMS-Createxo toef-generator.

% {
toef_varcnt=15
toef_var1=confia2qcm
toef_var2=Joachim YAMEOGO
toef_var3=yameogo@math.unice.fr
toef_var4=1
toef_var5=(Qui chante <br />"<span class="tt">femmes, je vous aime</span>"&#63;)¶(Qui a lancé le fameux <br />"<span class="tt">appel du 18 juin</span>"&#63;)¶(A qui appartenait le <br />"<span class="tt">rainbow warrior</span>"&#63;)¶(Quel est le nom du laboratoire <br /> de mathématiques de Nice&#63;)¶(<center>A quel mathématicien vous fait penser cette figure&#63;<br /> <img width="250" src="http://math.unice.fr/~yameogo/ensgmt/e_wims/demo_fig.gif" alt="dessin" /></center>)
toef_var6=America's cup¶Amnesty international¶Carla Bruni¶Jacques Chirac¶Julien Clerc¶Edith Cresson¶Charles De Gaulle¶Jean Alexandre Dieudonné¶Serge Gainsbourg¶Greenpeace¶Alexandre Grothendieck¶Johnny Halliday¶Lionel Jospin¶Alain Jupé¶François Mitterand¶La marine néo-zélandaise¶Pythagore¶Margaret Tatcher¶<font color="magenta"><b> Choix vide </b></font>
toef_var7=5¶7¶10¶8¶17
toef_var8=2
toef_var9=
toef_var10=
toef_var11=
toef_var12=random(2..18)
toef_var13=<table class="wimscenter" bgcolor="lightblue" width="75%">¶  <tr>¶    <td>¶      Répondez à la question suivante ¶      <br />¶      <p style="background-color:moccasin">¶        en cochant la bonne réponse dans la liste proposée. ¶      </p>¶    </td>¶  </tr>¶   <tr>¶     <td>  </td>¶  </tr>¶  <tr>¶    <td bgcolor="white">¶      \obj      ¶    </td>¶  </tr>¶</table>
toef_var14=radio
toef_var15=(1,Il chante aussi "<span class="tt">la fille aux bas nylon</span>".)¶(1,Il avait le grade de général.)¶(1,Ecologiste.)¶(1,Compagnon de Bourbaki.)¶(1,\(a^2+b^2=c^2))
!exit
% }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% END  OF  TOEF HEADER %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% The following is OEF %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

## identifiants de l'exercice: titre, auteur, format 
\title{
confia2qcm
}
\author{
Joachim YAMEOGO
}
\email{
yameogo@math.unice.fr
}
\langage{fr}
\format{html}

## type qcm de l'exo
\integer{
exo=
1
}

## la liste des questions
\matrix{
obsList=
wims(replace internal ? by &#63; in (Qui chante <br />"<span class="tt">femmes, je vous aime</span>"?)
(Qui a lancé le fameux <br />"<span class="tt">appel du 18 juin</span>"?)
(A qui appartenait le <br />"<span class="tt">rainbow warrior</span>"?)
(Quel est le nom du laboratoire <br /> de mathématiques de Nice?)
(<center>A quel mathématicien vous fait penser cette figure?<br /> <img width="250" src="http://math.unice.fr/~yameogo/ensgmt/e_wims/demo_fig.gif" alt="dessin" /></center>))
}
\integer{obsnb=wims(rowcnt \obsList)}

## la liste des réponses éventuelles
\matrix{
propsList=
wims(replace internal ? by &#63; in America's cup
Amnesty international
Carla Bruni
Jacques Chirac
Julien Clerc
Edith Cresson
Charles De Gaulle
Jean Alexandre Dieudonné
Serge Gainsbourg
Greenpeace
Alexandre Grothendieck
Johnny Halliday
Lionel Jospin
Alain Jupé
François Mitterand
La marine néo-zélandaise
Pythagore
Margaret Tatcher
<font color="magenta"><b> Choix vide </b></font>)
}
\integer{propsnb=wims(rowcnt \propsList)-1}

## liste des bonnes réponses par question
\matrix{
propsrepList=
wims(replace internal ? by &#63; in 5
7
10
8
17)
}

## les indications
\matrix{
indicList=
wims(replace internal ? by &#63; in (1,Il chante aussi "<span class="tt">la fille aux bas nylon</span>".)
(1,Il avait le grade de général.)
(1,Ecologiste.)
(1,Compagnon de Bourbaki.)
(1,\(a^2+b^2=c^2)))
}

## nombre de possibilités à afficher
\integer{
ckchnb=
2
}
\integer{
fixchnb=

}
\integer{
borng=

}
\integer{
bornd=

}
\integer{
chnb=
random(2..18)
}

## couleurs de fond
\text{bg=lavender,lemonchiffon,azure}

## nombre de lignes pour l'affichage de 2 colonnes de la liste des propriétés
\integer{rowsnb=floor((\chnb+1)/2)}
\integer{extrarow=((\chnb+1)%2)}

## choix aléatoire d'une question
\integer{objn=random(1..\obsnb)}
\text{obj=wims(trim \obsList[\objn;])}
\text{obj=wims(char 2 to -2 of \obj)}

## la bonne réponse initiale
\text{props=\propsrepList[\objn;]}

## génération de la liste des réponses à afficher
\text{pafnbs=shuffle(\propsnb)}
\text{pafnbs=wims(item 1 to \chnb of \pafnbs)}
## text{pafnbs=wims(sort numeric item \pafnbs)}
\integer{nbp=\propsnb+1}
\text{pafnbs=wims(append item \nbp to \pafnbs)}

\text{paf=}
\for{i in \pafnbs}{
\text{paf=wims(append line \propsList[\i;] to \paf)}
}
\matrix{paf=\paf}

\integer{chnbp=\chnb+1}
\text{propsorder=wims(values i for i=1 to \chnbp)}

## ce qu'il faudra choisir pour avoir juste
\text{brep=wims(listintersect \props and \pafnbs)}
\integer{brepnb=wims(itemcnt \brep)}

\if{\brepnb=0}{
\text{ansrep=\chnbp}}{
\text{ansrep=}
\for{i in \brep}{
\text{situ=position(\i,\pafnbs)}
\text{ansrep=wims(append item \situ to \ansrep)}
}
}
\text{ansrep=wims(sort numeric item \ansrep)}
\text{rep=Les réponses à la question \obj}

## numérotation des éléments des colonnes
\text{c1=wims(values i for i=1 to \rowsnb)}
\text{c2=wims(values \rowsnb+i for i=1 to \rowsnb)}

## énoncé saisi en ligne
\text{
enonceR=
<table class="wimscenter" bgcolor="lightblue" width="75%">
  <tr>
    <td>
      Répondez à la question suivante 
      <br />
      <p style="background-color:moccasin">
        en cochant la bonne réponse dans la liste proposée. 
      </p>
    </td>
  </tr>
   <tr>
     <td>  </td>
  </tr>
  <tr>
    <td bgcolor="white">
      \obj      
    </td>
  </tr>
</table>
}

## détection de l'indication
\text{com=wims(trim \indicList[\objn;])}
\text{com=wims(char 4 to -2 of \com)}
\text{com=wims(trim \com)}
\integer{comN=wims(charcnt \com)}

## ici on donne l'énoncé de l'exercice
\statement{
\enonceR
<br />
<br />
<center>
  <table bgcolor=darkcyan>
    \for{k=1 to \rowsnb}{
    <tr>
      <td bgcolor=\bg[(2*\k-1)%3+1] align="left">
        <table>
          <tr>
            <td bgcolor=sandybrown>
              \embed{reply 1,\c1[\k]} 
            </td>
            <td>
             \paf[\k;]
            </td>
          </tr>
        </table>
      </td>
      <td bgcolor=\bg[(2*\k)%3+1] align="left">
        <table>
          <tr>
            <td bgcolor=sandybrown>
              \embed{reply 1,\c2[\k]} 
            </td>
            <td>
             \paf[(\k+\rowsnb);]
            </td>
          </tr>
        </table>
      </td>
    </tr>
    }
    \if{\extrarow<>0}{
    <tr>
      <td align="center" bgcolor=\bg[\chnbp%3+1] colspan="2">
        <table>
          <tr>
            <td bgcolor=sandybrown>
              \embed{reply 1,\chnbp} 
            </td>
            <td align="center"> 
              \paf[\chnbp;]
            </td>
          </tr>
        </table>
      </td>
    </tr>
    }
  </table>
</center>
}

## champ de soumission et analyse de la réponse
\reply{\rep}{\ansrep;\propsorder}{type=radio}

## indications éventuelles
\hint{
  <div style="background-color:moccasin;width:80%"> 
  \if{\comN>1}{
      \com
      }{
      <font color=magenta><span class="tt">désolé: il n' y a pas d'indication.</span></font> 
      }
  </div>
}

Generated by GNU Enscript 1.6.5.90.