diff --git a/app/comp/bonus_spo.py b/app/comp/bonus_spo.py index 99738336ee..d1c3ddcab7 100644 --- a/app/comp/bonus_spo.py +++ b/app/comp/bonus_spo.py @@ -198,7 +198,10 @@ class BonusSportAdditif(BonusSport): à la moyenne générale du semestre déjà obtenue par l'étudiant. """ - seuil_moy_gen = 10.0 # seuls les points au dessus du seuil sont comptés + seuil_moy_gen = 10.0 # seuls les bonus au dessus du seuil sont pris en compte + seuil_comptage = ( + None # les points au dessus du seuil sont comptés (defaut: seuil_moy_gen) + ) proportion_point = 0.05 # multiplie les points au dessus du seuil def compute_bonus(self, sem_modimpl_moys_inscrits, modimpl_coefs_etuds_no_nan): @@ -211,11 +214,13 @@ class BonusSportAdditif(BonusSport): if 0 in sem_modimpl_moys_inscrits.shape: # pas d'étudiants ou pas d'UE ou pas de module... return + seuil_comptage = ( + self.seuil_moy_gen if self.seuil_comptage is None else self.seuil_comptage + ) bonus_moy_arr = np.sum( np.where( sem_modimpl_moys_inscrits > self.seuil_moy_gen, - (sem_modimpl_moys_inscrits - self.seuil_moy_gen) - * self.proportion_point, + (sem_modimpl_moys_inscrits - seuil_comptage) * self.proportion_point, 0.0, ), axis=1, @@ -338,9 +343,12 @@ class BonusAisneStQuentin(BonusSportAdditif): # pas d'étudiants ou pas d'UE ou pas de module... return # Calcule moyenne pondérée des notes de sport: - bonus_moy_arr = np.sum( - sem_modimpl_moys_inscrits * modimpl_coefs_etuds_no_nan, axis=1 - ) / np.sum(modimpl_coefs_etuds_no_nan, axis=1) + with np.errstate(invalid="ignore"): # ignore les 0/0 (-> NaN) + bonus_moy_arr = np.sum( + sem_modimpl_moys_inscrits * modimpl_coefs_etuds_no_nan, axis=1 + ) / np.sum(modimpl_coefs_etuds_no_nan, axis=1) + np.nan_to_num(bonus_moy_arr, nan=0.0, copy=False) + bonus_moy_arr[bonus_moy_arr < 10.0] = 0.0 bonus_moy_arr[bonus_moy_arr >= 18.1] = 0.5 bonus_moy_arr[bonus_moy_arr >= 16.1] = 0.4 @@ -604,8 +612,9 @@ class BonusLaRochelle(BonusSportAdditif): name = "bonus_iutlr" displayed_name = "IUT de La Rochelle" - seuil_moy_gen = 10.0 # tous les points sont comptés - proportion_point = 0.01 + seuil_moy_gen = 10.0 # si bonus > 10, + seuil_comptage = 0.0 # tous les points sont comptés + proportion_point = 0.01 # 1% class BonusLeHavre(BonusSportMultiplicatif): @@ -823,9 +832,11 @@ class BonusVilleAvray(BonusSport): # pas d'étudiants ou pas d'UE ou pas de module... return # Calcule moyenne pondérée des notes de sport: - bonus_moy_arr = np.sum( - sem_modimpl_moys_inscrits * modimpl_coefs_etuds_no_nan, axis=1 - ) / np.sum(modimpl_coefs_etuds_no_nan, axis=1) + with np.errstate(invalid="ignore"): # ignore les 0/0 (-> NaN) + bonus_moy_arr = np.sum( + sem_modimpl_moys_inscrits * modimpl_coefs_etuds_no_nan, axis=1 + ) / np.sum(modimpl_coefs_etuds_no_nan, axis=1) + np.nan_to_num(bonus_moy_arr, nan=0.0, copy=False) bonus_moy_arr[bonus_moy_arr < 10.0] = 0.0 bonus_moy_arr[bonus_moy_arr >= 16.0] = 0.3 bonus_moy_arr[bonus_moy_arr >= 12.0] = 0.2 diff --git a/app/comp/moy_mat.py b/app/comp/moy_mat.py index e5ba903c26..0a7522637c 100644 --- a/app/comp/moy_mat.py +++ b/app/comp/moy_mat.py @@ -40,13 +40,11 @@ def compute_mat_moys_classic( modimpl_mask = np.array( [m.module.matiere.id == matiere_id for m in formsemestre.modimpls_sorted] ) - etud_moy_gen, _, _ = moy_ue.compute_ue_moys_classic( - formsemestre, + etud_moy_mat = moy_ue.compute_mat_moys_classic( sem_matrix=sem_matrix, - ues=ues, modimpl_inscr_df=modimpl_inscr_df, modimpl_coefs=modimpl_coefs, modimpl_mask=modimpl_mask, ) - matiere_moy[matiere_id] = etud_moy_gen + matiere_moy[matiere_id] = etud_moy_mat return matiere_moy diff --git a/app/comp/moy_ue.py b/app/comp/moy_ue.py index 563fb3b1d0..efbe7cd349 100644 --- a/app/comp/moy_ue.py +++ b/app/comp/moy_ue.py @@ -294,7 +294,8 @@ def compute_ue_moys_classic( modimpl_coefs: np.array, modimpl_mask: np.array, ) -> tuple[pd.Series, pd.DataFrame, pd.DataFrame]: - """Calcul de la moyenne d'UE en mode classique. + """Calcul de la moyenne d'UE et de la moy. générale en mode classique (DUT, LMD, ...). + La moyenne d'UE est un nombre (note/20), ou NI ou NA ou ERR NI non inscrit à (au moins un) module de cette UE NA pas de notes disponibles @@ -363,7 +364,7 @@ def compute_ue_moys_classic( modimpl_coefs_etuds_no_nan_stacked = np.stack( [modimpl_coefs_etuds_no_nan.T] * nb_ues ) - # nb_ue x nb_etuds x nb_mods : coefs prenant en compte NaN et inscriptions + # nb_ue x nb_etuds x nb_mods : coefs prenant en compte NaN et inscriptions: coefs = (modimpl_coefs_etuds_no_nan_stacked * ue_modules).swapaxes(1, 2) if coefs.dtype == np.object: # arrive sur des tableaux vides coefs = coefs.astype(np.float) @@ -408,6 +409,68 @@ def compute_ue_moys_classic( return etud_moy_gen_s, etud_moy_ue_df, etud_coef_ue_df +def compute_mat_moys_classic( + sem_matrix: np.array, + modimpl_inscr_df: pd.DataFrame, + modimpl_coefs: np.array, + modimpl_mask: np.array, +) -> pd.Series: + """Calcul de la moyenne sur un sous-enemble de modules en formation CLASSIQUE + + La moyenne est un nombre (note/20 ou NaN. + + Le masque modimpl_mask est un tableau de booléens (un par modimpl) qui + permet de sélectionner un sous-ensemble de modules (ceux de la matière d'intérêt). + + sem_matrix: notes moyennes aux modules (tous les étuds x tous les modimpls) + ndarray (etuds x modimpls) + (floats avec des NaN) + etuds : listes des étudiants (dim. 0 de la matrice) + modimpl_inscr_df: matrice d'inscription du semestre (etud x modimpl) + modimpl_coefs: vecteur des coefficients de modules + modimpl_mask: masque des modimpls à prendre en compte + + Résultat: + - moyennes: pd.Series, index etudid + """ + if (not len(modimpl_mask)) or ( + sem_matrix.shape[0] == 0 + ): # aucun module ou aucun étudiant + # etud_moy_gen_s, etud_moy_ue_df, etud_coef_ue_df + return pd.Series( + [0.0] * len(modimpl_inscr_df.index), index=modimpl_inscr_df.index + ) + # Restreint aux modules sélectionnés: + sem_matrix = sem_matrix[:, modimpl_mask] + modimpl_inscr = modimpl_inscr_df.values[:, modimpl_mask] + modimpl_coefs = modimpl_coefs[modimpl_mask] + + nb_etuds, nb_modules = sem_matrix.shape + assert len(modimpl_coefs) == nb_modules + + # Enlève les NaN du numérateur: + sem_matrix_no_nan = np.nan_to_num(sem_matrix, nan=0.0) + # Ne prend pas en compte les notes des étudiants non inscrits au module: + # Annule les notes: + sem_matrix_inscrits = np.where(modimpl_inscr, sem_matrix_no_nan, 0.0) + # Annule les coefs des modules où l'étudiant n'est pas inscrit: + modimpl_coefs_etuds = np.where( + modimpl_inscr, np.stack([modimpl_coefs.T] * nb_etuds), 0.0 + ) + # Annule les coefs des modules NaN (nb_etuds x nb_mods) + modimpl_coefs_etuds_no_nan = np.where( + np.isnan(sem_matrix), 0.0, modimpl_coefs_etuds + ) + if modimpl_coefs_etuds_no_nan.dtype == np.object: # arrive sur des tableaux vides + modimpl_coefs_etuds_no_nan = modimpl_coefs_etuds_no_nan.astype(np.float) + + etud_moy_mat = (modimpl_coefs_etuds_no_nan * sem_matrix_inscrits).sum( + axis=1 + ) / modimpl_coefs_etuds_no_nan.sum(axis=1) + + return pd.Series(etud_moy_mat, index=modimpl_inscr_df.index) + + def compute_malus( formsemestre: FormSemestre, sem_modimpl_moys: np.array, diff --git a/app/comp/res_sem.py b/app/comp/res_sem.py index 607ad16811..e27a157c1a 100644 --- a/app/comp/res_sem.py +++ b/app/comp/res_sem.py @@ -8,11 +8,13 @@ """ from flask import g +from app import db from app.comp.jury import ValidationsSemestre from app.comp.res_common import ResultatsSemestre from app.comp.res_classic import ResultatsSemestreClassic from app.comp.res_but import ResultatsSemestreBUT from app.models.formsemestre import FormSemestre +from app.scodoc import sco_cache def load_formsemestre_results(formsemestre: FormSemestre) -> ResultatsSemestre: @@ -23,6 +25,13 @@ def load_formsemestre_results(formsemestre: FormSemestre) -> ResultatsSemestre: Search in local cache (g.formsemestre_result_cache) If not in cache, build it and cache it. """ + is_apc = formsemestre.formation.is_apc() + if is_apc and formsemestre.semestre_id == -1: + formsemestre.semestre_id = 1 + db.session.add(formsemestre) + db.session.commit() + sco_cache.invalidate_formsemestre(formsemestre.id) + # --- Try local cache (within the same request context) if not hasattr(g, "formsemestre_results_cache"): g.formsemestre_results_cache = {} @@ -30,11 +39,7 @@ def load_formsemestre_results(formsemestre: FormSemestre) -> ResultatsSemestre: if formsemestre.id in g.formsemestre_results_cache: return g.formsemestre_results_cache[formsemestre.id] - klass = ( - ResultatsSemestreBUT - if formsemestre.formation.is_apc() - else ResultatsSemestreClassic - ) + klass = ResultatsSemestreBUT if is_apc else ResultatsSemestreClassic g.formsemestre_results_cache[formsemestre.id] = klass(formsemestre) return g.formsemestre_results_cache[formsemestre.id] diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 1ae0a5a8bb..c66df78209 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -207,7 +207,11 @@ class FormSemestre(db.Model): modimpls = self.modimpls.all() if self.formation.is_apc(): modimpls.sort( - key=lambda m: (m.module.module_type, m.module.numero, m.module.code) + key=lambda m: ( + m.module.module_type or 0, + m.module.numero or 0, + m.module.code or 0, + ) ) else: modimpls.sort( diff --git a/app/pe/pe_view.py b/app/pe/pe_view.py index 5a98d375fb..5af1a57549 100644 --- a/app/pe/pe_view.py +++ b/app/pe/pe_view.py @@ -36,6 +36,7 @@ """ from flask import send_file, request +from app.scodoc.sco_exceptions import ScoValueError import app.scodoc.sco_utils as scu from app.scodoc import sco_formsemestre @@ -97,8 +98,12 @@ def pe_view_sem_recap( template_latex = "" # template fourni via le formulaire Web if avis_tmpl_file: - template_latex = avis_tmpl_file.read().decode('utf-8') - template_latex = template_latex + try: + template_latex = avis_tmpl_file.read().decode("utf-8") + except UnicodeDecodeError as e: + raise ScoValueError( + "Données (template) invalides (caractères non UTF8 ?)" + ) from e else: # template indiqué dans préférences ScoDoc ? template_latex = pe_avislatex.get_code_latex_from_scodoc_preference( @@ -114,7 +119,7 @@ def pe_view_sem_recap( footer_latex = "" # template fourni via le formulaire Web if footer_tmpl_file: - footer_latex = footer_tmpl_file.read().decode('utf-8') + footer_latex = footer_tmpl_file.read().decode("utf-8") footer_latex = footer_latex else: footer_latex = pe_avislatex.get_code_latex_from_scodoc_preference( diff --git a/app/scodoc/sco_bulletins.py b/app/scodoc/sco_bulletins.py index c7a75ea498..6db18f9121 100644 --- a/app/scodoc/sco_bulletins.py +++ b/app/scodoc/sco_bulletins.py @@ -300,9 +300,7 @@ def formsemestre_bulletinetud_dict(formsemestre_id, etudid, version="long"): if ue_status["coef_ue"] != None: u["coef_ue_txt"] = scu.fmt_coef(ue_status["coef_ue"]) else: - # C'est un bug: - log("u=" + pprint.pformat(u)) - raise Exception("invalid None coef for ue") + u["coef_ue_txt"] = "-" if ( dpv diff --git a/app/scodoc/sco_cache.py b/app/scodoc/sco_cache.py index 5fd0cec686..6330849c5e 100644 --- a/app/scodoc/sco_cache.py +++ b/app/scodoc/sco_cache.py @@ -33,17 +33,12 @@ """ -# API ScoDoc8 pour les caches: -# sco_cache.NotesTableCache.get( formsemestre_id) -# => sco_cache.NotesTableCache.get(formsemestre_id) +# API pour les caches: +# sco_cache.MyCache.get( formsemestre_id) +# => sco_cache.MyCache.get(formsemestre_id) # -# sco_core.inval_cache(formsemestre_id=None, pdfonly=False, formsemestre_id_list=None) -# => deprecated, NotesTableCache.invalidate_formsemestre(formsemestre_id=None, pdfonly=False) -# -# -# Nouvelles fonctions: -# sco_cache.NotesTableCache.delete(formsemestre_id) -# sco_cache.NotesTableCache.delete_many(formsemestre_id_list) +# sco_cache.MyCache.delete(formsemestre_id) +# sco_cache.MyCache.delete_many(formsemestre_id_list) # # Bulletins PDF: # sco_cache.SemBulletinsPDFCache.get(formsemestre_id, version) @@ -203,49 +198,6 @@ class SemInscriptionsCache(ScoDocCache): duration = 12 * 60 * 60 # ttl 12h -class NotesTableCache(ScoDocCache): - """Cache pour les NotesTable - Clé: formsemestre_id - Valeur: NotesTable instance - """ - - prefix = "NT" - - @classmethod - def get(cls, formsemestre_id, compute=True): - """Returns NotesTable for this formsemestre - Search in local cache (g.nt_cache) or global app cache (eg REDIS) - If not in cache: - If compute is True, build it and cache it - Else return None - """ - # try local cache (same request) - if not hasattr(g, "nt_cache"): - g.nt_cache = {} - else: - if formsemestre_id in g.nt_cache: - return g.nt_cache[formsemestre_id] - # try REDIS - key = cls._get_key(formsemestre_id) - nt = CACHE.get(key) - if nt: - g.nt_cache[formsemestre_id] = nt # cache locally (same request) - return nt - if not compute: - return None - # Recompute requested table: - from app.scodoc import notes_table - - t0 = time.time() - nt = notes_table.NotesTable(formsemestre_id) - t1 = time.time() - _ = cls.set(formsemestre_id, nt) # cache in REDIS - t2 = time.time() - log(f"cached formsemestre_id={formsemestre_id} ({(t1-t0):g}s +{(t2-t1):g}s)") - g.nt_cache[formsemestre_id] = nt - return nt - - def invalidate_formsemestre( # was inval_cache(formsemestre_id=None, pdfonly=False) formsemestre_id=None, pdfonly=False ): @@ -278,22 +230,24 @@ def invalidate_formsemestre( # was inval_cache(formsemestre_id=None, pdfonly=Fa if not pdfonly: # Delete cached notes and evaluations - NotesTableCache.delete_many(formsemestre_ids) if formsemestre_id: for fid in formsemestre_ids: EvaluationCache.invalidate_sem(fid) - if hasattr(g, "nt_cache") and fid in g.nt_cache: - del g.nt_cache[fid] + if ( + hasattr(g, "formsemestre_results_cache") + and fid in g.formsemestre_results_cache + ): + del g.formsemestre_results_cache[fid] + else: # optimization when we invalidate all evaluations: EvaluationCache.invalidate_all_sems() - if hasattr(g, "nt_cache"): - del g.nt_cache + if hasattr(g, "formsemestre_results_cache"): + del g.formsemestre_results_cache SemInscriptionsCache.delete_many(formsemestre_ids) - + ResultatsSemestreCache.delete_many(formsemestre_ids) + ValidationsSemestreCache.delete_many(formsemestre_ids) SemBulletinsPDFCache.invalidate_sems(formsemestre_ids) - ResultatsSemestreCache.delete_many(formsemestre_ids) - ValidationsSemestreCache.delete_many(formsemestre_ids) class DefferedSemCacheManager: diff --git a/app/scodoc/sco_dump_db.py b/app/scodoc/sco_dump_db.py index f9521b2923..4b55b41f63 100644 --- a/app/scodoc/sco_dump_db.py +++ b/app/scodoc/sco_dump_db.py @@ -51,6 +51,7 @@ import fcntl import subprocess import requests +from flask import flash from flask_login import current_user import app.scodoc.notesdb as ndb @@ -124,6 +125,7 @@ def sco_dump_and_send_db(): fcntl.flock(x, fcntl.LOCK_UN) log("sco_dump_and_send_db: done.") + flash("Données envoyées au serveur d'assistance") return "\n".join(H) + html_sco_header.sco_footer() diff --git a/app/scodoc/sco_edit_apc.py b/app/scodoc/sco_edit_apc.py index c6b0151d69..cec8b7c2a1 100644 --- a/app/scodoc/sco_edit_apc.py +++ b/app/scodoc/sco_edit_apc.py @@ -52,6 +52,7 @@ def html_edit_formation_apc( """ parcours = formation.get_parcours() assert parcours.APC_SAE + ressources = formation.modules.filter_by(module_type=ModuleType.RESSOURCE).order_by( Module.semestre_id, Module.numero, Module.code ) @@ -68,6 +69,19 @@ def html_edit_formation_apc( ).order_by( Module.semestre_id, Module.module_type.desc(), Module.numero, Module.code ) + + ues_by_sem = {} + ects_by_sem = {} + for semestre_idx in semestre_ids: + ues_by_sem[semestre_idx] = formation.ues.filter_by( + semestre_idx=semestre_idx + ).order_by(UniteEns.semestre_idx, UniteEns.numero, UniteEns.acronyme) + ects = [ue.ects for ue in ues_by_sem[semestre_idx]] + if None in ects: + ects_by_sem[semestre_idx] = 'manquant' + else: + ects_by_sem[semestre_idx] = sum(ects) + arrow_up, arrow_down, arrow_none = sco_groups.get_arrow_icons_tags() icons = { @@ -93,7 +107,8 @@ def html_edit_formation_apc( editable=editable, tag_editable=tag_editable, icons=icons, - UniteEns=UniteEns, + ues_by_sem=ues_by_sem, + ects_by_sem=ects_by_sem, ), ] for semestre_idx in semestre_ids: diff --git a/app/scodoc/sco_edit_module.py b/app/scodoc/sco_edit_module.py index c9e2ffe0f3..3068ee3974 100644 --- a/app/scodoc/sco_edit_module.py +++ b/app/scodoc/sco_edit_module.py @@ -562,7 +562,7 @@ def module_edit(module_id=None): "code", { "size": 10, - "explanation": "code du module (doit être unique dans la formation)", + "explanation": "code du module (issu du programme, exemple M1203 ou R2.01. Doit être unique dans la formation)", "allow_null": False, "validator": lambda val, field, formation_id=formation_id: check_module_code_unicity( val, field, formation_id, module_id=module_id @@ -701,7 +701,10 @@ def module_edit(module_id=None): { "title": "Code Apogée", "size": 25, - "explanation": "(optionnel) code élément pédagogique Apogée ou liste de codes ELP séparés par des virgules", + "explanation": """(optionnel) code élément pédagogique Apogée ou liste de codes ELP + séparés par des virgules (ce code est propre à chaque établissement, se rapprocher + du référent Apogée). + """, "validator": lambda val, _: len(val) < APO_CODE_STR_LEN, }, ), diff --git a/app/scodoc/sco_edit_ue.py b/app/scodoc/sco_edit_ue.py index ce2c67b7e5..8f18a5b2c1 100644 --- a/app/scodoc/sco_edit_ue.py +++ b/app/scodoc/sco_edit_ue.py @@ -305,7 +305,7 @@ def ue_edit(ue_id=None, create=False, formation_id=None, default_semestre_idx=No ( "numero", { - "size": 2, + "size": 4, "explanation": "numéro (1,2,3,4) de l'UE pour l'ordre d'affichage", "type": "int", }, @@ -722,16 +722,16 @@ du programme" (menu "Semestre") si vous avez un semestre en cours); {formation.referentiel_competence.type_titre} {formation.referentiel_competence.specialite_long} - """ +  """ msg_refcomp = "changer" H.append( f""" ", ] ) diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index b3d99ac3e9..196c2c2101 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -645,21 +645,30 @@ class ScoDocJSONEncoder(json.JSONEncoder): return json.JSONEncoder.default(self, o) -def sendJSON(data, attached=False): +def sendJSON(data, attached=False, filename=None): js = json.dumps(data, indent=1, cls=ScoDocJSONEncoder) return send_file( - js, filename="sco_data.json", mime=JSON_MIMETYPE, attached=attached + js, filename=filename or "sco_data.json", mime=JSON_MIMETYPE, attached=attached ) -def sendXML(data, tagname=None, force_outer_xml_tag=True, attached=False, quote=True): +def sendXML( + data, + tagname=None, + force_outer_xml_tag=True, + attached=False, + quote=True, + filename=None, +): if type(data) != list: data = [data] # always list-of-dicts if force_outer_xml_tag: data = [{tagname: data}] tagname += "_list" doc = sco_xml.simple_dictlist2xml(data, tagname=tagname, quote=quote) - return send_file(doc, filename="sco_data.xml", mime=XML_MIMETYPE, attached=attached) + return send_file( + doc, filename=filename or "sco_data.xml", mime=XML_MIMETYPE, attached=attached + ) def sendResult( @@ -669,6 +678,7 @@ def sendResult( force_outer_xml_tag=True, attached=False, quote_xml=True, + filename=None, ): if (format is None) or (format == "html"): return data @@ -679,9 +689,10 @@ def sendResult( force_outer_xml_tag=force_outer_xml_tag, attached=attached, quote=quote_xml, + filename=filename, ) elif format == "json": - return sendJSON(data, attached=attached) + return sendJSON(data, attached=attached, filename=filename) else: raise ValueError("invalid format: %s" % format) @@ -799,7 +810,7 @@ def abbrev_prenom(prenom): # def timedate_human_repr(): - "representation du temps courant pour utilisateur: a localiser" + "representation du temps courant pour utilisateur" return time.strftime("%d/%m/%Y à %Hh%M") diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 85d0a0e3c1..a9390db248 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -1297,7 +1297,7 @@ th.formsemestre_status_inscrits { text-align: center; } td.formsemestre_status_code { - width: 2em; + /* width: 2em; */ padding-right: 1em; } diff --git a/app/static/js/formsemestre_edit.js b/app/static/js/formsemestre_edit.js new file mode 100644 index 0000000000..3394d659c7 --- /dev/null +++ b/app/static/js/formsemestre_edit.js @@ -0,0 +1,14 @@ +// Formulaire formsemestre_createwithmodules + +function change_semestre_id() { + var semestre_id = $("#tf_semestre_id")[0].value; + for (var i = -1; i < 12; i++) { + $(".sem" + i).hide(); + } + $(".sem" + semestre_id).show(); +} + + +$(window).on('load', function () { + change_semestre_id(); +}); \ No newline at end of file diff --git a/app/templates/pn/form_ues.html b/app/templates/pn/form_ues.html index 98c590f7b9..a91f29425a 100644 --- a/app/templates/pn/form_ues.html +++ b/app/templates/pn/form_ues.html @@ -3,11 +3,9 @@
Unités d'Enseignement (UEs)
{% for semestre_idx in semestre_ids %} -
Semestre S{{semestre_idx}}
+
Semestre S{{semestre_idx}} (ECTS: {{ects_by_sem[semestre_idx] | safe}})