08/05/2025 - 14h

Signed-off-by: cherif <cherif.balde@yahoo.fr>
master
cherif 2025-05-08 14:07:40 +02:00
parent 3bab104eab
commit 2596ffa493
6 changed files with 1542 additions and 36 deletions

View File

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="06/05/2025 - 20h">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="07/05/2025 - 20h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/equipe_team_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/equipe_team_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jury_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/jury_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/base_class_calcul_note.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_class_calcul_note.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/unite_enseignement_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/unite_enseignement_mgt.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -83,13 +84,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00406" summary="12/10/204 - 18h">
<created>1728748684571</created>
<option name="number" value="00406" />
<option name="presentableId" value="LOCAL-00406" />
<option name="project" value="LOCAL" />
<updated>1728748684572</updated>
</task>
<task id="LOCAL-00407" summary="13/10/2024 - 14h">
<created>1728819518236</created>
<option name="number" value="00407" />
@ -426,7 +420,14 @@
<option name="project" value="LOCAL" />
<updated>1746547123112</updated>
</task>
<option name="localTasksCounter" value="455" />
<task id="LOCAL-00455" summary="07/05/2025 - 20h">
<created>1746640393073</created>
<option name="number" value="00455" />
<option name="presentableId" value="LOCAL-00455" />
<option name="project" value="LOCAL" />
<updated>1746640393073</updated>
</task>
<option name="localTasksCounter" value="456" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -468,7 +469,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="04/01/2025 - 14h48" />
<MESSAGE value="16/01/2025 - 16h30" />
<MESSAGE value="17/01/2025 - 15:30" />
<MESSAGE value="18/01/2025 - 17h" />
@ -493,6 +493,7 @@
<MESSAGE value="03/05/2025 - 20h" />
<MESSAGE value="05/05/2025 - 20h" />
<MESSAGE value="06/05/2025 - 20h" />
<option name="LAST_COMMIT_MESSAGE" value="06/05/2025 - 20h" />
<MESSAGE value="07/05/2025 - 20h" />
<option name="LAST_COMMIT_MESSAGE" value="07/05/2025 - 20h" />
</component>
</project>

View File

