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
Paul Milleville
SCODOC_R6A06
Commits
068951ef
Commit
068951ef
authored
2 years ago
by
Emmanuel Viennet
Committed by
iziram
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Jury BUT: ajout colonne décision année sur table récap.
parent
fbca147d
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/comp/res_but.py
+44
-4
44 additions, 4 deletions
app/comp/res_but.py
app/scodoc/sco_recapcomplet.py
+1
-0
1 addition, 0 deletions
app/scodoc/sco_recapcomplet.py
app/tables/jury_recap.py
+13
-1
13 additions, 1 deletion
app/tables/jury_recap.py
with
58 additions
and
5 deletions
app/comp/res_but.py
+
44
−
4
View file @
068951ef
...
...
@@ -10,17 +10,17 @@ import time
import
numpy
as
np
import
pandas
as
pd
from
app
import
log
from
app
import
db
,
log
from
app.comp
import
moy_ue
,
moy_sem
,
inscr_mod
from
app.comp.res_compat
import
NotesTableCompat
from
app.comp.bonus_spo
import
BonusSport
from
app.models
import
ScoDocSiteConfig
from
app.models
import
Formation
,
FormSemestreInscription
,
ScoDocSiteConfig
from
app.models.moduleimpls
import
ModuleImpl
from
app.models.but_refcomp
import
ApcParcours
,
ApcNiveau
from
app.models.ues
import
DispenseUE
,
UniteEns
from
app.models.but_validations
import
ApcValidationAnnee
,
ApcValidationRCUE
from
app.scodoc
import
sco_preferences
from
app.scodoc.codes_cursus
import
UE_SPORT
from
app.scodoc.codes_cursus
import
BUT_CODES_ORDERED
,
UE_SPORT
from
app.scodoc.sco_utils
import
ModuleType
...
...
@@ -44,7 +44,8 @@ class ResultatsSemestreBUT(NotesTableCompat):
"""
Parcours de chaque étudiant { etudid : parcour_id }
"""
self
.
ues_ids_by_parcour
:
dict
[
set
[
int
]]
=
{}
"""
{ parcour_id : set }, ue_id de chaque parcours
"""
self
.
validations_annee
:
dict
[
int
,
ApcValidationAnnee
]
=
{}
"""
chargé par get_validations_annee: jury annuel BUT
"""
if
not
self
.
load_cached
():
t0
=
time
.
time
()
self
.
compute
()
...
...
@@ -321,3 +322,42 @@ class ResultatsSemestreBUT(NotesTableCompat):
formsemestre_id
=
self
.
formsemestre
.
id
,
etudid
=
etudid
).
count
()
)
def
get_validations_annee
(
self
)
->
dict
[
int
,
ApcValidationAnnee
]:
"""
Les validations des étudiants de ce semestre
pour l
'
année BUT d
'
une formation compatible avec celle de ce semestre.
Attention:
1) la validation ne provient pas nécessairement de ce semestre
(redoublants, pair/impair, extérieurs).
2) l
'
étudiant a pu démissionner ou défaillir.
3) S
'
il y a plusieurs validations pour le même étudiant, prend la
"
meilleure
"
.
Mémorise le résultat (dans l
'
instance, pas en cache: TODO voir au profiler)
"""
if
self
.
validations_annee
:
return
self
.
validations_annee
annee_but
=
(
self
.
formsemestre
.
semestre_id
+
1
)
//
2
validations
=
(
ApcValidationAnnee
.
query
.
filter_by
(
ordre
=
annee_but
)
.
join
(
Formation
)
.
filter_by
(
formation_code
=
self
.
formsemestre
.
formation
.
formation_code
)
.
join
(
FormSemestreInscription
,
db
.
and_
(
FormSemestreInscription
.
etudid
==
ApcValidationAnnee
.
etudid
,
FormSemestreInscription
.
formsemestre_id
==
self
.
formsemestre
.
id
,
),
)
)
validation_by_etud
=
{}
for
validation
in
validations
:
if
validation
.
etudid
in
validation_by_etud
:
# keep the "best"
if
BUT_CODES_ORDERED
.
get
(
validation
.
code
,
0
)
>
BUT_CODES_ORDERED
.
get
(
validation_by_etud
[
validation
.
etudid
].
code
,
0
):
validation_by_etud
[
validation
.
etudid
]
=
validation
else
:
validation_by_etud
[
validation
.
etudid
]
=
validation
self
.
validations_annee
=
validation_by_etud
return
self
.
validations_annee
This diff is collapsed.
Click to expand it.
app/scodoc/sco_recapcomplet.py
+
1
−
0
View file @
068951ef
...
...
@@ -251,6 +251,7 @@ def formsemestre_recapcomplet(
<div><tt>~</tt></div><div>valeur manquante</div>
<div><tt>=</tt></div><div>UE dispensée</div>
<div><tt>nan</tt></div><div>valeur non disponible</div>
<div>📍</div><div>code jury non enregistré</div>
</div>
</div>
"""
...
...
This diff is collapsed.
Click to expand it.
app/tables/jury_recap.py
+
13
−
1
View file @
068951ef
...
...
@@ -81,11 +81,14 @@ class TableJury(TableRecap):
def
add_jury
(
self
):
"""
Ajoute la colonne code jury et le lien.
Le code jury est celui du semestre: cette colonne n
'
est montrée
-
Le code jury est celui du semestre: cette colonne n
'
est montrée
que pour les formations classiques, ce code n
'
est pas utilisé en BUT.
- En BUT, on donne la décision de jury annuelle.
"""
res
=
self
.
res
autorisations
=
res
.
get_autorisations_inscription
()
if
res
.
is_apc
:
validations_annee
=
res
.
get_validations_annee
()
for
row
in
self
.
rows
:
etud
=
row
.
etud
if
not
res
.
is_apc
:
...
...
@@ -115,6 +118,15 @@ class TableJury(TableRecap):
group
=
"
jury_code_sem
"
,
classes
=
[
"
recorded_code
"
],
)
if
res
.
is_apc
:
# BUT
validation_annee
=
validations_annee
.
get
(
etud
.
id
,
None
)
row
.
add_cell
(
"
decision_annuelle
"
,
"
Année
"
,
validation_annee
.
code
if
validation_annee
else
""
,
group
=
"
jury_code_sem
"
,
classes
=
[
"
recorded_code
"
],
)
# Lien saisie ou visu jury
a_saisir
=
(
not
res
.
validations
)
or
(
not
res
.
validations
.
has_decision
(
etud
))
row
.
add_cell
(
...
...
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