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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul-louis Gomis
SCODOC_R6A06
Commits
38037669
Commit
38037669
authored
2 months ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Fix: calcul des moyennes d'UE dispensées
parent
7a598205
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/comp/moy_ue.py
+3
-3
3 additions, 3 deletions
app/comp/moy_ue.py
sco_version.py
+1
-1
1 addition, 1 deletion
sco_version.py
tests/unit/test_but_ues.py
+15
-17
15 additions, 17 deletions
tests/unit/test_but_ues.py
with
19 additions
and
21 deletions
app/comp/moy_ue.py
+
3
−
3
View file @
38037669
...
...
@@ -302,10 +302,10 @@ def compute_ue_moys_apc(
# Les "dispenses" sont très peu nombreuses et traitées en python:
for
dispense_ue
in
dispense_ues
:
if
(
dispense_ue
[
0
]
in
etud_moy_ue_df
.
columns
and
dispense_ue
[
1
]
in
etud_moy_ue_df
.
index
dispense_ue
[
1
]
in
etud_moy_ue_df
.
columns
and
dispense_ue
[
0
]
in
etud_moy_ue_df
.
index
):
etud_moy_ue_df
.
at
[
dispense_ue
[
1
],
dispense_ue
[
0
]]
=
0.0
etud_moy_ue_df
.
at
[
dispense_ue
[
0
],
dispense_ue
[
1
]]
=
0.0
return
etud_moy_ue_df
...
...
This diff is collapsed.
Click to expand it.
sco_version.py
+
1
−
1
View file @
38037669
...
...
@@ -3,7 +3,7 @@
"
Infos sur version ScoDoc
"
SCOVERSION
=
"
9.7.6
0
"
SCOVERSION
=
"
9.7.6
1
"
SCONAME
=
"
ScoDoc
"
...
...
This diff is collapsed.
Click to expand it.
tests/unit/test_but_ues.py
+
15
−
17
View file @
38037669
...
...
@@ -9,10 +9,12 @@ from app import db
from
app.comp
import
moy_ue
from
app.comp
import
inscr_mod
from
app.models
import
FormSemestre
,
Evaluation
,
ModuleImplInscription
from
app.comp.res_but
import
ResultatsSemestreBUT
from
app.scodoc
import
sco_saisie_notes
from
app.scodoc.codes_cursus
import
UE_SPORT
from
app.scodoc.sco_utils
import
NOTES_NEUTRALISE
from
app.scodoc
import
sco_exceptions
from
app.views
import
notes
def
test_ue_moy
(
test_client
):
...
...
@@ -121,23 +123,19 @@ def test_ue_moy(test_client):
exception_raised
=
True
assert
exception_raised
# Recalcule les notes:
modimpl_coefs_df
,
_
,
_
=
moy_ue
.
df_load_modimpl_coefs
(
formsemestre
,
modimpls
=
formsemestre
.
modimpls_sorted
)
sem_cube
,
_
,
_
=
moy_ue
.
notes_sem_load_cube
(
formsemestre
,
modimpl_coefs_df
)
etuds
=
formsemestre
.
etuds
.
all
()
modimpl_mask
=
[
modimpl
.
module
.
ue
.
type
!=
UE_SPORT
for
modimpl
in
formsemestre
.
modimpls_sorted
]
etud_moy_ue
=
moy_ue
.
compute_ue_moys_apc
(
sem_cube
,
etuds
,
modimpls
,
modimpl_inscr_df
,
modimpl_coefs_df
,
modimpl_mask
,
set
(),
)
etud_moy_ue
=
_recompute
(
formsemestre
)
assert
etud_moy_ue
[
ue1
.
id
][
etudid
]
==
n1
assert
etud_moy_ue
[
ue2
.
id
][
etudid
]
==
n1
assert
etud_moy_ue
[
ue3
.
id
][
etudid
]
==
n1
# Test avec une UE dispensée
notes
.
etud_desinscrit_ue
(
etudid
,
formsemestre
.
id
,
ue3
.
id
)
etud_moy_ue
=
_recompute
(
formsemestre
)
assert
etud_moy_ue
[
ue1
.
id
][
etudid
]
==
n1
assert
etud_moy_ue
[
ue2
.
id
][
etudid
]
==
n1
assert
etud_moy_ue
[
ue3
.
id
][
etudid
]
==
0.0
# plus inscrit à cette UE
def
_recompute
(
formsemestre
:
FormSemestre
):
"
recalcule les notes, utilise ResultatsSemestreBUT
"
nt
=
ResultatsSemestreBUT
(
formsemestre
)
return
nt
.
etud_moy_ue
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