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
4aa30a40
Commit
4aa30a40
authored
1 year ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Fix: front&back saisie note sur DEM
parent
03c03f37
Branches
Branches containing commit
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_saisie_notes.py
+8
-4
8 additions, 4 deletions
app/scodoc/sco_saisie_notes.py
app/static/js/saisie_notes.js
+3
-1
3 additions, 1 deletion
app/static/js/saisie_notes.js
with
11 additions
and
5 deletions
app/scodoc/sco_saisie_notes.py
+
8
−
4
View file @
4aa30a40
...
...
@@ -68,7 +68,6 @@ from app.scodoc import sco_excel
from
app.scodoc
import
sco_formsemestre_inscriptions
from
app.scodoc
import
sco_groups
from
app.scodoc
import
sco_groups_view
from
app.scodoc
import
sco_permissions_check
from
app.scodoc
import
sco_undo_notes
import
app.scodoc.notesdb
as
ndb
from
app.scodoc.TrivialFormulator
import
TrivialFormulator
,
TF
...
...
@@ -531,7 +530,7 @@ def notes_add(
Return: tuple (etudids_changed, nb_suppress, etudids_with_decision)
"""
assert
evaluation_id
is
not
None
evaluation
=
Evaluation
.
get_evaluation
(
evaluation_id
)
now
=
psycopg2
.
Timestamp
(
*
time
.
localtime
()[:
6
])
# Vérifie inscription et valeur note
...
...
@@ -541,10 +540,16 @@ def notes_add(
evaluation_id
,
getallstudents
=
True
,
include_demdef
=
True
)
}
# Les étudiants inscrits au semestre ni DEM ni DEF
etudids_actifs
=
evaluation
.
moduleimpl
.
formsemestre
.
etudids_actifs
for
etudid
,
value
in
notes
:
if
check_inscription
and
(
etudid
not
in
inscrits
):
if
check_inscription
and
(
(
etudid
not
in
inscrits
)
or
(
etudid
not
in
etudids_actifs
)
):
log
(
f
"
notes_add:
{
etudid
}
non inscrit ou DEM/DEF: aborting
"
)
raise
NoteProcessError
(
f
"
étudiant
{
etudid
}
non inscrit dans ce module
"
)
if
(
value
is
not
None
)
and
not
isinstance
(
value
,
float
):
log
(
f
"
notes_add:
{
etudid
}
valeur de note invalide (
{
value
}
): aborting
"
)
raise
NoteProcessError
(
f
"
etudiant
{
etudid
}
: valeur de note invalide (
{
value
}
)
"
)
...
...
@@ -555,7 +560,6 @@ def notes_add(
cursor
=
cnx
.
cursor
(
cursor_factory
=
ndb
.
ScoDocCursor
)
etudids_changed
=
[]
nb_suppress
=
0
evaluation
:
Evaluation
=
Evaluation
.
query
.
get_or_404
(
evaluation_id
)
formsemestre
:
FormSemestre
=
evaluation
.
moduleimpl
.
formsemestre
res
:
NotesTableCompat
=
res_sem
.
load_formsemestre_results
(
formsemestre
)
# etudids pour lesquels il y a une decision de jury et que la note change:
...
...
This diff is collapsed.
Click to expand it.
app/static/js/saisie_notes.js
+
3
−
1
View file @
4aa30a40
...
...
@@ -114,7 +114,9 @@ function paste_text(e) {
.
classList
.
contains
(
"
masquer_DEM
"
);
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
!
currentInput
.
disabled
)
{
// skip DEM
currentInput
.
value
=
list
[
i
];
}
var
evt
=
document
.
createEvent
(
"
HTMLEvents
"
);
evt
.
initEvent
(
"
blur
"
,
false
,
true
);
currentInput
.
dispatchEvent
(
evt
);
...
...
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