From 944e4ef2de21de9aad757d5156ac395b7917d87d Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 15 Apr 2021 09:44:39 +0200 Subject: [PATCH] Ajout ECTS (fichier config et tableaux) --- latex/pn_formation.tex | 4 ++-- latex/synthese/S1_coeffs_saes_ressources.tex | 11 +++++++++-- latex/synthese/S2_coeffs_saes_ressources.tex | 11 +++++++++-- python/config.py | 18 +++++++++++++++++- python/ressource.py | 14 ++++++++++++-- 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/latex/pn_formation.tex b/latex/pn_formation.tex index 54444e5..39e7505 100644 --- a/latex/pn_formation.tex +++ b/latex/pn_formation.tex @@ -267,7 +267,7 @@ Ces activités peuvent être élargies, avec une spécialisation vers : \scalebox{0.95}{\input{synthese/S1_acs_vs_saes_ressources.tex}} -\subsection{Volumes horaires et coefficients du semestre 1} +\subsection{Volumes horaires, coefficients et ECTS du semestre 1} \input{synthese/S1_coeffs_saes_ressources.tex} @@ -301,7 +301,7 @@ Ces activités peuvent être élargies, avec une spécialisation vers : \scalebox{0.95}{\input{synthese/S2_acs_vs_saes_ressources.tex}} -\subsection{Volumes horaires et coefficients du semestre 2} +\subsection{Volumes horaires, coefficients et ECTS du semestre 2} \input{synthese/S2_coeffs_saes_ressources.tex} diff --git a/latex/synthese/S1_coeffs_saes_ressources.tex b/latex/synthese/S1_coeffs_saes_ressources.tex index 2c9bc43..b6d0ffb 100644 --- a/latex/synthese/S1_coeffs_saes_ressources.tex +++ b/latex/synthese/S1_coeffs_saes_ressources.tex @@ -87,6 +87,13 @@ \hline \textcolor{ressourceC}{R115} & \begin{tabular}{p{5.7cm}}\tiny{Gestion de projet} \end{tabular} & 8h & 4h & & & 2 & 4\\ -\hline \hline \multicolumn{5}{|l}{\bfseries Total} +\hline \hline \multicolumn{5}{|l|}{\bfseries Total} \\ -\hline \multicolumn{2}{|r|}{\textit{SAÉs}} & \textit{11h} & \textit{36h} & \textit{80h} & \textit{49} & \textit{33} & \textit{42}\\ \hline \multicolumn{2}{|r|}{\textit{Ressources}} & \textit{177h} & \textit{216h} & \textit{0h} & \textit{73} & \textit{49} & \textit{54}\\ \hline \multicolumn{2}{|r|}{\bfseries SAÉs + Ressources} & {\bfseries 188h} & {\bfseries 252h} & {\bfseries 80h} & {\bfseries 122} & {\bfseries 82} & {\bfseries 96}\\ \hline\end{tabular} \ No newline at end of file +\hline \multicolumn{2}{|r|}{\textit{SAÉs}} & \textit{11h} & \textit{36h} & \textit{80h} & \textit{49} & \textit{33} & \textit{42}\\ \hline \multicolumn{2}{|r|}{\textit{Ressources}} & \textit{177h} & \textit{216h} & \textit{0h} & \textit{73} & \textit{49} & \textit{54}\\ \hline \multicolumn{2}{|r|}{\bfseries SAÉs + Ressources} & {\bfseries 188h} & {\bfseries 252h} & {\bfseries 80h} & {\bfseries 122} & {\bfseries 82} & {\bfseries 96}\\ \hline\multicolumn{5}{l}{~}\\ +\multicolumn{5}{l}{\bfseries Crédits ECTS}\\ +\hline +\multicolumn{5}{|l|}{} & RT1 & RT2 & \multicolumn{1}{c|}{RT3} \\ + \hline +\multicolumn{5}{|l|}{} & 12 & 8 & 10 \\ + \hline + \end{tabular} \ No newline at end of file diff --git a/latex/synthese/S2_coeffs_saes_ressources.tex b/latex/synthese/S2_coeffs_saes_ressources.tex index ad47b54..3f62612 100644 --- a/latex/synthese/S2_coeffs_saes_ressources.tex +++ b/latex/synthese/S2_coeffs_saes_ressources.tex @@ -78,6 +78,13 @@ \hline \textcolor{ressourceC}{R214} & \begin{tabular}{p{5.7cm}}\tiny{Analyse mathématique des signaux} \end{tabular} & 24h & 6h & & 3 & 8 & \\ -\hline \hline \multicolumn{5}{|l}{\bfseries Total} +\hline \hline \multicolumn{5}{|l|}{\bfseries Total} \\ -\hline \multicolumn{2}{|r|}{\textit{SAÉs}} & \textit{13h} & \textit{32h} & \textit{90h} & \textit{46} & \textit{38} & \textit{36}\\ \hline \multicolumn{2}{|r|}{\textit{Ressources}} & \textit{198h} & \textit{222h} & \textit{0h} & \textit{69} & \textit{57} & \textit{54}\\ \hline \multicolumn{2}{|r|}{\bfseries SAÉs + Ressources} & {\bfseries 211h} & {\bfseries 254h} & {\bfseries 90h} & {\bfseries 115} & {\bfseries 95} & {\bfseries 90}\\ \hline\end{tabular} \ No newline at end of file +\hline \multicolumn{2}{|r|}{\textit{SAÉs}} & \textit{13h} & \textit{32h} & \textit{90h} & \textit{46} & \textit{38} & \textit{36}\\ \hline \multicolumn{2}{|r|}{\textit{Ressources}} & \textit{198h} & \textit{222h} & \textit{0h} & \textit{69} & \textit{57} & \textit{54}\\ \hline \multicolumn{2}{|r|}{\bfseries SAÉs + Ressources} & {\bfseries 211h} & {\bfseries 254h} & {\bfseries 90h} & {\bfseries 115} & {\bfseries 95} & {\bfseries 90}\\ \hline\multicolumn{5}{l}{~}\\ +\multicolumn{5}{l}{\bfseries Crédits ECTS}\\ +\hline +\multicolumn{5}{|l|}{} & RT1 & RT2 & \multicolumn{1}{c|}{RT3} \\ + \hline +\multicolumn{5}{|l|}{} & 11 & 10 & 9 \\ + \hline + \end{tabular} \ No newline at end of file diff --git a/python/config.py b/python/config.py index 073ab5f..fdac1d1 100644 --- a/python/config.py +++ b/python/config.py @@ -1,8 +1,24 @@ -"""Configuration (chemins) +"""Configuration (chemins et données qui ne sont pas dans les documents) """ import os class Config(object): ROOT=".." + # ECTS des UE de chaque semestres + ECTS = { + 1 : { + "RT1" : 12, "RT2" : 8, "RT3" : 10, + }, + 2 : { + "RT1" : 11, "RT2" : 10, "RT3" : 9, + } + } + +# Safety check +for sem_id in Config.ECTS: + sum_ects_sem = sum( [ Config.ECTS[sem_id][ue] for ue in Config.ECTS[sem_id] ] ) + assert sum_ects_sem == 30 + + diff --git a/python/ressource.py b/python/ressource.py index df2e58f..89f7cc4 100644 --- a/python/ressource.py +++ b/python/ressource.py @@ -676,7 +676,7 @@ def to_latex_matrice_coeffs(matrice_vols, matrice_coeffs, saes, ressources, sem) comps = ["RT1", "RT2", "RT3"] lettresem = "A" if sem == "S1" else "B" - + sem_id = int(sem[1:]) saesem = saes[sem] # les saé du semestre ressem = ressources[sem] # les ressources du semestre @@ -778,7 +778,7 @@ def to_latex_matrice_coeffs(matrice_vols, matrice_coeffs, saes, ressources, sem) total_coeffs_ressources = get_total_coeffs_ressources(matrice_coeffs, sem) chaine += "\\hline " - chaine += "\multicolumn{%d}{|l}{\\bfseries Total}" % (nbre_colonnes) + "\n" + chaine += "\multicolumn{%d}{|l|}{\\bfseries Total}" % (nbre_colonnes) + "\n" chaine += "\\\\ \n" chaine += "\\hline " # sous-total SAE @@ -800,6 +800,16 @@ def to_latex_matrice_coeffs(matrice_vols, matrice_coeffs, saes, ressources, sem) for i in range(3): chaine += " & {\\bfseries " + str(total_coeffs[i]) + "}" chaine += "\\\\ \\hline" + + # ECTS + chaine += r"""\multicolumn{5}{l}{~}\\ +\multicolumn{5}{l}{\bfseries Crédits ECTS}\\ +\hline +\multicolumn{5}{|l|}{} & RT1 & RT2 & \multicolumn{1}{c|}{RT3} \\ + \hline +\multicolumn{5}{|l|}{} & %d & %d & %d \\ + \hline + """ % tuple(Config.ECTS[sem_id][ue] for ue in Config.ECTS[sem_id]) chaine += "\\end{tabular}" return chaine