forked from ScoDoc/ScoDoc
templification saisie_notes_tableur
This commit is contained in:
parent
867ed6dde8
commit
ef44a71e39
@ -51,7 +51,6 @@ from flask_login import current_user
|
|||||||
from app.models import Evaluation, FormSemestre, Identite, ModuleImpl, ScolarNews
|
from app.models import Evaluation, FormSemestre, Identite, ModuleImpl, ScolarNews
|
||||||
from app.scodoc.sco_excel import COLORS, ScoExcelSheet
|
from app.scodoc.sco_excel import COLORS, ScoExcelSheet
|
||||||
from app.scodoc import (
|
from app.scodoc import (
|
||||||
html_sco_header,
|
|
||||||
sco_cache,
|
sco_cache,
|
||||||
sco_evaluations,
|
sco_evaluations,
|
||||||
sco_evaluation_db,
|
sco_evaluation_db,
|
||||||
@ -969,19 +968,21 @@ def saisie_notes_tableur(evaluation_id: int, group_ids=()):
|
|||||||
moduleimpl_id = evaluation.moduleimpl.id
|
moduleimpl_id = evaluation.moduleimpl.id
|
||||||
formsemestre_id = evaluation.moduleimpl.formsemestre_id
|
formsemestre_id = evaluation.moduleimpl.formsemestre_id
|
||||||
if not evaluation.moduleimpl.can_edit_notes(current_user):
|
if not evaluation.moduleimpl.can_edit_notes(current_user):
|
||||||
return (
|
dest_url = url_for(
|
||||||
html_sco_header.sco_header()
|
"notes.moduleimpl_status",
|
||||||
+ f"""
|
scodoc_dept=g.scodoc_dept,
|
||||||
<h2>Modification des notes impossible pour {current_user.user_name}</h2>
|
moduleimpl_id=moduleimpl_id,
|
||||||
<p>(vérifiez que le semestre n'est pas verrouillé et que vous
|
)
|
||||||
avez l'autorisation d'effectuer cette opération)
|
raise ScoValueError(
|
||||||
</p>
|
f"""
|
||||||
<p><a class="stdlink" href="{
|
<h2>Modification des notes impossible pour {current_user.user_name}</h2>
|
||||||
url_for("notes.moduleimpl_status", scodoc_dept=g.scodoc_dept,
|
<p>(vérifiez que le semestre n'est pas verrouillé et que vous
|
||||||
moduleimpl_id=moduleimpl_id)
|
avez l'autorisation d'effectuer cette opération)
|
||||||
}">Continuer</a></p>
|
</p>
|
||||||
"""
|
<p><a class="stdlink" href="{dest_url}">Continuer</a></p>
|
||||||
+ html_sco_header.sco_footer()
|
""",
|
||||||
|
safe=True,
|
||||||
|
dest_url="",
|
||||||
)
|
)
|
||||||
|
|
||||||
page_title = "Saisie des notes" + (
|
page_title = "Saisie des notes" + (
|
||||||
@ -997,11 +998,6 @@ def saisie_notes_tableur(evaluation_id: int, group_ids=()):
|
|||||||
)
|
)
|
||||||
|
|
||||||
H = [
|
H = [
|
||||||
html_sco_header.sco_header(
|
|
||||||
page_title=page_title,
|
|
||||||
javascripts=sco_groups_view.JAVASCRIPTS,
|
|
||||||
cssstyles=sco_groups_view.CSSSTYLES,
|
|
||||||
),
|
|
||||||
sco_evaluations.evaluation_describe(evaluation_id=evaluation_id),
|
sco_evaluations.evaluation_describe(evaluation_id=evaluation_id),
|
||||||
"""<span class="eval_title">Saisie des notes par fichier</span>""",
|
"""<span class="eval_title">Saisie des notes par fichier</span>""",
|
||||||
]
|
]
|
||||||
@ -1176,8 +1172,13 @@ def saisie_notes_tableur(evaluation_id: int, group_ids=()):
|
|||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
H.append(html_sco_header.sco_footer())
|
return render_template(
|
||||||
return "\n".join(H)
|
"sco_page.j2",
|
||||||
|
content="\n".join(H),
|
||||||
|
page_title=page_title,
|
||||||
|
javascripts=sco_groups_view.JAVASCRIPTS,
|
||||||
|
cssstyles=sco_groups_view.CSSSTYLES,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def formsemestre_import_notes(
|
def formsemestre_import_notes(
|
||||||
|
Loading…
Reference in New Issue
Block a user