Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nathan Duplouy
SCODOC_R6A06
Commits
8ae4e861
Commit
8ae4e861
authored
4 months ago
by
Maxime Blot
Browse files
Options
Downloads
Patches
Plain Diff
ajout du boutton des évaluations du semestre (pas de fonctionnalité)
parent
de0c7a2c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/scodoc/sco_evaluations.py
+109
-0
109 additions, 0 deletions
app/scodoc/sco_evaluations.py
app/scodoc/sco_saisie_notes.py
+1
-0
1 addition, 0 deletions
app/scodoc/sco_saisie_notes.py
with
110 additions
and
0 deletions
app/scodoc/sco_evaluations.py
+
109
−
0
View file @
8ae4e861
...
@@ -514,6 +514,115 @@ def formsemestre_evaluations_cal(formsemestre_id):
...
@@ -514,6 +514,115 @@ def formsemestre_evaluations_cal(formsemestre_id):
)
)
########################################################################
########################################################################
########################################################################
def
form_eval_choice
(
groups_infos
,
with_selectall_butt
=
False
,
with_deselect_butt
=
False
,
submit_on_change
=
False
,
default_deselect_others
=
False
,
args
:
dict
|
None
=
None
,
title
=
"
Evaluations additionnelles :
"
,
):
"""
"""
default_group_id
=
sco_groups
.
get_default_group
(
groups_infos
.
formsemestre_id
)
args
=
args
or
{}
args_wdg
=
"
\n
"
.
join
(
[
f
"""
<input type=
"
hidden
"
name=
"
{
k
}
"
value=
"
{
v
}
"
/>
"""
for
k
,
v
in
args
.
items
()
if
k
not
in
(
"
formsemestre_id
"
,
"
group_ids
"
)
]
)
H
=
[
f
"""
<form id=
"
group_selector
"
method=
"
get
"
>
<input type=
"
hidden
"
name=
"
formsemestre_id
"
id=
"
formsemestre_id
"
value=
"
{
groups_infos
.
formsemestre_id
}
"
/>
<input type=
"
hidden
"
name=
"
default_group_id
"
id=
"
default_group_id
"
value=
"
{
default_group_id
}
"
/>
{
args_wdg
}
{
title
}
{
menu_evals_choice
(
groups_infos
,
submit_on_change
=
submit_on_change
,
default_deselect_others
=
default_deselect_others
,
)
}
"""
]
if
with_selectall_butt
:
H
.
append
(
"""
<input type=
"
button
"
value=
"
sélectionner tous
"
onmousedown=
"
select_groupe_tous();
"
/>
"""
)
if
with_deselect_butt
:
H
.
append
(
"""
<input type=
"
button
"
value=
"
ne pas filtrer
"
onmousedown=
"
remove_group_filter();
"
/>
"""
)
H
.
append
(
"
</form>
"
)
return
"
\n
"
.
join
(
H
)
def
menu_evals_choice
(
groups_infos
,
submit_on_change
=
False
,
default_deselect_others
=
True
,
):
"""
"""
default_group_id
=
sco_groups
.
get_default_group
(
groups_infos
.
formsemestre_id
)
n_members
=
len
(
sco_groups
.
get_group_members
(
default_group_id
))
values
:
dict
=
{
# Choix : Tous (tous les groupes)
""
:
[
{
"
value
"
:
default_group_id
,
"
label
"
:
f
"
Tous (
{
n_members
}
)
"
,
"
selected
"
:
default_group_id
in
groups_infos
.
group_ids
,
"
single
"
:
default_deselect_others
,
}
]
}
for
partition
in
groups_infos
.
partitions
:
p_name
:
str
=
partition
[
"
partition_name
"
]
vals
:
list
[
tuple
[
str
,
str
,
bool
]]
=
[]
# Les groupes dans cette partition:
for
grp
in
sco_groups
.
get_partition_groups
(
partition
):
############################################
selected
:
bool
=
grp
[
"
group_id
"
]
in
groups_infos
.
group_ids
if
grp
[
"
group_name
"
]:
vals
.
append
(
{
"
value
"
:
grp
[
"
group_id
"
],
"
label
"
:
f
"
{
grp
[
'
group_name
'
]
}
(
{
len
(
sco_groups
.
get_group_members
(
grp
[
'
group_id
'
]))
}
)
"
,
"
selected
"
:
selected
,
}
)
values
[
p_name
]
=
vals
multi_select
:
scu
.
MultiSelect
=
scu
.
MultiSelect
(
values
=
values
,
name
=
"
group_ids
"
,
html_id
=
"
group_ids_sel
"
)
if
submit_on_change
:
multi_select
.
change_event
(
"
submit_group_selector();
"
)
return
multi_select
.
html
()
########################################################################
########################################################################
########################################################################
def
evaluation_date_first_completion
(
evaluation_id
)
->
datetime
.
datetime
:
def
evaluation_date_first_completion
(
evaluation_id
)
->
datetime
.
datetime
:
"""
Première date à laquelle l
'
évaluation a été complète
"""
Première date à laquelle l
'
évaluation a été complète
ou None si actuellement incomplète
ou None si actuellement incomplète
...
...
This diff is collapsed.
Click to expand it.
app/scodoc/sco_saisie_notes.py
+
1
−
0
View file @
8ae4e861
...
@@ -678,6 +678,7 @@ def saisie_notes(evaluation: Evaluation, group_ids: list[int] | tuple[int] = ())
...
@@ -678,6 +678,7 @@ def saisie_notes(evaluation: Evaluation, group_ids: list[int] | tuple[int] = ())
'
<div id=
"
saisie_notes
"
><span class=
"
eval_title
"
>Saisie des notes</span>
'
,
'
<div id=
"
saisie_notes
"
><span class=
"
eval_title
"
>Saisie des notes</span>
'
,
]
]
H
.
append
(
"""
<div id=
"
group-tabs
"
><table><tr><td>
"""
)
H
.
append
(
"""
<div id=
"
group-tabs
"
><table><tr><td>
"""
)
H
.
append
(
sco_evaluations
.
form_eval_choice
(
groups_infos
,
submit_on_change
=
True
))
H
.
append
(
sco_groups_view
.
form_groups_choice
(
groups_infos
,
submit_on_change
=
True
))
H
.
append
(
sco_groups_view
.
form_groups_choice
(
groups_infos
,
submit_on_change
=
True
))
H
.
append
(
'
</td><td style=
"
padding-left: 35px;
"
>
'
)
H
.
append
(
'
</td><td style=
"
padding-left: 35px;
"
>
'
)
H
.
append
(
H
.
append
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment