Feat: commande pour makefile pour faire des évaluations
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bertrand Benjamin 2021-09-16 10:48:52 +02:00
parent fe75d15516
commit 7198ed0d79
4 changed files with 103 additions and 0 deletions

View File

@ -24,6 +24,9 @@ clean:
sequence:
sh ./tools/scripts/new_sequence.sh
eval:
sh ./tools/scripts/new_eval.sh
rsync_cleUSB: clean
rsync -rtv -u --del --exclude "venv" ./ $(COMMON_EXCLUDE) /run/media/lafrite/$(CLEUSB)/Enseignements
rsync -rtv -u $(COMMON_EXCLUDE) ../Divers/ /run/media/lafrite/$(CLEUSB)/Divers

66
tools/scripts/new_eval.sh Normal file
View File

@ -0,0 +1,66 @@
#!/bin/bash
display_result() {
dialog --title "$1" \
--no-collapse \
--msgbox "$result" 0 0
}
exec 3>&1
selection=$(dialog \
--backtitle "Création d'une nouvelle évaluation: Classe" \
--title "Menu" \
--clear \
--cancel-label "Exit" \
--menu "Choisir un niveau:" 0 0 4 \
"1" "2nd" \
"2" "Enseignements Scientifique" \
"3" "4e" \
"4" "Technologique" \
2>&1 1>&3)
exec 3>&-
case $selection in
1 )
tribe="2nd"
;;
2 )
tribe="EnseignementsScientifique"
;;
3 )
tribe="4e"
;;
4 )
tribe="Technologique"
;;
esac
exec 3>&1
date=$(dialog --calendar "Date" 0 0 2>&1 1>&3 | awk -F "/" '{print $3"-"$2"-"$1}')
exec 3>&-
exec 3>&1
name=$(dialog \
--inputbox "Nom de l'évaluation" \
0 0 \
2>&1 1>&3)
exec 3>&-
exec 3>&1
duration=$(dialog \
--inputbox "Temps pour le travailler" \
0 0 \
2>&1 1>&3)
exec 3>&-
mkdir -p $tribe/Evaluations/
sequence_path=$tribe/Evaluations/DS_${date}/
mkdir -p $sequence_path
export name=$name
export date=$date
export tribe=$tribe
export duration=$duration
envsubst < ./tools/skeleton/eval/exercises.tex > $sequence_path/exercises.tex
envsubst < ./tools/skeleton/eval/sujet.tex > $sequence_path/sujet.tex

View File

@ -0,0 +1,7 @@
\begin{exercise}[subtitle={<++>}, step={1}, origin={<++>}, topics={ ${title} }, tags={ ${tags} }]
<++>
\end{exercise}
\begin{solution}
<++>
\end{solution}

View File

@ -0,0 +1,27 @@
\documentclass[a4paper,12pt]{article}
\usepackage{myXsim}
% Title Page
\title{ ${name} \hfill ${subname}}
\tribe{${tribe}}
\date{${date}}
\duree{${duration}}
\DeclareExerciseCollection[step=1]{banque}
\xsimsetup{collect}
\begin{document}
\maketitle
Le barème est donné à titre indicatif, il pourra être modifié.
\input{exercises.tex}
\printcollection{banque}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "master"
%%% End: