2022-07-25 14:25:38 +00:00
|
|
|
#!/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" \
|
2022-07-26 15:36:17 +00:00
|
|
|
--menu "Choisir un niveau:" 0 0 5 \
|
2022-07-25 14:25:38 +00:00
|
|
|
"1" "2nd" \
|
2022-07-26 15:36:17 +00:00
|
|
|
"2" "SNT" \
|
|
|
|
"3" "Enseignements Scientifique" \
|
|
|
|
"4" "Première NSI" \
|
|
|
|
"5" "Première Technologique" \
|
2022-07-25 14:25:38 +00:00
|
|
|
2>&1 1>&3)
|
|
|
|
exec 3>&-
|
|
|
|
case $selection in
|
|
|
|
1 )
|
|
|
|
tribe="2nd"
|
|
|
|
;;
|
|
|
|
2 )
|
2022-07-26 15:36:17 +00:00
|
|
|
tribe="SNT"
|
2022-07-25 14:25:38 +00:00
|
|
|
;;
|
|
|
|
3 )
|
2022-07-26 15:36:17 +00:00
|
|
|
tribe="EnseignementsScientifique"
|
2022-07-25 14:25:38 +00:00
|
|
|
;;
|
|
|
|
4 )
|
2022-07-26 15:36:17 +00:00
|
|
|
tribe="1NSI"
|
|
|
|
;;
|
|
|
|
5 )
|
|
|
|
tribe="1ST"
|
2022-07-25 14:25:38 +00:00
|
|
|
;;
|
|
|
|
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
|
2022-08-21 07:46:04 +00:00
|
|
|
export date_short=`date --date="$date 00:00" "+%d %B %Y"`
|
2022-07-25 14:25:38 +00:00
|
|
|
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
|