forked from ScoDoc/DocScoDoc
Jury BUT: cosmetic tableau jury (v2)
This commit is contained in:
parent
aa138133dc
commit
e8c8815b24
@ -270,15 +270,17 @@ def get_group_members(group_id, etat=None):
|
||||
|
||||
return r
|
||||
|
||||
|
||||
def check_group_name(group_name, partition, raiser=False):
|
||||
"""If groupe name exists in partition : if raiser -> Raise ScoValueError else-> return true"""
|
||||
exists = group_name in [g["group_name"] for g in get_partition_groups(partition)]
|
||||
if exists:
|
||||
if raiser:
|
||||
raise ScoValueError("Le nom de groupe existe déjà dans la partition")
|
||||
else :
|
||||
else:
|
||||
return True
|
||||
return False;
|
||||
return False
|
||||
|
||||
|
||||
# obsolete: sco_groups_view.DisplayedGroupsInfos
|
||||
# def get_groups_members(group_ids, etat=None):
|
||||
@ -840,14 +842,14 @@ def create_group(partition_id, group_name="", default=False) -> int:
|
||||
raise ValueError("invalid group name: ()")
|
||||
# checkGroupName(group_name)
|
||||
if check_group_name(group_name, partition):
|
||||
raise ValueError(
|
||||
"group_name %s already exists in partition" % group_name
|
||||
raise ScoValueError(
|
||||
f"group_name {group_name} already exists in partition"
|
||||
) # XXX FIX: incorrect error handling (in AJAX)
|
||||
cnx = ndb.GetDBConnexion()
|
||||
group_id = groupEditor.create(
|
||||
cnx, {"partition_id": partition_id, "group_name": group_name}
|
||||
)
|
||||
log("create_group: created group_id=%s" % group_id)
|
||||
log("create_group: created group_id={group_id}")
|
||||
#
|
||||
return group_id
|
||||
|
||||
|
@ -3788,11 +3788,19 @@ table.table_recap.jury .col_rcue {
|
||||
}
|
||||
|
||||
table.table_recap.jury tr.even td.col_rcue {
|
||||
background-color: rgb(243, 243, 243);
|
||||
background-color: #b0d4f8;
|
||||
}
|
||||
|
||||
table.table_recap.jury tr.odd td.col_rcue {
|
||||
background-color: #e6eeed;
|
||||
background-color: #abcdef;
|
||||
}
|
||||
|
||||
table.table_recap.jury tr.odd td.col_rcues_validables {
|
||||
background-color: #e1d3c5 !important;
|
||||
}
|
||||
|
||||
table.table_recap.jury tr.even td.col_rcues_validables {
|
||||
background-color: #fcebda !important;
|
||||
}
|
||||
|
||||
table.table_recap .group {
|
||||
|
Loading…
Reference in New Issue
Block a user