Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
3 changed files with 10 additions and 6 deletions
Showing only changes of commit a7058fb86b - Show all commits

View File

@ -900,7 +900,7 @@ def form_choix_jour_saisie_hebdo(groups_infos, moduleimpl_id=None):
formsemestre_id=groups_infos.formsemestre_id, formsemestre_id=groups_infos.formsemestre_id,
moduleimpl_id="" if moduleimpl_id is None else moduleimpl_id moduleimpl_id="" if moduleimpl_id is None else moduleimpl_id
) )
}';">Saisie du jour</button> }';">Saisie du jour ({datetime.date.today().strftime('%d/%m/%Y')})</button>
""" """

View File

@ -577,7 +577,7 @@ function updateDate() {
return true; return true;
} else { } else {
const att = document.createTextNode( const att = document.createTextNode(
"Le jour sélectionné n'est pas un jour travaillé." `Le jour sélectionné (${formatDate(date)}) n'est pas un jour travaillé.`
); );
openAlertModal("Erreur", att, "", "crimson"); openAlertModal("Erreur", att, "", "crimson");
dateInput.value = dateInput.getAttribute("value"); dateInput.value = dateInput.getAttribute("value");

View File

@ -565,10 +565,14 @@ def signal_assiduites_group():
real_date = scu.is_iso_formated(date, True).date() real_date = scu.is_iso_formated(date, True).date()
if real_date < formsemestre.date_debut: if real_date < formsemestre.date_debut or real_date > formsemestre.date_fin:
date = formsemestre.date_debut.isoformat() real_str = real_date.strftime("%d/%m/%Y")
elif real_date > formsemestre.date_fin: form_deb = formsemestre.date_debut.strftime("%d/%m/%Y")
date = formsemestre.date_fin.isoformat() form_fin = formsemestre.date_fin.strftime("%d/%m/%Y")
raise ScoValueError(
f"Impossible de saisir les assiduités pour le {real_str}"
+ f" : Jour en dehors du semestre ( {form_deb}{form_fin}) "
)
# --- Restriction en fonction du moduleimpl_id --- # --- Restriction en fonction du moduleimpl_id ---
if moduleimpl_id: if moduleimpl_id: