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
2720fe0b
Commit
2720fe0b
authored
1 year ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Efface aussi décisions DUT120 quand on efface toutes les décisions du semestre
parent
34fe649d
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/but/jury_but.py
+17
-5
17 additions, 5 deletions
app/but/jury_but.py
app/but/jury_dut120.py
+8
-5
8 additions, 5 deletions
app/but/jury_dut120.py
app/models/validations.py
+1
-1
1 addition, 1 deletion
app/models/validations.py
with
26 additions
and
11 deletions
app/but/jury_but.py
+
17
−
5
View file @
2720fe0b
...
@@ -82,6 +82,7 @@ from app.models import Evaluation, ModuleImpl, Scolog, ScolarAutorisationInscrip
...
@@ -82,6 +82,7 @@ from app.models import Evaluation, ModuleImpl, Scolog, ScolarAutorisationInscrip
from
app.models.but_validations
import
(
from
app.models.but_validations
import
(
ApcValidationAnnee
,
ApcValidationAnnee
,
ApcValidationRCUE
,
ApcValidationRCUE
,
ValidationDUT120
,
)
)
from
app.models.etudiants
import
Identite
from
app.models.etudiants
import
Identite
from
app.models.formations
import
Formation
from
app.models.formations
import
Formation
...
@@ -760,13 +761,13 @@ class DecisionsProposeesAnnee(DecisionsProposees):
...
@@ -760,13 +761,13 @@ class DecisionsProposeesAnnee(DecisionsProposees):
self
.
validation
.
date
=
datetime
.
now
()
self
.
validation
.
date
=
datetime
.
now
()
db
.
session
.
add
(
self
.
validation
)
db
.
session
.
add
(
self
.
validation
)
db
.
session
.
commit
()
log
(
f
"
Recording
{
self
}
:
{
code
}
"
)
log
(
f
"
Recording
{
self
}
:
{
code
}
"
)
Scolog
.
logdb
(
Scolog
.
logdb
(
method
=
"
jury_but
"
,
method
=
"
jury_but
"
,
etudid
=
self
.
etud
.
id
,
etudid
=
self
.
etud
.
id
,
msg
=
f
"
Validation année BUT
{
self
.
annee_but
}
:
{
code
}
"
,
msg
=
f
"
Validation année BUT
{
self
.
annee_but
}
:
{
code
}
"
,
)
)
db
.
session
.
commit
()
if
mark_recorded
:
if
mark_recorded
:
self
.
recorded
=
True
self
.
recorded
=
True
self
.
invalidate_formsemestre_cache
()
self
.
invalidate_formsemestre_cache
()
...
@@ -903,6 +904,8 @@ class DecisionsProposeesAnnee(DecisionsProposees):
...
@@ -903,6 +904,8 @@ class DecisionsProposeesAnnee(DecisionsProposees):
Si only_one_sem, n
'
efface que les décisions UE et les
Si only_one_sem, n
'
efface que les décisions UE et les
autorisations de passage du semestre d
'
origine du deca.
autorisations de passage du semestre d
'
origine du deca.
Efface les validations de DUT120 issues du semestre d
'
origine du deca.
Dans tous les cas, efface les validations de l
'
année en cours.
Dans tous les cas, efface les validations de l
'
année en cours.
(commite la session.)
(commite la session.)
"""
"""
...
@@ -952,6 +955,17 @@ class DecisionsProposeesAnnee(DecisionsProposees):
...
@@ -952,6 +955,17 @@ class DecisionsProposeesAnnee(DecisionsProposees):
msg
=
f
"
Validation année BUT
{
self
.
annee_but
}
: effacée
"
,
msg
=
f
"
Validation année BUT
{
self
.
annee_but
}
: effacée
"
,
)
)
# Efface les validations de DUT120 issues du semestre d'origine du deca.
for
validation
in
ValidationDUT120
.
query
.
filter_by
(
etudid
=
self
.
etud
.
id
,
formsemestre_id
=
self
.
formsemestre
.
id
):
db
.
session
.
delete
(
validation
)
Scolog
.
logdb
(
"
jury_but
"
,
etudid
=
self
.
etud
.
id
,
msg
=
"
Validation DUT120 effacée
"
,
)
# Efface éventuelles validations de semestre
# Efface éventuelles validations de semestre
# (en principe inutilisées en BUT)
# (en principe inutilisées en BUT)
# et autres UEs (en cas de changement d'architecture de formation depuis le jury ?)
# et autres UEs (en cas de changement d'architecture de formation depuis le jury ?)
...
@@ -1214,13 +1228,12 @@ class DecisionsProposeesRCUE(DecisionsProposees):
...
@@ -1214,13 +1228,12 @@ class DecisionsProposeesRCUE(DecisionsProposees):
code
=
code
,
code
=
code
,
)
)
db
.
session
.
add
(
self
.
validation
)
db
.
session
.
add
(
self
.
validation
)
db
.
session
.
commit
()
Scolog
.
logdb
(
Scolog
.
logdb
(
method
=
"
jury_but
"
,
method
=
"
jury_but
"
,
etudid
=
self
.
etud
.
id
,
etudid
=
self
.
etud
.
id
,
msg
=
f
"
Validation
{
self
.
rcue
}
:
{
code
}
"
,
msg
=
f
"
Validation
{
self
.
rcue
}
:
{
code
}
"
,
commit
=
True
,
)
)
db
.
session
.
commit
()
log
(
f
"
rcue.record
{
self
}
:
{
code
}
"
)
log
(
f
"
rcue.record
{
self
}
:
{
code
}
"
)
# Modifie au besoin les codes d'UE
# Modifie au besoin les codes d'UE
...
@@ -1633,13 +1646,12 @@ class DecisionsProposeesUE(DecisionsProposees):
...
@@ -1633,13 +1646,12 @@ class DecisionsProposeesUE(DecisionsProposees):
moy_ue
=
self
.
moy_ue
,
moy_ue
=
self
.
moy_ue
,
)
)
db
.
session
.
add
(
self
.
validation
)
db
.
session
.
add
(
self
.
validation
)
db
.
session
.
commit
()
Scolog
.
logdb
(
Scolog
.
logdb
(
method
=
"
jury_but
"
,
method
=
"
jury_but
"
,
etudid
=
self
.
etud
.
id
,
etudid
=
self
.
etud
.
id
,
msg
=
f
"
Validation UE
{
self
.
ue
.
id
}
{
self
.
ue
.
acronyme
}
(
{
self
.
moy_ue
}
):
{
code
}
"
,
msg
=
f
"
Validation UE
{
self
.
ue
.
id
}
{
self
.
ue
.
acronyme
}
(
{
self
.
moy_ue
}
):
{
code
}
"
,
commit
=
True
,
)
)
db
.
session
.
commit
()
log
(
f
"
DecisionsProposeesUE: recording
{
self
.
validation
}
"
)
log
(
f
"
DecisionsProposeesUE: recording
{
self
.
validation
}
"
)
sco_cache
.
invalidate_formsemestre
(
formsemestre_id
=
self
.
formsemestre
.
id
)
sco_cache
.
invalidate_formsemestre
(
formsemestre_id
=
self
.
formsemestre
.
id
)
...
...
This diff is collapsed.
Click to expand it.
app/but/jury_dut120.py
+
8
−
5
View file @
2720fe0b
...
@@ -18,9 +18,7 @@ from wtforms import SubmitField
...
@@ -18,9 +18,7 @@ from wtforms import SubmitField
from
app
import
db
,
log
from
app
import
db
,
log
from
app.but
import
cursus_but
from
app.but
import
cursus_but
from
app.decorators
import
scodoc
,
permission_required
from
app.decorators
import
scodoc
,
permission_required
from
app.models.but_validations
import
ValidationDUT120
from
app.models
import
FormSemestre
,
Identite
,
Scolog
,
ValidationDUT120
from
app.models.etudiants
import
Identite
from
app.models.formsemestre
import
FormSemestre
from
app.scodoc.sco_exceptions
import
ScoPermissionDenied
,
ScoValueError
from
app.scodoc.sco_exceptions
import
ScoPermissionDenied
,
ScoValueError
from
app.scodoc.sco_permissions
import
Permission
from
app.scodoc.sco_permissions
import
Permission
from
app.views
import
notes_bp
as
bp
from
app.views
import
notes_bp
as
bp
...
@@ -71,7 +69,7 @@ def validate_dut120_etud(etudid: int, formsemestre_id: int):
...
@@ -71,7 +69,7 @@ def validate_dut120_etud(etudid: int, formsemestre_id: int):
form
=
ValidationDUT120Form
()
form
=
ValidationDUT120Form
()
# Check if ValidationDUT120 instance already exists
# Check if ValidationDUT120 instance already exists
existing_validation
=
ValidationDUT120
.
query
.
filter_by
(
existing_validation
=
ValidationDUT120
.
query
.
filter_by
(
etudid
=
etudid
,
referentiel_competence_id
=
refcomp
.
id
etudid
=
etud
.
id
,
referentiel_competence_id
=
refcomp
.
id
).
first
()
).
first
()
if
existing_validation
:
if
existing_validation
:
flash
(
"
DUT120 déjà validé
"
,
"
info
"
)
flash
(
"
DUT120 déjà validé
"
,
"
info
"
)
...
@@ -85,11 +83,16 @@ def validate_dut120_etud(etudid: int, formsemestre_id: int):
...
@@ -85,11 +83,16 @@ def validate_dut120_etud(etudid: int, formsemestre_id: int):
if
etud_can_validate_dut
and
request
.
method
==
"
POST
"
and
form
.
validate_on_submit
():
if
etud_can_validate_dut
and
request
.
method
==
"
POST
"
and
form
.
validate_on_submit
():
new_validation
=
ValidationDUT120
(
new_validation
=
ValidationDUT120
(
etudid
=
etudid
,
etudid
=
etud
.
id
,
referentiel_competence_id
=
refcomp
.
id
,
referentiel_competence_id
=
refcomp
.
id
,
formsemestre_id
=
formsemestre
.
id
,
# Replace with appropriate value
formsemestre_id
=
formsemestre
.
id
,
# Replace with appropriate value
)
)
db
.
session
.
add
(
new_validation
)
db
.
session
.
add
(
new_validation
)
Scolog
.
logdb
(
"
jury_but
"
,
etudid
=
etud
.
id
,
msg
=
f
"
Validation DUT120 enregistrée depuis S
{
formsemestre
.
semestre_id
}
"
,
)
db
.
session
.
commit
()
db
.
session
.
commit
()
log
(
f
"
ValidationDUT120 enregistrée pour
{
etud
}
depuis
{
formsemestre
}
"
)
log
(
f
"
ValidationDUT120 enregistrée pour
{
etud
}
depuis
{
formsemestre
}
"
)
flash
(
"
Validation DUT120 enregistrée
"
,
"
success
"
)
flash
(
"
Validation DUT120 enregistrée
"
,
"
success
"
)
...
...
This diff is collapsed.
Click to expand it.
app/models/validations.py
+
1
−
1
View file @
2720fe0b
...
@@ -186,7 +186,7 @@ class ScolarAutorisationInscription(db.Model):
...
@@ -186,7 +186,7 @@ class ScolarAutorisationInscription(db.Model):
origin_formsemestre_id
:
int
,
origin_formsemestre_id
:
int
,
semestre_id
:
int
,
semestre_id
:
int
,
):
):
"""
Ajoute une autorisation
"""
"""
Ajoute une autorisation
(don
'
t commit)
"""
autorisation
=
cls
(
autorisation
=
cls
(
etudid
=
etudid
,
etudid
=
etudid
,
formation_code
=
formation_code
,
formation_code
=
formation_code
,
...
...
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