From 8df133dc0b9595c712ad03b9ea8ecc61ab5521f0 Mon Sep 17 00:00:00 2001 From: Cherif Date: Wed, 27 May 2026 21:52:32 +0200 Subject: [PATCH] 27/05/2026 - 22h00 Signed-off-by: Cherif --- .idea/workspace.xml | 9 ++++----- Log/log_file.log | 38 ++++++++++++++++++++++++++++++++++++++ base_class_calcul_note.py | 29 +++++++++++++++++++++++------ 3 files changed, 65 insertions(+), 11 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9cec01e..aa7ec58 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,8 @@ - @@ -518,6 +516,7 @@ - \ No newline at end of file diff --git a/Log/log_file.log b/Log/log_file.log index 88287af..5283e1b 100644 --- a/Log/log_file.log +++ b/Log/log_file.log @@ -92522,3 +92522,41 @@ WARNING:werkzeug: * Debugger is active! INFO:werkzeug: * Debugger PIN: 479-264-725 INFO:root:2026-05-27 21:45:12.280169 : Security check : IP adresse '127.0.0.1' connected INFO:werkzeug:127.0.0.1 - - [27/May/2026 21:45:12] "GET /myclass/api/Calcul_Moyen_evaluation_participant_note_BC_UE HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\base_class_calcul_note.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-05-27 21:46:52.721536 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-05-27 21:46:52.721536 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-05-27 21:46:52.721536 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-05-27 21:46:52.721536 : ++ FLASK PORT 5001 ++ +INFO:root:2026-05-27 21:46:52.721536 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 479-264-725 +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\base_class_calcul_note.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-05-27 21:48:57.333045 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-05-27 21:48:57.333045 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-05-27 21:48:57.333045 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-05-27 21:48:57.333045 : ++ FLASK PORT 5001 ++ +INFO:root:2026-05-27 21:48:57.334252 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 479-264-725 +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\base_class_calcul_note.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json diff --git a/base_class_calcul_note.py b/base_class_calcul_note.py index 4cab2f9..c91e67e 100644 --- a/base_class_calcul_note.py +++ b/base_class_calcul_note.py @@ -3647,7 +3647,8 @@ def Create_work_evaluation_participant_note(diction): """ Verification des input acceptés """ - field_list = ['partner_owner_recid', 'semestre', 'diplome_id', 'domaine_competence_id', 'inscrit_id', 'class_id', 'session_id'] + field_list = ['partner_owner_recid', 'semestre', 'diplome_id', 'domaine_competence_id', 'inscrit_id', 'class_id', 'session_id', + 'rattrapage'] incom_keys = diction.keys() for val in incom_keys: @@ -3672,6 +3673,12 @@ def Create_work_evaluation_participant_note(diction): if ("session_id" in diction.keys() and diction['session_id']): filt_session_id = {'session_id': str(diction['session_id'])} + filt_rattrapage = {} + if ("rattrapage" in diction.keys() and diction['rattrapage'] == "1"): + filt_rattrapage = {'rattrapage': '1'} + else: + filt_rattrapage = {'rattrapage':{'$ne':'1'}} + """ Creation d'un token pour identifier les lignes qui viennes d'etre insérées """ @@ -3682,7 +3689,7 @@ def Create_work_evaluation_participant_note(diction): [ {"partner_owner_recid": str(diction["partner_owner_recid"]), "valide": "1", "locked": "0"}, - filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id] + filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id, filt_rattrapage] } } @@ -3694,7 +3701,7 @@ def Create_work_evaluation_participant_note(diction): [ {"partner_owner_recid": str(diction["partner_owner_recid"]), "valide": "1", "locked": "0"}, - filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id] + filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id, filt_rattrapage] } }, { @@ -3825,7 +3832,7 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction): Verification des input acceptés """ field_list = ['token', 'session_id', 'semestre', 'diplome_id', 'domaine_competence_id', 'inscrit_id', - 'class_id',] + 'class_id', 'rattrapage'] incom_keys = diction.keys() for val in incom_keys: @@ -3884,6 +3891,12 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction): work_collection_diction['diplome_id'] = str(diction['diplome_id']) work_collection_diction['domaine_competence_id'] = str(diction['domaine_competence_id']) + if ("rattrapage" in diction.keys() and diction['rattrapage'] == "1"): + work_collection_diction['rattrapage'] = '1' + else: + work_collection_diction['rattrapage'] = '0' + + local_status, local_retval, code_action = Create_work_evaluation_participant_note(work_collection_diction) if( local_status is False): return local_status, local_retval @@ -3996,7 +4009,11 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction): if ("domaine_competence_id" in diction.keys() and diction['domaine_competence_id']): filt_domaine_competence_id = {'domaine_competence_id': str(diction['domaine_competence_id'])} - + filt_rattrapage = {} + if ("rattrapage" in diction.keys() and diction['rattrapage'] == "1"): + filt_rattrapage = {'rattrapage': '1'} + else: + filt_rattrapage = {'rattrapage':{'$ne':'1'}} """ @@ -4157,7 +4174,7 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction): qry_select_note['code_action'] = str(code_action) new_query_note = {'$and': [ - qry_select_note, filt_diplome_id, filt_domaine_competence_id]} + qry_select_note, filt_diplome_id, filt_domaine_competence_id, filt_rattrapage]} #print(" new_query_note0002 = ", new_query_note) existe_ligne_node = MYSY_GV.dbname['work_evaluation_participant_note'].count_documents(new_query_note)