forked from ScoDoc/ScoDoc
Suppression des anciennes fonctions ScoDoc7 donnant les URLs de base.
This commit is contained in:
parent
c17bc8b61b
commit
ab4731bd43
@ -232,7 +232,9 @@ class ScolarNews(db.Model):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Transforme les URL en URL absolues
|
# Transforme les URL en URL absolues
|
||||||
base = scu.ScoURL()
|
base = url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)[
|
||||||
|
: -len("/index_html")
|
||||||
|
]
|
||||||
txt = re.sub('href=/.*?"', 'href="' + base + "/", txt)
|
txt = re.sub('href=/.*?"', 'href="' + base + "/", txt)
|
||||||
|
|
||||||
# Transforme les liens HTML en texte brut: '<a href="url">texte</a>' devient 'texte: url'
|
# Transforme les liens HTML en texte brut: '<a href="url">texte</a>' devient 'texte: url'
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
import html
|
import html
|
||||||
|
|
||||||
from flask import g, render_template
|
from flask import g, render_template, url_for
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ def sco_header(
|
|||||||
params = {
|
params = {
|
||||||
"page_title": page_title or sco_version.SCONAME,
|
"page_title": page_title or sco_version.SCONAME,
|
||||||
"no_side_bar": no_side_bar,
|
"no_side_bar": no_side_bar,
|
||||||
"ScoURL": scu.ScoURL(),
|
"ScoURL": url_for("scolar.index_html", scodoc_dept=g.scodoc_dept),
|
||||||
"encoding": scu.SCO_ENCODING,
|
"encoding": scu.SCO_ENCODING,
|
||||||
"titrebandeau_mkup": "<td>" + titrebandeau + "</td>",
|
"titrebandeau_mkup": "<td>" + titrebandeau + "</td>",
|
||||||
"authuser": current_user.user_name,
|
"authuser": current_user.user_name,
|
||||||
@ -220,7 +220,7 @@ def sco_header(
|
|||||||
<script>
|
<script>
|
||||||
window.onload=function(){{enableTooltips("gtrcontent")}};
|
window.onload=function(){{enableTooltips("gtrcontent")}};
|
||||||
|
|
||||||
const SCO_URL="{scu.ScoURL()}";
|
const SCO_URL="{url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)}";
|
||||||
const SCO_TIMEZONE="{scu.TIME_ZONE}";
|
const SCO_TIMEZONE="{scu.TIME_ZONE}";
|
||||||
</script>"""
|
</script>"""
|
||||||
)
|
)
|
||||||
|
@ -102,25 +102,33 @@ def sidebar_common():
|
|||||||
<a href="{home_link}" class="sidebar">Accueil</a> <br>
|
<a href="{home_link}" class="sidebar">Accueil</a> <br>
|
||||||
<div id="authuser"><a id="authuserlink" href="{
|
<div id="authuser"><a id="authuserlink" href="{
|
||||||
url_for("users.user_info_page",
|
url_for("users.user_info_page",
|
||||||
scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
|
scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
|
||||||
}">{current_user.user_name}</a>
|
}">{current_user.user_name}</a>
|
||||||
<br><a id="deconnectlink" href="{url_for("auth.logout")}">déconnexion</a>
|
<br><a id="deconnectlink" href="{url_for("auth.logout")}">déconnexion</a>
|
||||||
</div>
|
</div>
|
||||||
{sidebar_dept()}
|
{sidebar_dept()}
|
||||||
<h2 class="insidebar">Scolarité</h2>
|
<h2 class="insidebar">Scolarité</h2>
|
||||||
<a href="{scu.ScoURL()}" class="sidebar">Semestres</a> <br>
|
<a href="{
|
||||||
<a href="{scu.NotesURL()}" class="sidebar">Formations</a> <br>
|
url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
|
}" class="sidebar">Semestres</a> <br>
|
||||||
|
<a href="{
|
||||||
|
url_for("notes.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
|
}" class="sidebar">Formations</a> <br>
|
||||||
"""
|
"""
|
||||||
]
|
]
|
||||||
if current_user.has_permission(Permission.AbsChange):
|
if current_user.has_permission(Permission.AbsChange):
|
||||||
H.append(
|
H.append(
|
||||||
f""" <a href="{scu.AssiduitesURL()}" class="sidebar">Assiduité</a> <br> """
|
f""" <a href="{
|
||||||
|
url_for("assiduites.bilan_dept", scodoc_dept=g.scodoc_dept)
|
||||||
|
}" class="sidebar">Assiduité</a> <br> """
|
||||||
)
|
)
|
||||||
if current_user.has_permission(
|
if current_user.has_permission(
|
||||||
Permission.UsersAdmin
|
Permission.UsersAdmin
|
||||||
) or current_user.has_permission(Permission.UsersView):
|
) or current_user.has_permission(Permission.UsersView):
|
||||||
H.append(
|
H.append(
|
||||||
f"""<a href="{scu.UsersURL()}" class="sidebar">Utilisateurs</a> <br>"""
|
f"""<a href="{
|
||||||
|
url_for("users.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
|
}" class="sidebar">Utilisateurs</a> <br>"""
|
||||||
)
|
)
|
||||||
|
|
||||||
if current_user.has_permission(Permission.EditPreferences):
|
if current_user.has_permission(Permission.EditPreferences):
|
||||||
|
@ -58,21 +58,20 @@ def formation_delete(formation_id=None, dialog_confirmed=False):
|
|||||||
html_sco_header.sco_header(page_title="Suppression d'une formation"),
|
html_sco_header.sco_header(page_title="Suppression d'une formation"),
|
||||||
f"""<h2>Suppression de la formation {formation.titre} ({formation.acronyme})</h2>""",
|
f"""<h2>Suppression de la formation {formation.titre} ({formation.acronyme})</h2>""",
|
||||||
]
|
]
|
||||||
|
formsemestres = formation.formsemestres.all()
|
||||||
sems = sco_formsemestre.do_formsemestre_list({"formation_id": formation_id})
|
if formsemestres:
|
||||||
if sems:
|
|
||||||
H.append(
|
H.append(
|
||||||
"""<p class="warning">Impossible de supprimer cette formation,
|
"""<p class="warning">Impossible de supprimer cette formation,
|
||||||
car les sessions suivantes l'utilisent:</p>
|
car les sessions suivantes l'utilisent:</p>
|
||||||
<ul>"""
|
<ul>"""
|
||||||
)
|
)
|
||||||
for sem in sems:
|
for formsemestre in formsemestres:
|
||||||
H.append(
|
H.append(f"""<li>{formsemestre.html_link_status()}</li>""")
|
||||||
'<li><a class="stdlink" href="formsemestre_status?formsemestre_id=%(formsemestre_id)s">%(titremois)s</a></li>'
|
|
||||||
% sem
|
|
||||||
)
|
|
||||||
H.append(
|
H.append(
|
||||||
'</ul><p><a class="stdlink" href="%s">Revenir</a></p>' % scu.NotesURL()
|
f"""</ul>
|
||||||
|
<p><a class="stdlink" href="{
|
||||||
|
url_for("notes.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
|
}">Revenir</a></p>"""
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if not dialog_confirmed:
|
if not dialog_confirmed:
|
||||||
@ -85,14 +84,16 @@ def formation_delete(formation_id=None, dialog_confirmed=False):
|
|||||||
</p>
|
</p>
|
||||||
""",
|
""",
|
||||||
OK="Supprimer cette formation",
|
OK="Supprimer cette formation",
|
||||||
cancel_url=scu.NotesURL(),
|
cancel_url=url_for("notes.index_html", scodoc_dept=g.scodoc_dept),
|
||||||
parameters={"formation_id": formation_id},
|
parameters={"formation_id": formation_id},
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
do_formation_delete(formation_id)
|
do_formation_delete(formation_id)
|
||||||
H.append(
|
H.append(
|
||||||
f"""<p>OK, formation supprimée.</p>
|
f"""<p>OK, formation supprimée.</p>
|
||||||
<p><a class="stdlink" href="{scu.NotesURL()}">continuer</a></p>"""
|
<p><a class="stdlink" href="{
|
||||||
|
url_for("notes.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
|
}">continuer</a></p>"""
|
||||||
)
|
)
|
||||||
|
|
||||||
H.append(html_sco_header.sco_footer())
|
H.append(html_sco_header.sco_footer())
|
||||||
@ -252,7 +253,7 @@ def formation_edit(formation_id=None, create=False):
|
|||||||
if tf[0] == 0:
|
if tf[0] == 0:
|
||||||
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
return flask.redirect(scu.NotesURL())
|
return flask.redirect(url_for("notes.index_html", scodoc_dept=g.scodoc_dept))
|
||||||
else:
|
else:
|
||||||
# check unicity : constraint UNIQUE(acronyme,titre,version)
|
# check unicity : constraint UNIQUE(acronyme,titre,version)
|
||||||
if create:
|
if create:
|
||||||
|
@ -541,7 +541,9 @@ def formsemestre_evaluations_delai_correction(formsemestre_id, fmt="html"):
|
|||||||
scodoc_dept=g.scodoc_dept,
|
scodoc_dept=g.scodoc_dept,
|
||||||
moduleimpl_id=e.moduleimpl.id,
|
moduleimpl_id=e.moduleimpl.id,
|
||||||
),
|
),
|
||||||
"module_titre": e.moduleimpl.module.abbrev or e.moduleimpl.module.titre,
|
"module_titre": e.moduleimpl.module.abbrev
|
||||||
|
or e.moduleimpl.module.titre
|
||||||
|
or "",
|
||||||
"responsable_id": e.moduleimpl.responsable_id,
|
"responsable_id": e.moduleimpl.responsable_id,
|
||||||
"responsable_nomplogin": sco_users.user_info(
|
"responsable_nomplogin": sco_users.user_info(
|
||||||
e.moduleimpl.responsable_id
|
e.moduleimpl.responsable_id
|
||||||
|
@ -1431,18 +1431,25 @@ Ceci n'est possible que si :
|
|||||||
|
|
||||||
def formsemestre_delete2(formsemestre_id, dialog_confirmed=False):
|
def formsemestre_delete2(formsemestre_id, dialog_confirmed=False):
|
||||||
"""Delete a formsemestre (confirmation)"""
|
"""Delete a formsemestre (confirmation)"""
|
||||||
|
formsemestre = FormSemestre.get_formsemestre(formsemestre_id)
|
||||||
# Confirmation dialog
|
# Confirmation dialog
|
||||||
if not dialog_confirmed:
|
if not dialog_confirmed:
|
||||||
return scu.confirm_dialog(
|
return scu.confirm_dialog(
|
||||||
"""<h2>Vous voulez vraiment supprimer ce semestre ???</h2><p>(opération irréversible)</p>""",
|
"""<h2>Vous voulez vraiment supprimer ce semestre ???</h2>
|
||||||
|
<p>(opération irréversible)</p>
|
||||||
|
""",
|
||||||
dest_url="",
|
dest_url="",
|
||||||
cancel_url="formsemestre_status?formsemestre_id=%s" % formsemestre_id,
|
cancel_url=url_for(
|
||||||
parameters={"formsemestre_id": formsemestre_id},
|
"notes.formsemestre_status",
|
||||||
|
scodoc_dept=g.scodoc_dept,
|
||||||
|
formsemestre_id=formsemestre.id,
|
||||||
|
),
|
||||||
|
parameters={"formsemestre_id": formsemestre.id},
|
||||||
)
|
)
|
||||||
# Bon, s'il le faut...
|
# Bon, s'il le faut...
|
||||||
do_formsemestre_delete(formsemestre_id)
|
do_formsemestre_delete(formsemestre.id)
|
||||||
flash("Semestre supprimé !")
|
flash("Semestre supprimé !")
|
||||||
return flask.redirect(scu.ScoURL())
|
return flask.redirect(url_for("scolar.index_html", scodoc_dept=g.scodoc_dept))
|
||||||
|
|
||||||
|
|
||||||
def formsemestre_has_decisions_or_compensations(
|
def formsemestre_has_decisions_or_compensations(
|
||||||
|
@ -634,7 +634,7 @@ def formsemestre_description_table(
|
|||||||
"UE": modimpl.module.ue.acronyme,
|
"UE": modimpl.module.ue.acronyme,
|
||||||
"_UE_td_attrs": ue_info.get("_UE_td_attrs", ""),
|
"_UE_td_attrs": ue_info.get("_UE_td_attrs", ""),
|
||||||
"Code": modimpl.module.code or "",
|
"Code": modimpl.module.code or "",
|
||||||
"Module": modimpl.module.abbrev or modimpl.module.titre,
|
"Module": modimpl.module.abbrev or modimpl.module.titre or "",
|
||||||
"_Module_class": "scotext",
|
"_Module_class": "scotext",
|
||||||
"Inscrits": mod_nb_inscrits,
|
"Inscrits": mod_nb_inscrits,
|
||||||
"Responsable": sco_users.user_info(modimpl.responsable_id)["nomprenom"],
|
"Responsable": sco_users.user_info(modimpl.responsable_id)["nomprenom"],
|
||||||
|
@ -180,7 +180,7 @@ def fiche_etud(etudid=None):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
info["etat_civil"] = ""
|
info["etat_civil"] = ""
|
||||||
info["ScoURL"] = scu.ScoURL()
|
info["ScoURL"] = url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
info["authuser"] = current_user
|
info["authuser"] = current_user
|
||||||
if restrict_etud_data:
|
if restrict_etud_data:
|
||||||
info["info_naissance"] = ""
|
info["info_naissance"] = ""
|
||||||
|
@ -2260,16 +2260,17 @@ class BasePreferences:
|
|||||||
before_table="<details><summary>{title}</summary>",
|
before_table="<details><summary>{title}</summary>",
|
||||||
after_table="</details>",
|
after_table="</details>",
|
||||||
)
|
)
|
||||||
|
dest_url = url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
if tf[0] == 0:
|
if tf[0] == 0:
|
||||||
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
||||||
elif tf[0] == -1:
|
if tf[0] == -1:
|
||||||
return flask.redirect(scu.ScoURL()) # cancel
|
return flask.redirect(dest_url) # cancel
|
||||||
else:
|
#
|
||||||
for pref in self.prefs_definition:
|
for pref in self.prefs_definition:
|
||||||
self.prefs[None][pref[0]] = tf[2][pref[0]]
|
self.prefs[None][pref[0]] = tf[2][pref[0]]
|
||||||
self.save()
|
self.save()
|
||||||
flash("Préférences modifiées")
|
flash("Préférences modifiées")
|
||||||
return flask.redirect(scu.ScoURL())
|
return flask.redirect(dest_url)
|
||||||
|
|
||||||
def build_tf_form(self, categories: list[str] = None, formsemestre_id: int = None):
|
def build_tf_form(self, categories: list[str] = None, formsemestre_id: int = None):
|
||||||
"""Build list of elements for TrivialFormulator.
|
"""Build list of elements for TrivialFormulator.
|
||||||
@ -2433,10 +2434,12 @@ function set_global_pref(el, pref_name) {
|
|||||||
before_table="<details><summary>{title}</summary>",
|
before_table="<details><summary>{title}</summary>",
|
||||||
after_table="</details>",
|
after_table="</details>",
|
||||||
)
|
)
|
||||||
dest_url = (
|
dest_url = url_for(
|
||||||
scu.NotesURL()
|
"notes.formsemestre_status",
|
||||||
+ "/formsemestre_status?formsemestre_id=%s" % self.formsemestre_id
|
scodoc_dept=g.scodoc_dept,
|
||||||
|
formsemestre_id=self.formsemestre_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
if tf[0] == 0:
|
if tf[0] == 0:
|
||||||
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
@ -2482,7 +2485,9 @@ function set_global_pref(el, pref_name) {
|
|||||||
request.base_url + "?formsemestre_id=" + str(self.formsemestre_id)
|
request.base_url + "?formsemestre_id=" + str(self.formsemestre_id)
|
||||||
)
|
)
|
||||||
elif destination == "global":
|
elif destination == "global":
|
||||||
return flask.redirect(scu.ScoURL() + "/edit_preferences")
|
return flask.redirect(
|
||||||
|
url_for("scolar.edit_preferences", scodoc_dept=g.scodoc_dept)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -785,51 +785,6 @@ BULLETINS_VERSIONS_BUT = BULLETINS_VERSIONS | {
|
|||||||
"butcourt": "Version courte spéciale BUT"
|
"butcourt": "Version courte spéciale BUT"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ----- Support for ScoDoc7 compatibility
|
|
||||||
|
|
||||||
|
|
||||||
def ScoURL():
|
|
||||||
"""base URL for this sco instance.
|
|
||||||
e.g. https://scodoc.xxx.fr/ScoDoc/DEPT/Scolarite
|
|
||||||
= page accueil département
|
|
||||||
"""
|
|
||||||
return url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)[
|
|
||||||
: -len("/index_html")
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def NotesURL():
|
|
||||||
"""URL of Notes
|
|
||||||
e.g. https://scodoc.xxx.fr/ScoDoc/DEPT/Scolarite/Notes
|
|
||||||
= url de base des méthodes de notes
|
|
||||||
(page accueil programmes).
|
|
||||||
"""
|
|
||||||
return url_for("notes.index_html", scodoc_dept=g.scodoc_dept)[: -len("/index_html")]
|
|
||||||
|
|
||||||
|
|
||||||
def AbsencesURL():
|
|
||||||
"""URL of Absences"""
|
|
||||||
return url_for("absences.index_html", scodoc_dept=g.scodoc_dept)[
|
|
||||||
: -len("/index_html")
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def AssiduitesURL():
|
|
||||||
"""URL of Assiduités"""
|
|
||||||
return url_for("assiduites.bilan_dept", scodoc_dept=g.scodoc_dept)[
|
|
||||||
: -len("/BilanDept")
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def UsersURL():
|
|
||||||
"""URL of Users
|
|
||||||
e.g. https://scodoc.xxx.fr/ScoDoc/DEPT/Scolarite/Users
|
|
||||||
= url de base des requêtes ZScoUsers
|
|
||||||
et page accueil users
|
|
||||||
"""
|
|
||||||
return url_for("users.index_html", scodoc_dept=g.scodoc_dept)[: -len("/index_html")]
|
|
||||||
|
|
||||||
|
|
||||||
# ---- Simple python utilities
|
# ---- Simple python utilities
|
||||||
|
|
||||||
|
|
||||||
|
@ -485,6 +485,10 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mass-selection em {
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.fieldsplit {
|
.fieldsplit {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
@ -425,7 +425,7 @@ async function getModuleImpl(assiduite) {
|
|||||||
return res.json();
|
return res.json();
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
moduleimpls[id] = `${data.module.code} ${data.module.abbrev}`;
|
moduleimpls[id] = `${data.module.code} ${data.module.abbrev || ''}`;
|
||||||
return moduleimpls[id];
|
return moduleimpls[id];
|
||||||
})
|
})
|
||||||
.catch((_) => {
|
.catch((_) => {
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell, .header {
|
.cell, .header {
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@ -111,7 +111,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pointer{
|
.pointer{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ async function nouvellePeriode(period = null) {
|
|||||||
let periodeDiv = document.createElement("div");
|
let periodeDiv = document.createElement("div");
|
||||||
periodeDiv.classList.add("cell", "header");
|
periodeDiv.classList.add("cell", "header");
|
||||||
periodeDiv.id = `periode-${periodId}`;
|
periodeDiv.id = `periode-${periodId}`;
|
||||||
|
|
||||||
const periodP = document.createElement("p");
|
const periodP = document.createElement("p");
|
||||||
periodP.textContent = `Plage du ${date} de ${debut} à ${fin}`;
|
periodP.textContent = `Plage du ${date} de ${debut} à ${fin}`;
|
||||||
|
|
||||||
@ -402,12 +402,12 @@ function sauvegarderAssiduites() {
|
|||||||
await nouvellePeriode(periode);
|
await nouvellePeriode(periode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si il y n'a pas d'erreur, on affiche un message de succès
|
// Si il n'y a pas d'erreur, on affiche un message de succès
|
||||||
if (data.errors.length == 0) {
|
if (data.errors.length == 0) {
|
||||||
const span = document.createElement("span");
|
const span = document.createElement("span");
|
||||||
span.textContent = "Les assiduités ont bien été sauvegardées.";
|
span.textContent = "Le relevé d'assiduité a été enregistré.";
|
||||||
openAlertModal(
|
openAlertModal(
|
||||||
"Sauvegarde des assiduités",
|
"Enregistrement de l'assiduité",
|
||||||
span,
|
span,
|
||||||
null,
|
null,
|
||||||
"var(--color-present)"
|
"var(--color-present)"
|
||||||
@ -597,7 +597,7 @@ main();
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="etatDef">
|
<label for="etatDef">
|
||||||
Intialiser les étudiants comme :
|
Intialiser les étudiants comme :
|
||||||
<select name="etatDef" id="etatDef">
|
<select name="etatDef" id="etatDef">
|
||||||
<option value="">-</option>
|
<option value="">-</option>
|
||||||
<option value="present">présents</option>
|
<option value="present">présents</option>
|
||||||
@ -605,13 +605,13 @@ main();
|
|||||||
<option value="absent">absents</option>
|
<option value="absent">absents</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tableau à double entrée
|
<!-- Tableau à double entrée
|
||||||
Colonne : Etudiants (Header = Nom, Prénom, Photo (si actif))
|
Colonne : Etudiants (Header = Nom, Prénom, Photo (si actif))
|
||||||
Ligne : Période (Header = Jour, Heure de début, Heure de fin, ModuleImplId)
|
Ligne : Période (Header = Jour, Heure de début, Heure de fin, ModuleImplId)
|
||||||
Contenu :
|
Contenu :
|
||||||
- bouton assiduité (présent, retard, absent)
|
- bouton assiduité (présent, retard, absent)
|
||||||
- Bouton conflit si conflit de période
|
- Bouton conflit si conflit de période
|
||||||
--->
|
--->
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
setupTimeLine(()=>{creerTousLesEtudiants(etuds)})
|
setupTimeLine(()=>{creerTousLesEtudiants(etuds)})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const nonWorkDays = [{{ nonworkdays| safe }}];
|
const nonWorkDays = [{{ nonworkdays| safe }}];
|
||||||
const readOnly = {{ readonly }};
|
const readOnly = {{ readonly }};
|
||||||
@ -61,7 +61,7 @@
|
|||||||
$('#date').on('change', async function(d) {
|
$('#date').on('change', async function(d) {
|
||||||
// On vérifie si la date est un jour travaillé
|
// On vérifie si la date est un jour travaillé
|
||||||
dateCouranteEstTravaillee();
|
dateCouranteEstTravaillee();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await recupAssiduites(etuds, $("#date").datepicker("getDate"));
|
await recupAssiduites(etuds, $("#date").datepicker("getDate"));
|
||||||
@ -87,7 +87,7 @@
|
|||||||
await recupAssiduites(etuds, $("#date").datepicker("getDate"));
|
await recupAssiduites(etuds, $("#date").datepicker("getDate"));
|
||||||
}
|
}
|
||||||
creerTousLesEtudiants(etuds);
|
creerTousLesEtudiants(etuds);
|
||||||
|
|
||||||
// affichage ou non des PDP
|
// affichage ou non des PDP
|
||||||
afficherPDP(localStorage.getItem("scodoc-etud-pdp") == "true" )
|
afficherPDP(localStorage.getItem("scodoc-etud-pdp") == "true" )
|
||||||
}
|
}
|
||||||
@ -168,9 +168,10 @@
|
|||||||
<input type="checkbox" value="remove" name="mass_btn_assiduites" id="mass_rbtn_aucun"
|
<input type="checkbox" value="remove" name="mass_btn_assiduites" id="mass_rbtn_aucun"
|
||||||
class="rbtn aucun" onclick="mettreToutLeMonde('vide', this)" title="Supprimer">
|
class="rbtn aucun" onclick="mettreToutLeMonde('vide', this)" title="Supprimer">
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<em>Les saisies ci-dessous sont enregistrées au fur et à mesure.</em>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<div class="etud_holder">
|
<div class="etud_holder">
|
||||||
<p class="placeholder">
|
<p class="placeholder">
|
||||||
@ -181,7 +182,7 @@
|
|||||||
{% include "assiduites/widgets/alert.j2" %}
|
{% include "assiduites/widgets/alert.j2" %}
|
||||||
{% include "assiduites/widgets/prompt.j2" %}
|
{% include "assiduites/widgets/prompt.j2" %}
|
||||||
{% include "assiduites/widgets/conflict.j2" %}
|
{% include "assiduites/widgets/conflict.j2" %}
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ span.calendarEdit {
|
|||||||
<input class=groupe type=checkbox ${partition.show_in_lists ? "checked" : ""} data-attr=show_in_lists> Afficher sur bulletins et tableaux
|
<input class=groupe type=checkbox ${partition.show_in_lists ? "checked" : ""} data-attr=show_in_lists> Afficher sur bulletins et tableaux
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<a class="stdlink" href="{{scu.ScoURL()
|
<a class="stdlink" href="{{url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
}}/groups_auto_repartition/${partition.id}">Répartir les étudiants</a>
|
}}/groups_auto_repartition/${partition.id}">Répartir les étudiants</a>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -181,7 +181,7 @@ def add_billets_absence_form(etudid):
|
|||||||
if tf[0] == 0:
|
if tf[0] == 0:
|
||||||
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
return "\n".join(H) + tf[1] + html_sco_header.sco_footer()
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
return flask.redirect(scu.ScoURL())
|
return flask.redirect(url_for("scolar.index_html", scodoc_dept=g.scodoc_dept))
|
||||||
else:
|
else:
|
||||||
e = tf[2]["begin"].split("/")
|
e = tf[2]["begin"].split("/")
|
||||||
begin = e[2] + "-" + e[1] + "-" + e[0] + " 00:00:00"
|
begin = e[2] + "-" + e[1] + "-" + e[0] + " 00:00:00"
|
||||||
@ -407,7 +407,7 @@ def process_billet_absence_form(billet_id: int):
|
|||||||
|
|
||||||
return "\n".join(H) + "<br>" + tf[1] + F + html_sco_header.sco_footer()
|
return "\n".join(H) + "<br>" + tf[1] + F + html_sco_header.sco_footer()
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
return flask.redirect(scu.ScoURL())
|
return flask.redirect(url_for("scolar.index_html", scodoc_dept=g.scodoc_dept))
|
||||||
else:
|
else:
|
||||||
n = _ProcessBilletAbsence(billet, tf[2]["estjust"], tf[2]["description"])
|
n = _ProcessBilletAbsence(billet, tf[2]["estjust"], tf[2]["description"])
|
||||||
if tf[2]["estjust"]:
|
if tf[2]["estjust"]:
|
||||||
|
@ -685,7 +685,7 @@ def module_clone():
|
|||||||
|
|
||||||
#
|
#
|
||||||
@bp.route("/")
|
@bp.route("/")
|
||||||
@bp.route("/index_html")
|
@bp.route("/index_html", alias=True)
|
||||||
@scodoc
|
@scodoc
|
||||||
@permission_required(Permission.ScoView)
|
@permission_required(Permission.ScoView)
|
||||||
def index_html():
|
def index_html():
|
||||||
@ -807,7 +807,7 @@ def formation_import_xml_form():
|
|||||||
{ html_sco_header.sco_footer() }
|
{ html_sco_header.sco_footer() }
|
||||||
"""
|
"""
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
return flask.redirect(scu.NotesURL())
|
return flask.redirect(url_for("notes.index_html", scodoc_dept=g.scodoc_dept))
|
||||||
else:
|
else:
|
||||||
formation_id, _, _ = sco_formations.formation_import_xml(
|
formation_id, _, _ = sco_formations.formation_import_xml(
|
||||||
tf[2]["xmlfile"].read()
|
tf[2]["xmlfile"].read()
|
||||||
|
@ -340,8 +340,8 @@ def showEtudLog(etudid, fmt="html"):
|
|||||||
# ---------- PAGE ACCUEIL (listes) --------------
|
# ---------- PAGE ACCUEIL (listes) --------------
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/", alias=True)
|
@bp.route("/")
|
||||||
@bp.route("/index_html")
|
@bp.route("/index_html", alias=True)
|
||||||
@scodoc
|
@scodoc
|
||||||
@permission_required(Permission.ScoView)
|
@permission_required(Permission.ScoView)
|
||||||
@scodoc7func
|
@scodoc7func
|
||||||
@ -1954,7 +1954,7 @@ def etudident_delete(etudid: int = -1, dialog_confirmed=False):
|
|||||||
for formsemestre_id in formsemestre_ids_to_inval:
|
for formsemestre_id in formsemestre_ids_to_inval:
|
||||||
sco_cache.invalidate_formsemestre(formsemestre_id=formsemestre_id)
|
sco_cache.invalidate_formsemestre(formsemestre_id=formsemestre_id)
|
||||||
flash("Étudiant supprimé !")
|
flash("Étudiant supprimé !")
|
||||||
return flask.redirect(scu.ScoURL())
|
return flask.redirect(url_for("scolar.index_html", scodoc_dept=g.scodoc_dept))
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/check_group_apogee")
|
@bp.route("/check_group_apogee")
|
||||||
@ -2148,7 +2148,7 @@ def form_students_import_excel(formsemestre_id=None):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
sem = None
|
sem = None
|
||||||
dest_url = scu.ScoURL()
|
dest_url = url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
if sem and not sem["etat"]:
|
if sem and not sem["etat"]:
|
||||||
raise ScoValueError("Modification impossible: semestre verrouille")
|
raise ScoValueError("Modification impossible: semestre verrouille")
|
||||||
H = [
|
H = [
|
||||||
@ -2183,13 +2183,15 @@ def form_students_import_excel(formsemestre_id=None):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
H.append(
|
H.append(
|
||||||
"""
|
f"""
|
||||||
<p>Pour inscrire directement les étudiants dans un semestre de
|
<p>Pour inscrire directement les étudiants dans un semestre de
|
||||||
formation, il suffit d'indiquer le code de ce semestre
|
formation, il suffit d'indiquer le code de ce semestre
|
||||||
(qui doit avoir été créé au préalable). <a class="stdlink" href="%s?showcodes=1">Cliquez ici pour afficher les codes</a>
|
(qui doit avoir été créé au préalable).
|
||||||
|
<a class="stdlink" href="{
|
||||||
|
url_for("scolar.index_html", showcodes=1, scodoc_dept=g.scodoc_dept)
|
||||||
|
}">Cliquez ici pour afficher les codes</a>
|
||||||
</p>
|
</p>
|
||||||
"""
|
"""
|
||||||
% (scu.ScoURL())
|
|
||||||
)
|
)
|
||||||
|
|
||||||
H.append("""<ol><li>""")
|
H.append("""<ol><li>""")
|
||||||
@ -2414,9 +2416,11 @@ def form_students_import_infos_admissions(formsemestre_id=None):
|
|||||||
return "\n".join(H) + tf[1] + help_text + F
|
return "\n".join(H) + tf[1] + help_text + F
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
return flask.redirect(
|
return flask.redirect(
|
||||||
scu.ScoURL()
|
url_for(
|
||||||
+ "/formsemestre_status?formsemestre_id="
|
"notes.formsemestre_status",
|
||||||
+ str(formsemestre_id)
|
scodoc_dept=g.scodoc_dept,
|
||||||
|
formsemestre_id=formsemestre_id,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return sco_import_etuds.students_import_admission(
|
return sco_import_etuds.students_import_admission(
|
||||||
|
@ -132,7 +132,7 @@ class Mode(IntEnum):
|
|||||||
|
|
||||||
|
|
||||||
@bp.route("/")
|
@bp.route("/")
|
||||||
@bp.route("/index_html")
|
@bp.route("/index_html", alias=True)
|
||||||
@scodoc
|
@scodoc
|
||||||
@permission_required(Permission.UsersView)
|
@permission_required(Permission.UsersView)
|
||||||
@scodoc7func
|
@scodoc7func
|
||||||
@ -605,7 +605,7 @@ def create_user_form(user_name=None, edit=0, all_roles=True):
|
|||||||
if tf[0] == 0:
|
if tf[0] == 0:
|
||||||
return "\n".join(H) + "\n" + tf[1] + F
|
return "\n".join(H) + "\n" + tf[1] + F
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
return flask.redirect(scu.UsersURL())
|
return flask.redirect(url_for("users.index_html", scodoc_dept=g.scodoc_dept))
|
||||||
else:
|
else:
|
||||||
vals = tf[2]
|
vals = tf[2]
|
||||||
roles = set(vals["roles"]).intersection(editable_roles_strings)
|
roles = set(vals["roles"]).intersection(editable_roles_strings)
|
||||||
@ -1080,28 +1080,28 @@ def change_password(user_name, password, password2):
|
|||||||
#
|
#
|
||||||
# ici page simplifiee car on peut ne plus avoir
|
# ici page simplifiee car on peut ne plus avoir
|
||||||
# le droit d'acceder aux feuilles de style
|
# le droit d'acceder aux feuilles de style
|
||||||
H.append(
|
return f"""<?xml version="1.0" encoding="{scu.SCO_ENCODING}"?>
|
||||||
"""<h2>Changement effectué !</h2>
|
<!DOCTYPE html>
|
||||||
<p>Ne notez pas ce mot de passe, mais mémorisez le !</p>
|
|
||||||
<p>Rappel: il est <b>interdit</b> de communiquer son mot de passe à
|
|
||||||
un tiers, même si c'est un collègue de confiance !</p>
|
|
||||||
<p><b>Si vous n'êtes pas administrateur, le système va vous redemander
|
|
||||||
votre login et nouveau mot de passe au prochain accès.</b>
|
|
||||||
</p>"""
|
|
||||||
)
|
|
||||||
return (
|
|
||||||
f"""<?xml version="1.0" encoding="{scu.SCO_ENCODING}"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mot de passe changé</title>
|
<title>Mot de passe changé</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset={scu.SCO_ENCODING}" />
|
<meta http-equiv="Content-Type" content="text/html; charset={scu.SCO_ENCODING}" />
|
||||||
<body><h1>Mot de passe changé !</h1>
|
<body>
|
||||||
|
<h1>Mot de passe changé !</h1>
|
||||||
|
<h2>Changement effectué</h2>
|
||||||
|
<p>Ne notez pas ce mot de passe, mais mémorisez le !</p>
|
||||||
|
<p>Rappel: il est <b>interdit</b> de communiquer son mot de passe à
|
||||||
|
un tiers, même si c'est un collègue de confiance !</p>
|
||||||
|
<p><b>Si vous n'êtes pas administrateur, le système va vous redemander
|
||||||
|
votre login et nouveau mot de passe au prochain accès.</b>
|
||||||
|
</p>
|
||||||
|
<a href="{
|
||||||
|
url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)
|
||||||
|
}" class="stdlink">Continuer</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
"""
|
"""
|
||||||
+ "\n".join(H)
|
|
||||||
+ f'<a href="{scu.ScoURL()}" class="stdlink">Continuer</a></body></html>'
|
|
||||||
)
|
|
||||||
return html_sco_header.sco_header() + "\n".join(H) + F
|
return html_sco_header.sco_header() + "\n".join(H) + F
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user