forked from ScoDoc/ScoDoc
API: Section "malus" dans formsemestre_programme
This commit is contained in:
parent
fcb16a8af4
commit
72895f938e
@ -245,6 +245,7 @@ def formsemestre_programme(formsemestre_id: int):
|
|||||||
"ressources": m_list[ModuleType.RESSOURCE],
|
"ressources": m_list[ModuleType.RESSOURCE],
|
||||||
"saes": m_list[ModuleType.SAE],
|
"saes": m_list[ModuleType.SAE],
|
||||||
"modules": m_list[ModuleType.STANDARD],
|
"modules": m_list[ModuleType.STANDARD],
|
||||||
|
"malus": m_list[ModuleType.MALUS],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -105,12 +105,14 @@ class Module(db.Model):
|
|||||||
scu.ModuleType.SAE,
|
scu.ModuleType.SAE,
|
||||||
}
|
}
|
||||||
|
|
||||||
def type_name(self):
|
def type_name(self) -> str:
|
||||||
|
"Le nom du type de module, pour les humains (avec majuscules et accents)"
|
||||||
return scu.MODULE_TYPE_NAMES[self.module_type]
|
return scu.MODULE_TYPE_NAMES[self.module_type]
|
||||||
|
|
||||||
def type_abbrv(self):
|
def type_abbrv(self) -> str:
|
||||||
""" "mod", "malus", "res", "sae"
|
"""Le nom du type de module, pour les styles CSS.
|
||||||
(utilisées pour style css)"""
|
"mod", "malus", "res", "sae"
|
||||||
|
"""
|
||||||
return scu.ModuleType.get_abbrev(self.module_type)
|
return scu.ModuleType.get_abbrev(self.module_type)
|
||||||
|
|
||||||
def set_ue_coef(self, ue, coef: float) -> None:
|
def set_ue_coef(self, ue, coef: float) -> None:
|
||||||
|
@ -94,9 +94,9 @@ class ModuleType(IntEnum):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_abbrev(cls, code) -> str:
|
def get_abbrev(cls, code) -> str:
|
||||||
"""Chaine abregée décrivant le type de module à partir du code integer:
|
"""Abbréviation décrivant le type de module à partir du code integer:
|
||||||
"mod", "malus", "res", "sae"
|
"mod", "malus", "res", "sae"
|
||||||
(utilisées pour style css)
|
(utilisées pour style CSS)
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
ModuleType.STANDARD: "mod",
|
ModuleType.STANDARD: "mod",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.3.26"
|
SCOVERSION = "9.3.27"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user