There are no translations available

geometrie
 
Home arrow Forums
wimsedu le forum
Welcome, Guest
Please Login or Register.    Lost Password?
Bouton radio et calcul préalable (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Bouton radio et calcul préalable
#903
Aschieri (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Bouton radio et calcul préalable 14 Years, 10 Months ago Karma: 0  
Bonjour,

Tout nouveau sur ce forum dont on a m'a dit le plus grand bien et novice avec wims...

Je souhaiterais utiliser une réponse de type bouton radio mais dont le résultat vrai/fuax dépend d'un calcul préalable. En gros c'est comme l'exemple :

\text{ a = oui, non, pourquoi pas }
\text{ rep = 1,2 }
\statement{ Répondre oui ou pourquoi pas :
<center>\embed{ reply1 } </center> }
\answer{ }{ \rep;\a }{ type=checkbox }

mais avec un bouton radio et une variable det calculée précédemment qui conditionne la réponse. Pour ce faire j'utilise la commande :

\if{\det=0}{rep=1}{rep=2}

et en ayant au préalablement calculé det et initialisé rep de la façon suivante :

\integer{rep=1}

Le rendu montre que manifestement le if n'est pas bien traité.

Quelqu'un aurait-il une idée?

Cordialement,


Pierre A.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#905
bernadette (Admin)
Admin
Posts: 638
graph
User Online Now Click here to see the profile of this user
Re:Bouton radio et calcul préalable 14 Years, 10 Months ago Karma: 23  
Et si tu mettais au lieu de

Code:

\if{\det=0}{rep=1}{rep=2}
Code:

\if{\det=0}{\integer{rep=1}}{\integer{rep=2}}
ou encore
Code:

\integer{rep=\det=0? 1 : 2}
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#911
Aschieri (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:Bouton radio et calcul préalable 14 Years, 10 Months ago Karma: 0  
Super! Merci beaucoup, ça marche!
Mais je ne comprends pas vraiment pourquoi ...

P.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#914
bernadette (Admin)
Admin
Posts: 638
graph
User Online Now Click here to see the profile of this user
Re:Bouton radio et calcul préalable 14 Years, 10 Months ago Karma: 23  
Dans un exercice oef, tout doit être contenu dans
une commande \xxx{ }
Tout le reste est considéré comme un commentaire.

Quand on fait un test comme tu le faisais :

Code:

\if{\det=0{ t=1 }
t=1 n'est pas dans une commande \xxx{ }. Si cela avait été écrit dans \statement{ } il y aurait eu affiché à l'écran t=1 .
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#918
Aschieri (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:Bouton radio et calcul préalable 14 Years, 10 Months ago Karma: 0  
Ok, merci. Je crois que je n'ai pas encore complètement saisi la philosophie de wims, faut que je bosse un peu plus!

Pierre
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
© 2024 WimsEdu
Joomla! est un logiciel libre distribué sous licence GNU/GPL.