Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
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
Abdallah Toumji
R6A06
Commits
1d07266c
Commit
1d07266c
authored
3 months ago
by
Abdallah Toumji
Browse files
Options
Downloads
Patches
Plain Diff
Ticket 1018: Linked the js to the page to allow the user to import note
parent
e3cacd9c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/static/js/saisie_notes.js
+22
-0
22 additions, 0 deletions
app/static/js/saisie_notes.js
with
22 additions
and
0 deletions
app/static/js/saisie_notes.js
+
22
−
0
View file @
1d07266c
...
...
@@ -56,6 +56,28 @@ function valid_note(e) {
let
isSaving
=
false
;
// true si requête en cours
// Ticket 1018: Change the stored evaluation data when the user selects a different evaluation to import
let
selectedImportEvaluationData
=
{};
function
set_import_eval
(
e
,
data
)
{
const
eval
=
data
[
e
.
value
];
selectedImportEvaluationData
=
eval
;
}
// Ticket 1018: Import the selected evaluation data into the form thus importing the notes
function
valid_import
()
{
console
.
log
(
'
valid_import
'
,
selectedImportEvaluationData
);
let
noteInputs
=
document
.
querySelectorAll
(
'
#formnotes .note
'
);
noteInputs
.
forEach
(
function
(
input
)
{
const
etudid
=
parseInt
(
input
.
getAttribute
(
'
data-etudid
'
));
const
note
=
selectedImportEvaluationData
[
etudid
];
if
(
note
)
{
// trigger the event listener
input
.
value
=
note
;
}
});
}
async
function
save_note
(
elem
,
v
,
etudid
)
{
let
evaluation_id
=
document
.
querySelector
(
"
#formnotes_evaluation_id
"
).
getAttribute
(
"
value
"
);
let
formsemestre_id
=
document
.
querySelector
(
"
#formnotes_formsemestre_id
"
).
getAttribute
(
"
value
"
);
...
...
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