forked from ScoDoc/ScoDoc
misc fixes
This commit is contained in:
parent
ce36edd86d
commit
069f996168
@ -54,13 +54,12 @@ def form_search_etud(
|
||||
if title:
|
||||
H.append("<h2>%s</h2>" % title)
|
||||
H.append(
|
||||
"""<form action="search_etud_in_dept" method="POST">
|
||||
<b>%s</b>
|
||||
f"""<form action="{ url_for("scolar.search_etud_in_dept", scodoc_dept=g.scodoc_dept) }" method="POST">
|
||||
<b>{title}</b>
|
||||
<input type="text" name="expnom" width="12" spellcheck="false" value="">
|
||||
<input type="submit" value="Chercher">
|
||||
<br/>(entrer une partie du nom)
|
||||
"""
|
||||
% title
|
||||
)
|
||||
if dest_url:
|
||||
H.append('<input type="hidden" name="dest_url" value="%s"/>' % dest_url)
|
||||
|
@ -687,9 +687,9 @@ def setGroups(
|
||||
if not group_name:
|
||||
continue
|
||||
# ajax arguments are encoded in utf-8:
|
||||
group_name = six.text_type(group_name, "utf-8").encode(
|
||||
scu.SCO_ENCODING
|
||||
) # #py3 #sco8
|
||||
# group_name = six.text_type(group_name, "utf-8").encode(
|
||||
# scu.SCO_ENCODING
|
||||
# ) # #py3 #sco8
|
||||
group_id = createGroup(context, partition_id, group_name, REQUEST=REQUEST)
|
||||
# Place dans ce groupe les etudiants indiqués:
|
||||
for etudid in fs[1:-1]:
|
||||
|
@ -327,7 +327,10 @@ def getEtudInfo(
|
||||
|
||||
|
||||
sco_publish(
|
||||
"/search_etud_in_dept", sco_find_etud.search_etud_in_dept, Permission.ScoView
|
||||
"/search_etud_in_dept",
|
||||
sco_find_etud.search_etud_in_dept,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish(
|
||||
@ -444,7 +447,10 @@ sco_publish(
|
||||
)
|
||||
|
||||
sco_publish(
|
||||
"/etud_delete_archive", sco_archives_etud.etud_delete_archive, Permission.ScoView
|
||||
"/etud_delete_archive",
|
||||
sco_archives_etud.etud_delete_archive,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish(
|
||||
@ -494,7 +500,7 @@ sco_publish(
|
||||
)
|
||||
|
||||
|
||||
@bp.route("/doAddAnnotation")
|
||||
@bp.route("/doAddAnnotation", methods=["GET", "POST"])
|
||||
@permission_required(Permission.ScoEtudAddAnnotations)
|
||||
@scodoc7func(context)
|
||||
def doAddAnnotation(context, etudid, comment, REQUEST):
|
||||
@ -516,7 +522,7 @@ def doAddAnnotation(context, etudid, comment, REQUEST):
|
||||
)
|
||||
|
||||
|
||||
@bp.route("/doSuppressAnnotation")
|
||||
@bp.route("/doSuppressAnnotation", methods=["GET", "POST"])
|
||||
@permission_required(Permission.ScoView)
|
||||
@scodoc7func(context)
|
||||
def doSuppressAnnotation(context, etudid, annotation_id, REQUEST):
|
||||
@ -616,7 +622,12 @@ def formChangeCoordonnees(context, etudid, REQUEST):
|
||||
|
||||
|
||||
# --- Gestion des groupes:
|
||||
sco_publish("/affectGroups", sco_groups_edit.affectGroups, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/affectGroups",
|
||||
sco_groups_edit.affectGroups,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish(
|
||||
"/XMLgetGroupsInPartition", sco_groups.XMLgetGroupsInPartition, Permission.ScoView
|
||||
@ -634,27 +645,75 @@ sco_publish("/createGroup", sco_groups.createGroup, Permission.ScoView)
|
||||
|
||||
sco_publish("/suppressGroup", sco_groups.suppressGroup, Permission.ScoView)
|
||||
|
||||
sco_publish("/group_set_name", sco_groups.group_set_name, Permission.ScoView)
|
||||
|
||||
sco_publish("/group_rename", sco_groups.group_rename, Permission.ScoView)
|
||||
|
||||
sco_publish(
|
||||
"/groups_auto_repartition", sco_groups.groups_auto_repartition, Permission.ScoView
|
||||
"/group_set_name",
|
||||
sco_groups.group_set_name,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/editPartitionForm", sco_groups.editPartitionForm, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/group_rename",
|
||||
sco_groups.group_rename,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/partition_delete", sco_groups.partition_delete, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/groups_auto_repartition",
|
||||
sco_groups.groups_auto_repartition,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/partition_set_attr", sco_groups.partition_set_attr, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/editPartitionForm",
|
||||
sco_groups.editPartitionForm,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/partition_move", sco_groups.partition_move, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/partition_delete",
|
||||
sco_groups.partition_delete,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/partition_set_name", sco_groups.partition_set_name, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/partition_set_attr",
|
||||
sco_groups.partition_set_attr,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/partition_rename", sco_groups.partition_rename, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/partition_move",
|
||||
sco_groups.partition_move,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/partition_create", sco_groups.partition_create, Permission.ScoView)
|
||||
sco_publish(
|
||||
"/partition_set_name",
|
||||
sco_groups.partition_set_name,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish(
|
||||
"/partition_rename",
|
||||
sco_groups.partition_rename,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish(
|
||||
"/partition_create",
|
||||
sco_groups.partition_create,
|
||||
Permission.ScoView,
|
||||
methods=["GET", "POST"],
|
||||
)
|
||||
|
||||
sco_publish("/etud_info_html", sco_page_etud.etud_info_html, Permission.ScoView)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user