07/05/2025 - 20h

Signed-off-by: cherif <cherif.balde@yahoo.fr>
master
cherif 2025-05-07 19:53:12 +02:00
parent 638b9d8fc3
commit 3bab104eab
5 changed files with 1235 additions and 24 deletions

View File

@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="05/05/2025 - 20h"> <list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="06/05/2025 - 20h">
<change afterPath="$PROJECT_DIR$/jury_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <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$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" 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$/base_class_calcul_note.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_class_calcul_note.py" 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$/equipe_team_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/equipe_team_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/jury_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/jury_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/unite_enseignement_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/unite_enseignement_mgt.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -85,13 +83,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1680804787304</updated> <updated>1680804787304</updated>
</task> </task>
<task id="LOCAL-00405" summary="07/10/2024 - 20h30">
<created>1728325045729</created>
<option name="number" value="00405" />
<option name="presentableId" value="LOCAL-00405" />
<option name="project" value="LOCAL" />
<updated>1728325045730</updated>
</task>
<task id="LOCAL-00406" summary="12/10/204 - 18h"> <task id="LOCAL-00406" summary="12/10/204 - 18h">
<created>1728748684571</created> <created>1728748684571</created>
<option name="number" value="00406" /> <option name="number" value="00406" />
@ -428,7 +419,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1746464819662</updated> <updated>1746464819662</updated>
</task> </task>
<option name="localTasksCounter" value="454" /> <task id="LOCAL-00454" summary="06/05/2025 - 20h">
<created>1746547123112</created>
<option name="number" value="00454" />
<option name="presentableId" value="LOCAL-00454" />
<option name="project" value="LOCAL" />
<updated>1746547123112</updated>
</task>
<option name="localTasksCounter" value="455" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
@ -470,7 +468,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="03/01/2025 - 17h30" />
<MESSAGE value="04/01/2025 - 14h48" /> <MESSAGE value="04/01/2025 - 14h48" />
<MESSAGE value="16/01/2025 - 16h30" /> <MESSAGE value="16/01/2025 - 16h30" />
<MESSAGE value="17/01/2025 - 15:30" /> <MESSAGE value="17/01/2025 - 15:30" />
@ -495,6 +492,7 @@
<MESSAGE value="02/05/2025 - 20h" /> <MESSAGE value="02/05/2025 - 20h" />
<MESSAGE value="03/05/2025 - 20h" /> <MESSAGE value="03/05/2025 - 20h" />
<MESSAGE value="05/05/2025 - 20h" /> <MESSAGE value="05/05/2025 - 20h" />
<option name="LAST_COMMIT_MESSAGE" value="05/05/2025 - 20h" /> <MESSAGE value="06/05/2025 - 20h" />
<option name="LAST_COMMIT_MESSAGE" value="06/05/2025 - 20h" />
</component> </component>
</project> </project>

View File

@ -671,7 +671,8 @@ Par defaut il en y a 2 :
- ressource_humaine et - ressource_humaine et
- ressource_materielle - ressource_materielle
""" """
ALLOWED_AGENDA_RELATED_COLLECTION = ['ressource_humaine', 'ressource_materielle', 'inscription', 'apprenant'] ALLOWED_AGENDA_RELATED_COLLECTION = ['ressource_humaine', 'ressource_materielle', 'inscription',
'apprenant', 'jury']
""" """
Les types de location pour une session (intra ou extra ou autre) Les types de location pour une session (intra ou extra ou autre)

File diff suppressed because it is too large Load Diff

View File

