Skip to content
Snippets Groups Projects
Commit adc03bd2 authored by Emmanuel Viennet's avatar Emmanuel Viennet
Browse files
parents 2e4742b3 f84e7b10
No related branches found
No related tags found
No related merge requests found
...@@ -1050,8 +1050,8 @@ class DecisionsProposeesRCUE(DecisionsProposees): ...@@ -1050,8 +1050,8 @@ class DecisionsProposeesRCUE(DecisionsProposees):
for ue_id in (self.rcue.ue_1.id, self.rcue.ue_2.id): for ue_id in (self.rcue.ue_1.id, self.rcue.ue_2.id):
dec_ue = deca.decisions_ues.get(ue_id) dec_ue = deca.decisions_ues.get(ue_id)
if dec_ue and dec_ue.code_valide not in CODES_UE_VALIDES: if dec_ue and dec_ue.code_valide not in CODES_UE_VALIDES:
log(f"rcue.record: force ADJ sur {dec_ue}") log(f"rcue.record: force ADJR sur {dec_ue}")
dec_ue.record("ADJ") dec_ue.record("ADJR")
if self.rcue.formsemestre_1 is not None: if self.rcue.formsemestre_1 is not None:
sco_cache.invalidate_formsemestre( sco_cache.invalidate_formsemestre(
...@@ -1101,7 +1101,7 @@ class DecisionsProposeesUE(DecisionsProposees): ...@@ -1101,7 +1101,7 @@ class DecisionsProposeesUE(DecisionsProposees):
sinon si compensation dans RCUE: CMP sinon si compensation dans RCUE: CMP
sinon: ADJ, AJ sinon: ADJ, AJ
et proposer toujours: RAT, DEF, ABAN, DEM, UEBSL (codes_communs) et proposer toujours: RAT, DEF, ABAN, ADJR, DEM, UEBSL (codes_communs)
""" """
# Codes toujours proposés sauf si include_communs est faux: # Codes toujours proposés sauf si include_communs est faux:
...@@ -1109,6 +1109,7 @@ class DecisionsProposeesUE(DecisionsProposees): ...@@ -1109,6 +1109,7 @@ class DecisionsProposeesUE(DecisionsProposees):
sco_codes.RAT, sco_codes.RAT,
sco_codes.DEF, sco_codes.DEF,
sco_codes.ABAN, sco_codes.ABAN,
sco_codes.ADJR,
sco_codes.ATJ, sco_codes.ATJ,
sco_codes.DEM, sco_codes.DEM,
sco_codes.UEBSL, sco_codes.UEBSL,
......
...@@ -13,6 +13,7 @@ from app.scodoc.sco_codes_parcours import ( ...@@ -13,6 +13,7 @@ from app.scodoc.sco_codes_parcours import (
ABL, ABL,
ADC, ADC,
ADJ, ADJ,
ADJR,
ADM, ADM,
AJ, AJ,
ATB, ATB,
...@@ -34,6 +35,7 @@ CODES_SCODOC_TO_APO = { ...@@ -34,6 +35,7 @@ CODES_SCODOC_TO_APO = {
ABL: "ABL", ABL: "ABL",
ADC: "ADMC", ADC: "ADMC",
ADJ: "ADM", ADJ: "ADM",
ADJR: "ADM",
ADM: "ADM", ADM: "ADM",
AJ: "AJ", AJ: "AJ",
ATB: "AJAC", ATB: "AJAC",
......
...@@ -122,6 +122,7 @@ ABL = "ABL" ...@@ -122,6 +122,7 @@ ABL = "ABL"
ADM = "ADM" # moyenne gen., barres UE, assiduité: sem. validé ADM = "ADM" # moyenne gen., barres UE, assiduité: sem. validé
ADC = "ADC" # admis par compensation (eg moy(S1, S2) > 10) ADC = "ADC" # admis par compensation (eg moy(S1, S2) > 10)
ADJ = "ADJ" # admis par le jury ADJ = "ADJ" # admis par le jury
ADJR = "ADJR" # UE admise car son RCUE est ADJ
ATT = "ATT" # ATT = "ATT" #
ATJ = "ATJ" # pb assiduité: décision repoussée au semestre suivant ATJ = "ATJ" # pb assiduité: décision repoussée au semestre suivant
ATB = "ATB" ATB = "ATB"
...@@ -158,6 +159,7 @@ CODES_EXPL = { ...@@ -158,6 +159,7 @@ CODES_EXPL = {
ABL: "Année blanche", ABL: "Année blanche",
ADC: "Validé par compensation", ADC: "Validé par compensation",
ADJ: "Validé par le Jury", ADJ: "Validé par le Jury",
ADJR: "UE validée car son RCUE est validé ADJ par le jury",
ADM: "Validé", ADM: "Validé",
AJ: "Ajourné (ou UE/BC de BUT en attente pour problème de moyenne)", AJ: "Ajourné (ou UE/BC de BUT en attente pour problème de moyenne)",
ATB: "Décision en attente d'un autre semestre (au moins une UE sous la barre)", ATB: "Décision en attente d'un autre semestre (au moins une UE sous la barre)",
...@@ -190,7 +192,7 @@ CODES_SEM_ATTENTES = {ATT: True, ATB: True, ATJ: True} # semestre en attente ...@@ -190,7 +192,7 @@ CODES_SEM_ATTENTES = {ATT: True, ATB: True, ATJ: True} # semestre en attente
CODES_SEM_REO = {NAR: 1} # reorientation CODES_SEM_REO = {NAR: 1} # reorientation
CODES_UE_VALIDES = {ADM: True, CMP: True, ADJ: True} # UE validée CODES_UE_VALIDES = {ADM: True, CMP: True, ADJ: True, ADJR: True} # UE validée
CODES_RCUE_VALIDES = CODES_UE_VALIDES # Niveau RCUE validé CODES_RCUE_VALIDES = CODES_UE_VALIDES # Niveau RCUE validé
# Pour le BUT: # Pour le BUT:
CODES_ANNEE_ARRET = {DEF, DEM, ABAN, ABL} CODES_ANNEE_ARRET = {DEF, DEM, ABAN, ABL}
...@@ -208,16 +210,17 @@ BUT_CODES_PASSAGE = { ...@@ -208,16 +210,17 @@ BUT_CODES_PASSAGE = {
# les codes, du plus "défavorable" à l'étudiant au plus favorable: # les codes, du plus "défavorable" à l'étudiant au plus favorable:
# (valeur par défaut 0) # (valeur par défaut 0)
BUT_CODES_ORDERED = { BUT_CODES_ORDERED = {
"NAR": 0, NAR: 0,
"DEF": 0, DEF: 0,
"AJ": 10, AJ: 10,
"ATJ": 20, ATJ: 20,
"CMP": 50, CMP: 50,
"ADC": 50, ADC: 50,
"PASD": 50, PASD: 50,
"PAS1NCI": 60, PAS1NCI: 60,
"ADJ": 100, ADJR: 90,
"ADM": 100, ADJ: 100,
ADM: 100,
} }
......
...@@ -18,7 +18,7 @@ function change_menu_code(elt) { ...@@ -18,7 +18,7 @@ function change_menu_code(elt) {
} else { } else {
elt.parentElement.parentElement.classList.remove("recorded"); elt.parentElement.parentElement.classList.remove("recorded");
} }
// Si RCUE passant en ADJ, change les menus des UEs associées // Si RCUE passant en ADJ, change les menus des UEs associées ADJR
if (elt.classList.contains("code_rcue") if (elt.classList.contains("code_rcue")
&& elt.dataset.niveau_id && elt.dataset.niveau_id
&& elt.value == "ADJ" && elt.value == "ADJ"
...@@ -26,7 +26,7 @@ function change_menu_code(elt) { ...@@ -26,7 +26,7 @@ function change_menu_code(elt) {
let ue_selects = elt.parentElement.parentElement.parentElement.querySelectorAll( let ue_selects = elt.parentElement.parentElement.parentElement.querySelectorAll(
"select.ue_rcue_" + elt.dataset.niveau_id); "select.ue_rcue_" + elt.dataset.niveau_id);
ue_selects.forEach(select => { ue_selects.forEach(select => {
select.value = "ADJ"; select.value = "ADJR";
change_menu_code(select); // pour changer les styles change_menu_code(select); // pour changer les styles
}); });
} }
......
...@@ -189,6 +189,12 @@ ...@@ -189,6 +189,12 @@
<td class="amue"></td> <td class="amue"></td>
<td>Acquis par décision de jury (ECTS acquis)</td> <td>Acquis par décision de jury (ECTS acquis)</td>
</tr> </tr>
<tr>
<td>ADJR</td>
<td>{{codes["ADJR"]}}</td>
<td class="amue"></td>
<td>Acquis par décision de jury sur le RCUE (ECTS acquis)</td>
</tr>
<tr> <tr>
<td>AJ</td> <td>AJ</td>
<td>{{codes["AJ"]}}</td> <td>{{codes["AJ"]}}</td>
......
# -*- coding: utf-8 -*-
##############################################################################
#
# Gestion scolarite IUT
#
# Copyright (c) 1999 - 2022 Emmanuel Viennet. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Emmanuel Viennet emmanuel.viennet@viennet.net
#
##############################################################################
"""ScoDoc : gestion des fichiers archivés associés aux assiduités
Il s'agit de fichiers quelconques, xxx
"""
# Exemple minimal pour @iziram
from app.scodoc import sco_archives
class AbsArchiver(sco_archives.BaseArchiver):
def __init__(self):
sco_archives.BaseArchiver.__init__(
self, archive_type="xp_abs"
) # <<< adapter le nom du type pour refléter l'usage
AbsArchive = AbsArchiver()
# A partir d'ici, essais interactifs avec flask shell
mapp.set_sco_dept("RT")
ctx.push()
# supposons que l'id de l'archive soit l'étudid
# (cela pourrait être autre chose, comme un id d'assiduité ou de justif...)
mon_id = 1
AbsArchive.list_obj_archives(mon_id)
"""
On voit que ScoDoc s'occupe de créer les répertoires côté serveur
[Mon Dec 26 19:38:11 2022] scodoc: (RT) initialized archiver, path=/opt/scodoc-data/archives/xp_abs
[Mon Dec 26 19:38:11 2022] scodoc: (RT) creating directory /opt/scodoc-data/archives/xp_abs
[Mon Dec 26 19:38:11 2022] scodoc: (RT) creating directory /opt/scodoc-data/archives/xp_abs/5
[Mon Dec 26 19:38:11 2022] scodoc: (RT) creating directory /opt/scodoc-data/archives/xp_abs/5/1
[]
et a renvoyé une liste vide
"""
archive_id = AbsArchive.create_obj_archive(
mon_id, "la description du truc que je veux archiver"
)
data = b"un paquet de donnees a stocker"
AbsArchive.store(archive_id, "toto", data)
AbsArchive.store(archive_id, "../../tmp/titi", data + data)
# ici on remarque que le chemin a été vérifié et sécurisé
# ------ Relecture:
archive_ids = AbsArchive.list_obj_archives(mon_id)
# -> ['/opt/scodoc-data/archives/xp_abs/5/1/2022-12-26-19-41-54']
assert archive_ids[0] == archive_id
AbsArchive.get_archive_description(archive_id)
# Liste le contenu:
names = AbsArchive.list_archive(archive_id)
assert ["....tmptiti", "toto"] == names
# Obtient un objet de l'archive
archive_name = AbsArchive.get_archive_name(archive_id)
data2 = AbsArchive.get_archived_file(mon_id, archive_name, names[0])
# Et enfin pour effacer une archive:
AbsArchive.delete_archive(mon_id)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment