modif exc. handling

This commit is contained in:
Emmanuel Viennet 2022-01-11 22:44:03 +01:00
parent af12191cc4
commit 6f0b03242d
4 changed files with 9 additions and 3 deletions

View File

@ -35,13 +35,14 @@ from flask_login import current_user
import app.scodoc.sco_utils as scu
from app.scodoc import sco_preferences
from app.scodoc.sco_permissions import Permission
from sco_version import SCOVERSION
def sidebar_common():
"partie commune à toutes les sidebar"
home_link = url_for("scodoc.index", scodoc_dept=g.scodoc_dept)
H = [
f"""<a class="scodoc_title" href="{home_link}">ScoDoc 9.1</a><br>
f"""<a class="scodoc_title" href="{home_link}">ScoDoc {SCOVERSION}</a><br>
<a href="{home_link}" class="sidebar">Accueil</a> <br>
<div id="authuser"><a id="authuserlink" href="{
url_for("users.user_info_page",

View File

@ -284,7 +284,9 @@ def get_group_infos(group_id, etat=None): # was _getlisteetud
cnx = ndb.GetDBConnexion()
group = get_group(group_id)
sem = sco_formsemestre.get_formsemestre(group["formsemestre_id"])
sem = sco_formsemestre.get_formsemestre(
group["formsemestre_id"], raise_soft_exc=True
)
members = get_group_members(group_id, etat=etat)
# add human readable description of state:

View File

@ -36,6 +36,7 @@ from app.auth.models import User
from app.models import ModuleImpl
from app.models.evaluations import Evaluation
import app.scodoc.sco_utils as scu
from app.scodoc.sco_exceptions import ScoInvalidIdType
from app.scodoc.sco_permissions import Permission
from app.scodoc import html_sco_header
@ -183,6 +184,8 @@ def _ue_coefs_html(coefs_descr) -> str:
def moduleimpl_status(moduleimpl_id=None, partition_id=None):
"""Tableau de bord module (liste des evaluations etc)"""
if not isinstance(moduleimpl_id, int):
raise ScoInvalidIdType("moduleimpl_id must be an integer !")
modimpl = ModuleImpl.query.get_or_404(moduleimpl_id)
M = modimpl.to_dict()
formsemestre_id = M["formsemestre_id"]

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.1.23"
SCOVERSION = "9.1.24"
SCONAME = "ScoDoc"