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
Jean-Marie Place
SCODOC_R6A06
Commits
a93f5d86
Commit
a93f5d86
authored
5 months ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Page codes des cursus: restrictions aux groupes. Closes #1049
parent
fa0f809e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/scodoc/sco_report.py
+39
-16
39 additions, 16 deletions
app/scodoc/sco_report.py
with
39 additions
and
16 deletions
app/scodoc/sco_report.py
+
39
−
16
View file @
a93f5d86
...
@@ -1227,9 +1227,13 @@ def tsp_grouped_list(codes_etuds):
...
@@ -1227,9 +1227,13 @@ def tsp_grouped_list(codes_etuds):
return
L
return
L
def
table_suivi_cursus
(
formsemestre_id
,
only_primo
=
False
,
grouped_parcours
=
True
):
def
table_suivi_cursus
(
"""
Tableau recapitulant tous les parcours
"""
formsemestre
:
FormSemestre
,
sem
=
sco_formsemestre
.
get_formsemestre
(
formsemestre_id
)
groups_infos
:
sco_groups_view
.
DisplayedGroupsInfos
,
only_primo
=
False
,
grouped_parcours
=
True
,
):
"""
Tableau récapitulant tous les cursus suivis par les étudiants
"""
(
(
etuds
,
etuds
,
bacs
,
bacs
,
...
@@ -1238,7 +1242,7 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
...
@@ -1238,7 +1242,7 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
annee_admissions
,
annee_admissions
,
civilites
,
civilites
,
statuts
,
statuts
,
)
=
tsp_etud_list
(
formsemestre
_id
,
only_primo
=
only_primo
)
)
=
tsp_etud_list
(
formsemestre
.
id
,
groups_infos
=
groups_infos
,
only_primo
=
only_primo
)
codes_etuds
=
collections
.
defaultdict
(
list
)
codes_etuds
=
collections
.
defaultdict
(
list
)
for
etud
in
etuds
:
for
etud
in
etuds
:
etud
[
"
code_cursus
"
],
etud
[
"
decisions_jury
"
]
=
get_code_cursus_etud
(
etud
[
"
code_cursus
"
],
etud
[
"
decisions_jury
"
]
=
get_code_cursus_etud
(
...
@@ -1283,12 +1287,12 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
...
@@ -1283,12 +1287,12 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
S
=
set
()
S
=
set
()
sems_ids
=
list
(
S
.
union
(
*
[
list
(
e
[
"
decisions_jury
"
].
keys
())
for
e
in
etuds
]))
sems_ids
=
list
(
S
.
union
(
*
[
list
(
e
[
"
decisions_jury
"
].
keys
())
for
e
in
etuds
]))
sems_ids
.
sort
()
sems_ids
.
sort
()
sem_tits
=
[
"
S
%s
"
%
s
for
s
in
sems_ids
]
sem_tits
=
[
f
"
S
{
s
}
"
for
s
in
sems_ids
]
titles
.
update
([(
s
,
s
)
for
s
in
sem_tits
])
titles
.
update
([(
s
,
s
)
for
s
in
sem_tits
])
columns_ids
+=
tuple
(
sem_tits
)
columns_ids
+=
tuple
(
sem_tits
)
for
etud
in
etuds
:
for
etud
in
etuds
:
for
s
in
etud
[
"
decisions_jury
"
]:
for
s
in
etud
[
"
decisions_jury
"
]:
etud
[
"
S
%s
"
%
s
]
=
etud
[
"
decisions_jury
"
][
s
]
etud
[
f
"
S
{
s
}
"
]
=
etud
[
"
decisions_jury
"
][
s
]
if
only_primo
:
if
only_primo
:
primostr
=
"
primo-entrants du
"
primostr
=
"
primo-entrants du
"
...
@@ -1298,12 +1302,9 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
...
@@ -1298,12 +1302,9 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
columns_ids
=
columns_ids
,
columns_ids
=
columns_ids
,
rows
=
L
,
rows
=
L
,
titles
=
titles
,
titles
=
titles
,
origin
=
"
Généré par %s le
"
%
sco_version
.
SCONAME
origin
=
f
"
Généré par
{
sco_version
.
SCONAME
}
le
{
scu
.
timedate_human_repr
()
}
"
,
+
scu
.
timedate_human_repr
()
caption
=
f
"
Parcours suivis, étudiants
{
primostr
}
semestre
{
formsemestre
.
titre_annee
()
}
"
,
+
""
,
page_title
=
f
"
Parcours
{
formsemestre
.
titre_annee
()
}
"
,
caption
=
"
Parcours suivis, étudiants %s semestre
"
%
primostr
+
sem
[
"
titreannee
"
],
page_title
=
"
Parcours
"
+
sem
[
"
titreannee
"
],
html_sortable
=
True
,
html_sortable
=
True
,
html_class
=
"
table_leftalign table_listegroupe
"
,
html_class
=
"
table_leftalign table_listegroupe
"
,
html_next_section
=
"""
<table class=
"
help
"
>
html_next_section
=
"""
<table class=
"
help
"
>
...
@@ -1318,7 +1319,7 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
...
@@ -1318,7 +1319,7 @@ def table_suivi_cursus(formsemestre_id, only_primo=False, grouped_parcours=True)
"
nb
"
:
len
(
etuds
),
"
nb
"
:
len
(
etuds
),
"
code_cursus
"
:
len
(
etuds
),
"
code_cursus
"
:
len
(
etuds
),
},
},
preferences
=
sco_preferences
.
SemPreferences
(
formsemestre
_
id
),
preferences
=
sco_preferences
.
SemPreferences
(
formsemestre
.
id
),
table_id
=
"
table_suivi_cursus
"
,
table_id
=
"
table_suivi_cursus
"
,
)
)
return
tab
return
tab
...
@@ -1357,8 +1358,24 @@ def formsemestre_suivi_cursus(
...
@@ -1357,8 +1358,24 @@ def formsemestre_suivi_cursus(
no_grouping
=
False
,
no_grouping
=
False
,
):
):
"""
Effectifs dans les differents cursus possibles.
"""
"""
Effectifs dans les differents cursus possibles.
"""
formsemestre
=
FormSemestre
.
get_formsemestre
(
formsemestre_id
)
if
request
.
method
==
"
POST
"
:
group_ids
=
request
.
form
.
getlist
(
"
group_ids
"
)
else
:
group_ids
=
request
.
args
.
getlist
(
"
group_ids
"
)
try
:
group_ids
=
[
int
(
gid
)
for
gid
in
group_ids
]
except
ValueError
as
exc
:
raise
ScoValueError
(
"
group_ids invalide
"
)
from
exc
groups_infos
=
sco_groups_view
.
DisplayedGroupsInfos
(
group_ids
,
formsemestre_id
=
formsemestre
.
id
,
select_all_when_unspecified
=
True
,
)
tab
=
table_suivi_cursus
(
tab
=
table_suivi_cursus
(
formsemestre_id
,
formsemestre
,
groups_infos
,
only_primo
=
only_primo
,
only_primo
=
only_primo
,
grouped_parcours
=
not
no_grouping
,
grouped_parcours
=
not
no_grouping
,
)
)
...
@@ -1367,12 +1384,13 @@ def formsemestre_suivi_cursus(
...
@@ -1367,12 +1384,13 @@ def formsemestre_suivi_cursus(
tab
.
base_url
+=
"
&only_primo=1
"
tab
.
base_url
+=
"
&only_primo=1
"
if
no_grouping
:
if
no_grouping
:
tab
.
base_url
+=
"
&no_grouping=1
"
tab
.
base_url
+=
"
&no_grouping=1
"
t
=
tab
.
make_page
(
fmt
=
fmt
,
with_html_headers
=
False
)
t
=
tab
.
make_page
(
fmt
=
fmt
,
with_html_headers
=
False
)
if
fmt
!=
"
html
"
:
if
fmt
!=
"
html
"
:
return
t
return
t
F
=
[
F
=
[
tsp_form_primo_group
(
tsp_form_primo_group
(
only_primo
,
no_grouping
,
formsemestre_id
,
fmt
,
groups_infos
=
None
only_primo
,
no_grouping
,
formsemestre_id
,
fmt
,
groups_infos
=
groups_infos
)
)
]
]
...
@@ -1381,7 +1399,12 @@ def formsemestre_suivi_cursus(
...
@@ -1381,7 +1399,12 @@ def formsemestre_suivi_cursus(
"
\n
"
.
join
(
F
),
"
\n
"
.
join
(
F
),
t
,
t
,
]
]
return
render_template
(
"
sco_page.j2
"
,
title
=
tab
.
page_title
,
content
=
"
\n
"
.
join
(
H
))
return
render_template
(
"
sco_page.j2
"
,
javascripts
=
[
"
js/groups_view.js
"
],
title
=
tab
.
page_title
,
content
=
"
\n
"
.
join
(
H
),
)
# -------------
# -------------
...
...
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