forked from ScoDoc/ScoDoc
default formsemestre modality
This commit is contained in:
parent
3a6b30d99d
commit
56d708569d
@ -102,14 +102,20 @@ class NotesFormModalite(db.Model):
|
|||||||
|
|
||||||
__tablename__ = "notes_form_modalites"
|
__tablename__ = "notes_form_modalites"
|
||||||
|
|
||||||
|
DEFAULT_MODALITE = "FI"
|
||||||
|
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
modalite = db.Column(db.String(16), unique=True, index=True) # code
|
modalite = db.Column(
|
||||||
|
db.String(16),
|
||||||
|
unique=True,
|
||||||
|
index=True,
|
||||||
|
default=DEFAULT_MODALITE,
|
||||||
|
server_default=DEFAULT_MODALITE,
|
||||||
|
) # code
|
||||||
titre = db.Column(db.Text()) # texte explicatif
|
titre = db.Column(db.Text()) # texte explicatif
|
||||||
# numero = ordre de presentation)
|
# numero = ordre de presentation)
|
||||||
numero = db.Column(db.Integer)
|
numero = db.Column(db.Integer)
|
||||||
|
|
||||||
DEFAULT_MODALITE = "FI"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def insert_modalites():
|
def insert_modalites():
|
||||||
"""Create default modalities"""
|
"""Create default modalities"""
|
||||||
|
@ -48,6 +48,7 @@ def test_client():
|
|||||||
yield client
|
yield client
|
||||||
# ndb.close_dept_connection()
|
# ndb.close_dept_connection()
|
||||||
# Teardown:
|
# Teardown:
|
||||||
|
db.session.commit()
|
||||||
db.session.remove()
|
db.session.remove()
|
||||||
clear_scodoc_cache()
|
clear_scodoc_cache()
|
||||||
# db.drop_all()
|
# db.drop_all()
|
||||||
|
@ -18,6 +18,7 @@ import typing
|
|||||||
import scodoc_manager
|
import scodoc_manager
|
||||||
from config import Config
|
from config import Config
|
||||||
from app.auth.models import User
|
from app.auth.models import User
|
||||||
|
from app.models import NotesFormModalite
|
||||||
from app.scodoc import notesdb as ndb
|
from app.scodoc import notesdb as ndb
|
||||||
from app.scodoc import sco_codes_parcours
|
from app.scodoc import sco_codes_parcours
|
||||||
from app.scodoc import sco_edit_formation
|
from app.scodoc import sco_edit_formation
|
||||||
@ -228,7 +229,7 @@ class ScoFake(object):
|
|||||||
bul_hide_xml=None,
|
bul_hide_xml=None,
|
||||||
gestion_semestrielle=None,
|
gestion_semestrielle=None,
|
||||||
bul_bgcolor=None,
|
bul_bgcolor=None,
|
||||||
modalite=None,
|
modalite=NotesFormModalite.DEFAULT_MODALITE,
|
||||||
resp_can_edit=None,
|
resp_can_edit=None,
|
||||||
resp_can_change_ens=None,
|
resp_can_change_ens=None,
|
||||||
ens_can_edit_eval=None,
|
ens_can_edit_eval=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user