@ -1449,7 +1449,7 @@ def GetAllClassStagiaire(diction):
"""
Verification de la liste des champs obligatoires
"""
field_list_obligatoire = ['token', 'class_internal_url', 'session_id']
field_list_obligatoire = ['token', 'session_id']
for val in field_list_obligatoire:
if val not in diction:
mycommon.myprint(
@ -1474,10 +1474,12 @@ def GetAllClassStagiaire(diction):
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de récupérer la liste des stagiaires, ")
return False, "Impossible de récupérer la liste des stagiaires, Les informations d'identification sont incorrectes "
"""
class_internal_url = ""
if ("class_internal_url" in diction.keys()):
if diction['class_internal_url']:
class_internal_url = diction['class_internal_url']
"""
session_id = ""
if ("session_id" in diction.keys()):
@ -1494,7 +1496,7 @@ def GetAllClassStagiaire(diction):
coll_session = MYSY_GV.dbname['inscription']
myquery = {}
myquery['session_id'] = session_id
myquery['class_internal_url'] = class_internal_url
#myquery['class_internal_url'] = class_internal_url
if(len(status) > 0 ):
myquery['status'] = status
@ -1621,6 +1623,8 @@ def GetAllClassStagiaire(diction):
return False, "Impossible de récupérer la liste des stagiaires de la formation"
"""
Cette fonction envoie l'email de confirmation d'une inscription a une formation.

File diff suppressed because it is too large Load Diff

View File

@ -796,7 +796,7 @@ def GetSessionFormation(diction):
'from': 'myclass',
'localField': 'class_internal_url',
'foreignField': 'internal_url',
'pipeline': [{'$project': {'title': 1, 'lms_class_code':1, 'external_code':1, 'published':1, 'recyclage_delai':1, 'recyclage_periodicite':1,
'pipeline': [{'$project': {'title': 1, '_id':1, 'lms_class_code':1, 'external_code':1, 'published':1, 'recyclage_delai':1, 'recyclage_periodicite':1,
'lms_class_code':1}}],
'as': 'myclass'
}
@ -815,6 +815,7 @@ def GetSessionFormation(diction):
nb_val = nb_val + 1
title = ""
lms_class_code = ""
class_id = ""
class_external_code = ""
class_ispublished = "0"
class_lms_class_code = ""
@ -823,6 +824,9 @@ def GetSessionFormation(diction):
if ('myclass' in retval.keys() and len(retval['myclass']) > 0):
if ("_id" in retval['myclass'][0].keys()):
class_id = retval['myclass'][0]['_id']
if( "title" in retval['myclass'][0].keys()):
title = retval['myclass'][0]['title']
@ -840,6 +844,7 @@ def GetSessionFormation(diction):
if ("lms_class_code" in retval['myclass'][0].keys()):
class_lms_class_code = retval['myclass'][0]['lms_class_code']
user['class_id'] = class_id
user['title'] = title
user['lms_class_code'] = lms_class_code
user['class_external_code'] = class_external_code
@ -992,14 +997,14 @@ def Get_Given_SessionFormation_From_Id(diction):
'from': 'myclass',
'localField': 'class_internal_url',
'foreignField': 'internal_url',
'pipeline': [{'$project': {'title': 1, 'lms_class_code':1, 'external_code':1, 'published':1, 'recyclage_delai':1, 'recyclage_periodicite':1,
'pipeline': [{'$project': {'title': 1, '_id':1, 'lms_class_code':1, 'external_code':1, 'published':1, 'recyclage_delai':1, 'recyclage_periodicite':1,
'lms_class_code':1}}],
'as': 'myclass'
}
}
]
print(" ##### myquery Get_Given_SessionFormation_From_Is = "+str(myquery))
#print(" ##### myquery Get_Given_SessionFormation_From_Is = "+str(myquery))
RetObject = []
nb_val = 0
@ -1011,12 +1016,16 @@ def Get_Given_SessionFormation_From_Id(diction):
nb_val = nb_val + 1
title = ""
lms_class_code = ""
class_id = ""
class_external_code = ""
class_ispublished = "0"
class_lms_class_code = ""
if ('myclass' in retval.keys() and len(retval['myclass']) > 0):
if ("_id" in retval['myclass'][0].keys()):
class_id = str(retval['myclass'][0]['_id'])
if( "title" in retval['myclass'][0].keys()):
title = retval['myclass'][0]['title']
@ -1034,6 +1043,7 @@ def Get_Given_SessionFormation_From_Id(diction):
if ("lms_class_code" in retval['myclass'][0].keys()):
class_lms_class_code = retval['myclass'][0]['lms_class_code']
user['class_id'] = class_id
user['title'] = title
user['lms_class_code'] = lms_class_code
user['class_external_code'] = class_external_code
@ -1486,7 +1496,8 @@ def GetAllValideSessionPartner_List(diction):
'pipeline': [{'$match': filt_class_partner_recid}, {'$project': {'title': 1, 'domaine': 1,
'duration': 1, 'duration_unit': 1, 'external_code':1,
'published':1, 'recyclage_delai':1, 'recyclage_periodicite':1,
'lms_class_code':1}}],
'lms_class_code':1,
'_id':1}}],
'as': 'myclass_collection'
}
}
@ -1499,7 +1510,8 @@ def GetAllValideSessionPartner_List(diction):
val = {}
val['id'] = str(cpt)
cpt = cpt + 1
val['class_internal_url'] = retVal['class_internal_url']
val['class_internal_url'] = retVal['myclass_collection']['class_internal_url']
val['class_id'] = retVal['myclass_collection']['_id']
val['_id'] = retVal['_id']
val['code_session'] = retVal['code_session']
@ -1849,7 +1861,8 @@ def GetAllValideSessionPartner_List_filter_like(diction):
'localField': 'class_internal_url',
'foreignField': 'internal_url',
'pipeline': [{'$match': { '$and' : [ filt_class_title, filt_class_internal_url, filt_class_external_code, {'partner_owner_recid':str(my_partner['recid'])} ]} }, {'$project': {'title': 1, 'domaine':1,
'duration':1, 'duration_unit':1, 'external_code':1, 'recyclage_delai':1, 'recyclage_periodicite':1,
'duration':1, 'duration_unit':1, 'external_code':1, 'recyclage_delai':1, '_id':1,
'recyclage_periodicite':1,
'lms_class_code':1}}],
'as': 'myclass_collection'
}
@ -1867,6 +1880,7 @@ def GetAllValideSessionPartner_List_filter_like(diction):
cpt = cpt + 1
val['_id'] = retVal['_id']
val['class_internal_url'] = retVal['class_internal_url']
val['class_id'] = str(retVal['myclass_collection']['_id'])
val['code_session'] = retVal['code_session']
if ("titre" in retVal.keys()):
@ -2202,13 +2216,14 @@ def GetAllValideSessionPartner_List_no_filter(diction):
'pipeline': [{'$match': {'partner_owner_recid': str(my_partner['recid'])} },
{'$project': {'title': 1, 'domaine': 1,
'duration': 1, 'duration_unit': 1, 'external_code':1, 'recyclage_delai':1, 'recyclage_periodicite':1,
'lms_class_code':1}}],
'lms_class_code':1,
'_id':1}}],
'as': 'myclass_collection'
}
}
]
print("#### GetAllValideSessionPartner_List_filter_likequery = ", query)
#print("#### GetAllValideSessionPartner_List_filter_likequery = ", query)
RetObject = []
cpt = 0
for retVal in MYSY_GV.dbname['session_formation'].aggregate(query):
@ -2218,6 +2233,7 @@ def GetAllValideSessionPartner_List_no_filter(diction):
cpt = cpt + 1
val['_id'] = retVal['_id']
val['class_internal_url'] = retVal['class_internal_url']
val['class_id'] = str(retVal['myclass_collection']['_id'])
val['code_session'] = retVal['code_session']
if ("titre" in retVal.keys()):
@ -12951,7 +12967,7 @@ def Invoice_Create_Secure_E_Document(diction):
'pipeline': [{'$match': {'$and': [filt_class_partner_recid]}},
{'$project': {'title': 1, 'domaine': 1,
'duration': 1,
'duration_unit': 1,
'duration_unit': 1, '_id':1,
'external_code': 1,'recyclage_delai':1, 'recyclage_periodicite':1,
'lms_class_code':1}}],
'as': 'myclass_collection'
@ -12967,6 +12983,7 @@ def Invoice_Create_Secure_E_Document(diction):
user['id'] = str(val_tmp)
val_tmp = val_tmp + 1
user['_id'] = retval['_id']
user['order_line_formation'] = retval['order_line_formation']
user['order_line_qty'] = retval['order_line_qty']
user['order_line_prix_unitaire'] = retval['order_line_prix_unitaire']
@ -13023,6 +13040,7 @@ def Invoice_Create_Secure_E_Document(diction):
else:
user['order_line_comment'] = ""
user['class_id'] = retval['myclass_collection'][0]['_id']
user['title'] = retval['myclass_collection'][0]['title']
user['order_line_formation_external_code'] = retval['myclass_collection'][0]['external_code']
@ -14806,5 +14824,3 @@ def Get_Given_SessionFormation_List_Automatic_Traitement_From(diction):
return False, "Impossible de récupérer la session de formation"
"""
Cette fonction recuperer """

View File

@ -821,7 +821,7 @@ def Get_List_Evaluation_Final_Note_Classement_Detail_With_Filter(diction):
"""
Verification des input acceptés
"""
field_list = ['token','class_external_code', 'tab_ue_id', 'tab_session_id']
field_list = ['token','class_external_code', 'tab_ue_id', 'tab_session_id', 'tab_inscrit_id']
incom_keys = diction.keys()
for val in incom_keys:
@ -866,8 +866,11 @@ def Get_List_Evaluation_Final_Note_Classement_Detail_With_Filter(diction):
if (len(tab_ue_id) > 0):
filt_ue_id = {'ue_id': {'$in': tab_ue_id}}
filt_inscrit_id = {}
if ("tab_inscrit_id" in diction.keys()):
tab_inscrit_id = str(diction['tab_inscrit_id']).split(",")
if (len(tab_inscrit_id) > 0):
filt_inscrit_id = {'inscription_id': {'$in': tab_inscrit_id}}
"""
Clés de mise à jour
"""
@ -876,7 +879,8 @@ def Get_List_Evaluation_Final_Note_Classement_Detail_With_Filter(diction):
data_cle['valide'] = "1"
data_cle['locked'] = "0"
query = {"$and": [filt_session_id, filt_ue_id, data_cle]}
query = {"$and": [filt_session_id, filt_ue_id, data_cle, filt_inscrit_id]}
RetObject = []
val_tmp = 0
@ -956,7 +960,7 @@ def Get_List_Evaluation_UE_Note_Classement_With_Filter(diction):
"""
Verification des input acceptés
"""
field_list = ['token','class_external_code', 'tab_ue_id', 'tab_session_id']
field_list = ['token','class_external_code', 'tab_ue_id', 'tab_session_id', 'tab_inscrit_id']
incom_keys = diction.keys()
for val in incom_keys:
@ -1001,7 +1005,11 @@ def Get_List_Evaluation_UE_Note_Classement_With_Filter(diction):
if (len(tab_ue_id) > 0):
filt_ue_id = {'ue_id': {'$in': tab_ue_id}}
filt_inscrit_id = {}
if ("tab_inscrit_id" in diction.keys()):
tab_inscrit_id = str(diction['tab_inscrit_id']).split(",")
if (len(tab_inscrit_id) > 0):
filt_inscrit_id = {'inscription_id': {'$in': tab_inscrit_id}}
"""
Clés de mise à jour
@ -1011,7 +1019,9 @@ def Get_List_Evaluation_UE_Note_Classement_With_Filter(diction):
data_cle['valide'] = "1"
data_cle['locked'] = "0"
query = {"$and": [filt_session_id, filt_ue_id, data_cle]}
query = {"$and": [filt_session_id, filt_ue_id, data_cle, filt_inscrit_id]}
RetObject = []
val_tmp = 0

View File

@ -181,8 +181,6 @@ def Update_Unite_Enseignement(diction):
try:
diction = mycommon.strip_dictionary(diction)
print(" ### diction = ", diction)
"""
Verification des input acceptés