forked from ScoDoc/DocScoDoc
Jury BUT: navigation liste/saisie
This commit is contained in:
parent
d1c55a317a
commit
145f69aee2
@ -269,7 +269,11 @@ class DecisionsProposeesAnnee(DecisionsProposees):
|
||||
self.explanation = expl_rcues + f" et {self.nb_rcues_under_8} < 8"
|
||||
else:
|
||||
self.codes = [sco_codes.RED, sco_codes.NAR, sco_codes.ADJ] + self.codes
|
||||
self.explanation = expl_rcues + f" et {self.nb_rcues_under_8} niveau < 8"
|
||||
self.explanation = (
|
||||
expl_rcues
|
||||
+ f""" et {self.nb_rcues_under_8}
|
||||
niveau{'x' if self.nb_rcues_under_8 > 1 else ''} < 8"""
|
||||
)
|
||||
#
|
||||
|
||||
def infos(self) -> str:
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
import time
|
||||
from flask import g, url_for
|
||||
from app import db
|
||||
|
||||
from app.but import jury_but
|
||||
from app.comp.res_but import ResultatsSemestreBUT
|
||||
@ -28,11 +27,11 @@ from app.scodoc.sco_codes_parcours import (
|
||||
from app.scodoc import sco_formsemestre_status
|
||||
from app.scodoc import html_sco_header
|
||||
from app.scodoc import sco_utils as scu
|
||||
from app.scodoc.sco_exceptions import ScoException, ScoValueError
|
||||
from app.scodoc.sco_exceptions import ScoValueError
|
||||
|
||||
|
||||
def formsemestre_saisie_jury_but(
|
||||
formsemestre2: FormSemestre, readonly: bool = False
|
||||
formsemestre2: FormSemestre, readonly: bool = False, selected_etudid: int = None
|
||||
) -> str:
|
||||
"""formsemestre est un semestre PAIR
|
||||
Si readonly, ne montre pas le lien "saisir la décision"
|
||||
@ -61,7 +60,9 @@ def formsemestre_saisie_jury_but(
|
||||
filename = scu.sanitize_filename(
|
||||
f"""jury-but-{formsemestre2.titre_num()}-{time.strftime("%Y-%m-%d")}"""
|
||||
)
|
||||
table_html = build_table_jury_but_html(filename, rows, titles, column_ids)
|
||||
table_html = build_table_jury_but_html(
|
||||
filename, rows, titles, column_ids, selected_etudid=selected_etudid
|
||||
)
|
||||
H = [
|
||||
html_sco_header.sco_header(
|
||||
page_title=f"{formsemestre2.sem_modalite()}: moyennes",
|
||||
@ -78,10 +79,11 @@ def formsemestre_saisie_jury_but(
|
||||
return "\n".join(H)
|
||||
|
||||
|
||||
def build_table_jury_but_html(filename: str, rows, titles, column_ids) -> str:
|
||||
def build_table_jury_but_html(
|
||||
filename: str, rows, titles, column_ids, selected_etudid: int = None
|
||||
) -> str:
|
||||
"""assemble la table html"""
|
||||
footer_rows = [] # inutile pour l'instant, à voir XXX
|
||||
selected_etudid = None # inutile pour l'instant, à voir XXX
|
||||
H = [
|
||||
f"""<div class="table_recap"><table class="table_recap apc jury"
|
||||
data-filename="{filename}">"""
|
||||
@ -225,17 +227,27 @@ def get_table_jury_but(
|
||||
row.add_ue_cell(rcue.ue_1, rcue.moy_ue_1)
|
||||
row.add_ue_cell(rcue.ue_2, rcue.moy_ue_2)
|
||||
row.add_rcue_cell(rcue)
|
||||
# --- Le code annuel existant
|
||||
row.add_cell(
|
||||
"code_annee",
|
||||
"Année",
|
||||
f"""{deca.code_valide or ''}""",
|
||||
"col_code_annee",
|
||||
)
|
||||
# --- Le lien de saisie
|
||||
if not readonly:
|
||||
row.add_cell(
|
||||
"lien_saisie",
|
||||
"",
|
||||
f"""<a href="{url_for(
|
||||
f"""
|
||||
<a href="{url_for(
|
||||
'notes.formsemestre_validation_but',
|
||||
scodoc_dept=g.scodoc_dept,
|
||||
etudid=etud.id,
|
||||
formsemestre_id=formsemestre2.id,
|
||||
)}" class="stdlink">saisie décision</a>
|
||||
)}" class="stdlink">
|
||||
{"modif." if deca.code_valide else "saisie"}
|
||||
décision</a>
|
||||
""",
|
||||
)
|
||||
rows.append(row.row)
|
||||
|
@ -101,3 +101,11 @@ div.but_niveau_rcue.recorded {
|
||||
div.but_niveau_ue.modified {
|
||||
background-color: rgb(255, 214, 254);
|
||||
}
|
||||
|
||||
div.but_buttons {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
div.but_buttons span {
|
||||
margin-right: 16px;
|
||||
}
|
@ -3799,6 +3799,12 @@ table.table_recap a:visited {
|
||||
color: black;
|
||||
}
|
||||
|
||||
table.table_recap a.stdlink:link,
|
||||
table.table_recap a.stdlink:visited {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
table.table_recap tfoot th,
|
||||
table.table_recap thead th {
|
||||
text-align: left;
|
||||
|
@ -2280,7 +2280,7 @@ def formsemestre_validation_but(formsemestre_id: int, etudid: int):
|
||||
</div>
|
||||
<span class="but_explanation">{deca.explanation}</span>
|
||||
</div>
|
||||
<b>Niveaux de compétences et unités d'enseignement :</b>
|
||||
<div><b>Niveaux de compétences et unités d'enseignement :</b></div>
|
||||
<div class="but_annee">
|
||||
<div class="titre"></div>
|
||||
<div class="titre">S{1}</div>
|
||||
@ -2330,7 +2330,7 @@ def formsemestre_validation_but(formsemestre_id: int, etudid: int):
|
||||
H.append("</div>") # but_annee
|
||||
|
||||
H.append(
|
||||
"""<div class="but_settings">
|
||||
f"""<div class="but_settings">
|
||||
<input type="checkbox" onchange="enable_manual_codes(this)">
|
||||
<em>permettre la saisie manuelles des codes d'année et de niveaux.
|
||||
Dans ce cas, il vous revient de vous assurer de la cohérence entre
|
||||
@ -2338,7 +2338,13 @@ def formsemestre_validation_but(formsemestre_id: int, etudid: int):
|
||||
</input>
|
||||
</div>
|
||||
|
||||
<input type="submit" value="Enregistrer ces décisions">
|
||||
<div class="but_buttons">
|
||||
<span><input type="submit" value="Enregistrer ces décisions"></span>
|
||||
<span><a href="{url_for(
|
||||
"notes.formsemestre_saisie_jury", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, selected_etudid=etud.id
|
||||
)}">retour à la liste</a></span>
|
||||
</div>
|
||||
"""
|
||||
)
|
||||
H.append("</form>") # but_annee
|
||||
@ -2543,7 +2549,7 @@ sco_publish("/formsemestre_pvjury", sco_pvjury.formsemestre_pvjury, Permission.S
|
||||
@scodoc
|
||||
@permission_required(Permission.ScoView)
|
||||
@scodoc7func
|
||||
def formsemestre_saisie_jury(formsemestre_id: int):
|
||||
def formsemestre_saisie_jury(formsemestre_id: int, selected_etudid: int = None):
|
||||
"""Page de saisie: liste des étudiants et lien vers page jury
|
||||
en semestres pairs de BUT, table spécifique avec l'année
|
||||
sinon, redirect vers page recap en mode jury
|
||||
@ -2551,7 +2557,9 @@ def formsemestre_saisie_jury(formsemestre_id: int):
|
||||
readonly = not sco_permissions_check.can_validate_sem(formsemestre_id)
|
||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
if formsemestre.formation.is_apc() and formsemestre.semestre_id % 2 == 0:
|
||||
return jury_but_recap.formsemestre_saisie_jury_but(formsemestre, readonly)
|
||||
return jury_but_recap.formsemestre_saisie_jury_but(
|
||||
formsemestre, readonly, selected_etudid=selected_etudid
|
||||
)
|
||||
return redirect(
|
||||
url_for(
|
||||
"notes.formsemestre_recapcomplet",
|
||||
|
Loading…
Reference in New Issue
Block a user