@ -104,7 +104,7 @@ def Add_Equipe_Team(diction):
'locked':'0', 'locked':'0',
'partner_recid':str(my_partner['recid'])}) 'partner_recid':str(my_partner['recid'])})
if( is_chef_equipe_id_count != 0 ): if( is_chef_equipe_id_count != 1 ):
mycommon.myprint( mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant du chef d'équipe est invalide ") str(inspect.stack()[0][3]) + " L'identifiant du chef d'équipe est invalide ")
return False, " L'identifiant du chef d'équipe est invalide " return False, " L'identifiant du chef d'équipe est invalide "
@ -582,7 +582,7 @@ def Update_Equipe_Team(diction):
'valide': '1', 'valide': '1',
'partner_owner_recid': str(my_partner['recid'])}) 'partner_owner_recid': str(my_partner['recid'])})
if (is_existe_cdtion_paiement < 0): if (is_existe_cdtion_paiement != 1):
mycommon.myprint( mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant de l'équipe est invalide ") str(inspect.stack()[0][3]) + " L'identifiant de l'équipe est invalide ")
return False, " L'identifiant l'équipe est invalide " return False, " L'identifiant l'équipe est invalide "
@ -610,7 +610,7 @@ def Update_Equipe_Team(diction):
'locked': '0', 'locked': '0',
'partner_recid': str(my_partner['recid'])}) 'partner_recid': str(my_partner['recid'])})
if (is_chef_equipe_id_count <= 0): if (is_chef_equipe_id_count !=1 ):
mycommon.myprint( mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant du chef d'équipe est invalide ") str(inspect.stack()[0][3]) + " L'identifiant du chef d'équipe est invalide ")
return False, " L'identifiant du chef d'équipe est invalide " return False, " L'identifiant du chef d'équipe est invalide "
@ -782,7 +782,7 @@ def Delete_Equipe_Team(diction):
'valide': '1', 'valide': '1',
'partner_owner_recid': str(my_partner['recid'])}) 'partner_owner_recid': str(my_partner['recid'])})
if (is_existe_equipe_team < 0): if (is_existe_equipe_team != 1):
mycommon.myprint( mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant de l'équipe est invalide ") str(inspect.stack()[0][3]) + " L'identifiant de l'équipe est invalide ")
return False, " L'identifiant de l'équipe est invalide " return False, " L'identifiant de l'équipe est invalide "

View File

@ -60,7 +60,8 @@ def Add_Jury(diction):
""" """
Verification des input acceptés Verification des input acceptés
""" """
field_list = ['token', 'code', 'description', 'comment', 'responsable_id', 'session_id' ] field_list = ['token', 'code', 'description', 'comment', 'responsable_id',
'session_id', 'email_jury', 'chef_jury_id' ]
incom_keys = diction.keys() incom_keys = diction.keys()
for val in incom_keys: for val in incom_keys:
@ -128,6 +129,30 @@ def Add_Jury(diction):
return False, " L'identifiant de la session (class) est invalide " return False, " L'identifiant de la session (class) est invalide "
# Verifier si le chef d'equipe existe
if ("chef_jury_id" in diction.keys() and diction['chef_jury_id']):
# Verifier que l'id du chef d'equipe est valide
is_chef_equipe_id_count = MYSY_GV.dbname['ressource_humaine'].count_documents(
{'_id': ObjectId(str(diction['chef_jury_id'])),
'valide': '1',
'locked': '0',
'partner_recid': str(my_partner['recid'])})
if (is_chef_equipe_id_count != 1):
mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant du chef du jury est invalide ")
return False, " L'identifiant du chef du jury est invalide "
if ("email_jury" in diction.keys() and diction['email_jury']):
if (mycommon.isEmailValide(str(diction['email_jury'])) is False):
mycommon.myprint(
str(inspect.stack()[0][3]) + " L'adresse email du jury est invalide ")
return False, " L'adresse email du jury est invalide "
mytoken = diction['token'] mytoken = diction['token']
new_data = diction new_data = diction
del diction['token'] del diction['token']
@ -150,6 +175,48 @@ def Add_Jury(diction):
" Impossible de créer le jury (2) ") " Impossible de créer le jury (2) ")
return False, " Impossible de créer le jury (2) " return False, " Impossible de créer le jury (2) "
"""
Après la création du jury, on ajoute le chef d'équipe dans liste de membres
"""
if( "chef_jury_id" in diction.keys() and diction['chef_jury_id']):
new_data = {}
new_data['jury_id'] = str(inserted_id)
new_data['rh_id'] = str(diction['chef_jury_id'])
now = str(datetime.now())
mytoday = datetime.today()
new_data['date_ajout_jury'] = str(mytoday)
new_data['date_update'] = now
new_data['valide'] = "1"
new_data['locked'] = "0"
new_data['partner_owner_recid'] = str(my_partner['recid'])
new_data['update_by'] = str(my_partner['_id'])
new_data['leader'] = "1"
data_cle = {}
data_cle['partner_owner_recid'] = str(my_partner['recid'])
data_cle['jury_id'] = str(diction['_id'])
data_cle['rh_id'] = str(diction['chef_jury_id'])
data_cle['valide'] = "1"
data_cle['locked'] = "0"
result = MYSY_GV.dbname['jury_membre'].find_one_and_update(
data_cle,
{"$set": new_data},
upsert=True,
return_document=ReturnDocument.AFTER
)
if (result is None or "_id" not in result.keys()):
mycommon.myprint(
" WARNING : Impossible d'ajouter le chef d'équipe")
""" """
## Add to log history ## Add to log history
""" """
@ -547,7 +614,7 @@ def Update_Jury(diction):
'valide': '1', 'valide': '1',
'partner_owner_recid': str(my_partner['recid'])}) 'partner_owner_recid': str(my_partner['recid'])})
if (is_existe_cdtion_paiement < 0): if (is_existe_cdtion_paiement != 1):
mycommon.myprint( mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant de l'équipe est invalide ") str(inspect.stack()[0][3]) + " L'identifiant de l'équipe est invalide ")
return False, " L'identifiant l'équipe est invalide " return False, " L'identifiant l'équipe est invalide "
@ -575,7 +642,7 @@ def Update_Jury(diction):
'locked': '0', 'locked': '0',
'partner_recid': str(my_partner['recid'])}) 'partner_recid': str(my_partner['recid'])})
if (is_chef_jury_id_count <= 0): if (is_chef_jury_id_count != 1):
mycommon.myprint( mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant du chef d'équipe est invalide ") str(inspect.stack()[0][3]) + " L'identifiant du chef d'équipe est invalide ")
return False, " L'identifiant du chef d'équipe est invalide " return False, " L'identifiant du chef d'équipe est invalide "
@ -748,7 +815,7 @@ def Delete_Jury(diction):
'valide': '1', 'valide': '1',
'partner_owner_recid': str(my_partner['recid'])}) 'partner_owner_recid': str(my_partner['recid'])})
if (is_existe_jury < 0): if (is_existe_jury != 1):
mycommon.myprint( mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant du jury est invalide ") str(inspect.stack()[0][3]) + " L'identifiant du jury est invalide ")
return False, " L'identifiant du jury est invalide " return False, " L'identifiant du jury est invalide "
@ -1261,3 +1328,4 @@ def Get_List_jury_With_Filter(diction):
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
return False, " Impossible de récupérer la liste jury " return False, " Impossible de récupérer la liste jury "