Faire des qcm simplement - retour accueil
git clone git://bebou.netlib.re/qcm
Log | Files | Refs | README |
commit c05685556f0f8a381b32039ba2584dd7cc0742e4 parent ba5ceafb2a53f103e57b91fb7749dc7d82a3072a Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Fri, 21 Feb 2025 09:43:47 +0100 Je connais pas mon alphabet :'( Diffstat:
M | qcm.sh | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qcm.sh b/qcm.sh @@ -102,7 +102,7 @@ demander() { ( "ouverte" ) pattern=; qplotcmd="cat";; ( "regex" ) pattern="${options:-[ABCD] } "; qplotcmd="cat";; ( * ) - possibleanswers="ABCDEFGHIJQLMNOPQRSTUVWXYZ" + possibleanswers="ABCDEFGHIJKLMNOPQRSTUVWXYZ" [ -n "$options" ] && nbq=$(( $(echo "$options" | grep -o '~' | wc -l) + 1 )) echo "$possibleanswers" | grep -o '.' | head -n"$nbq" > "$tmpd/o" answers=$(< "$tmpd/o" tr -d '\n')