Skip to content
Snippets Groups Projects
Commit 7de91d78 authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

WIMS: peaufinage exercice guess output

parent aab32494
No related branches found
No related tags found
No related merge requests found
* Collections de programmes + randomisation + résultat
** Features
- [X] Code colorization
- [X] Code area just of the proper height
- [X] Selection of topic based on file prefix
- [ ] Output dans un textarea
`symtext` almost does the job but the comparison is not yet
configured properly:
1 2 4 8 mauvaise réponse, la bonne réponse est 1.
- [X] Output dans un textarea
- [ ] Why are empty lines on top and bottom of the text aread
- [ ] Randomization of the variable names
- [ ] Randomization of the output by substitution (preprocessing)
- [ ] Implement more logic in WIMS
......@@ -19,17 +17,6 @@
** Substitution des variables?
\text{code=\wims(replace internal resultat par \resultat)}
** Utiliser un textarea pour les entrées
Fonctionalite à rajouter à WIMS?
Il est possible de définir ses propres types d'entrées. Voir
public_html/scripts/anstype pour des exemples. En particulier
symtext. Voir la documentation; il doit y avoir des options pour ne
pas
État actuel:
* Choisir l'entrée pour que ...
* Écrire un programme qui ... par exemple pour n=5 ... copier coller le résultat ici
* Exercices existant: U1 / algo
......
......@@ -31,7 +31,9 @@ target=variable if loop function
\text{programs=wims(lookup TARGET in data/index)}
\text{program=randomitem(\programs)}
\text{code=wims(record 0 of data/\program)}
\text{output=wims(record 0 of data/\program.output)}
\text{output=wims(lines2words wims(record 0 of data/\program.output))}
\integer{height=wims(linecnt \code)+3}
\integer{heightpixels=10*\height}
\css{
<script type="text/javascript" src="scripts/js/edit_area/edit_area_full.js"></script>
......@@ -40,10 +42,11 @@ target=variable if loop function
id: "wims_show"
,start_highlight: true
,allow_toggle: false
,allow_resize: true
,language: "fr"
,syntax: "cpp"
,min_height: 400
,min_width: 400
,min_height: 200
,min_width: 300
,is_editable:false
,toolbar: ""
,show_line_colors: false
......@@ -55,15 +58,9 @@ target=variable if loop function
\statement{
<p>Quel affichage exact produit le programme C++ suivant?</p>
<p>Si l'affichage comporte plusieurs lignes, les donner les unes la
suite des autres, spares par des espaces.</p>
<p>Les espaces, tabulations et sauts de lignes dans la rponse sont considrs comme quivalents.</p>
\special{tabs2lines
<textarea id="wims_show" cols="100" rows="15" name="wims_show" readonly="readonly">
\code
</textarea>
<textarea id="wims_show" cols="80" rows="\height" name="wims_show" readonly="readonly">\special{tabs2lines \code}</textarea>
}
}
\answer{}{\output}{type=text}
\answer{}{\output}{type=symtext}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment