forked from ScoDoc/ScoDoc
Edition UE BUT: semestre par défaut
This commit is contained in:
parent
2764ff1074
commit
29d295db61
@ -231,13 +231,17 @@ def do_ue_delete(ue_id, delete_validations=False, force=False):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def ue_create(formation_id=None):
|
def ue_create(formation_id=None, default_semestre_idx=None):
|
||||||
"""Creation d'une UE"""
|
"""Formulaire création d'une UE"""
|
||||||
return ue_edit(create=True, formation_id=formation_id)
|
return ue_edit(
|
||||||
|
create=True,
|
||||||
|
formation_id=formation_id,
|
||||||
|
default_semestre_idx=default_semestre_idx,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def ue_edit(ue_id=None, create=False, formation_id=None):
|
def ue_edit(ue_id=None, create=False, formation_id=None, default_semestre_idx=None):
|
||||||
"""Modification ou création d'une UE"""
|
"""Formulaire modification ou création d'une UE"""
|
||||||
create = int(create)
|
create = int(create)
|
||||||
if not create:
|
if not create:
|
||||||
U = ue_list(args={"ue_id": ue_id})
|
U = ue_list(args={"ue_id": ue_id})
|
||||||
@ -250,7 +254,7 @@ def ue_edit(ue_id=None, create=False, formation_id=None):
|
|||||||
submitlabel = "Modifier les valeurs"
|
submitlabel = "Modifier les valeurs"
|
||||||
else:
|
else:
|
||||||
title = "Création d'une UE"
|
title = "Création d'une UE"
|
||||||
initvalues = {}
|
initvalues = {"semestre_idx": default_semestre_idx}
|
||||||
submitlabel = "Créer cette UE"
|
submitlabel = "Créer cette UE"
|
||||||
formation = Formation.query.get(formation_id)
|
formation = Formation.query.get(formation_id)
|
||||||
if not formation:
|
if not formation:
|
||||||
|
@ -46,16 +46,17 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endfor %}
|
|
||||||
{% if editable %}
|
{% if editable %}
|
||||||
<ul>
|
<ul>
|
||||||
<li class="notes_ue_list notes_ue_list_add"><a class="stdlink" href="{{
|
<li class="notes_ue_list notes_ue_list_add"><a class="stdlink" href="{{
|
||||||
url_for('notes.ue_create',
|
url_for('notes.ue_create',
|
||||||
scodoc_dept=g.scodoc_dept,
|
scodoc_dept=g.scodoc_dept,
|
||||||
formation_id=formation.id,
|
formation_id=formation.id,
|
||||||
|
default_semestre_idx=semestre_idx,
|
||||||
)}}"
|
)}}"
|
||||||
>ajouter une UE</a>
|
>ajouter une UE</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue
Block a user