23/05/2025 - 12h

Signed-off-by: cherif <cherif.balde@yahoo.fr>
master
cherif 2025-05-23 12:03:50 +02:00
parent 24f6f6caca
commit 80ddcd2a4d
4 changed files with 6483 additions and 15 deletions

View File

@ -1,7 +1,7 @@
<?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="20/05/2025 - 21hu">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="20/05/2025 - 21dhu">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/jury_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/jury_mgt.py" afterDir="false" />
@ -82,13 +82,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00419" summary="24/12/2024 - 22h">
<created>1735075121021</created>
<option name="number" value="00419" />
<option name="presentableId" value="LOCAL-00419" />
<option name="project" value="LOCAL" />
<updated>1735075121021</updated>
</task>
<task id="LOCAL-00420" summary="25/12/2024 - 14h">
<created>1735132675184</created>
<option name="number" value="00420" />
@ -425,7 +418,14 @@
<option name="project" value="LOCAL" />
<updated>1747856760931</updated>
</task>
<option name="localTasksCounter" value="468" />
<task id="LOCAL-00468" summary="20/05/2025 - 21dhu">
<created>1747928501759</created>
<option name="number" value="00468" />
<option name="presentableId" value="LOCAL-00468" />
<option name="project" value="LOCAL" />
<updated>1747928501759</updated>
</task>
<option name="localTasksCounter" value="469" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -467,7 +467,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="18/02/2025 - 21h" />
<MESSAGE value="27/02/2025 - 21h" />
<MESSAGE value="04/03/2025 - 21h" />
<MESSAGE value="05/03/2025 - 18h" />
@ -492,6 +491,7 @@
<MESSAGE value="20/05/2025 - 17h" />
<MESSAGE value="20/05/2025 - 21h" />
<MESSAGE value="20/05/2025 - 21hu" />
<option name="LAST_COMMIT_MESSAGE" value="20/05/2025 - 21hu" />
<MESSAGE value="20/05/2025 - 21dhu" />
<option name="LAST_COMMIT_MESSAGE" value="20/05/2025 - 21dhu" />
</component>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -1930,16 +1930,15 @@ def Add_Update_Apprenant_To_Jury(diction):
" Impossible créer la soutenance et/ou inscrire les personnes (2) ")
return False, " Impossible créer la soutenance et/ou inscrire les personnes (2) ", False, False
cpt = cpt + 1
return True, str(cpt)+ " Membre(s) inscrit(s)", str(agenda_inserted_id), str(soutenance_inserted_id)
return True, "Ajout / Mise à jour soutenance ", str(agenda_inserted_id), str(soutenance_inserted_id)
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
return False, " Impossible créer la soutenance et/ou inscrire les personnes ", False , False
return False, " Impossible créer la soutenance et/ou mettre à jour la soutenance ", False , False
@ -4737,4 +4736,91 @@ def Add_Update_Inscrit_Juy_Promo_Decision(diction):
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
return False, " Impossible de mettre à jour la décision du jury "
return False, " Impossible de mettre à jour la décision du jury "
"""
Cette fonction met à jour les observation du jury sur les notes UE
collection : session_formation_final_note_classement
"""
def Add_Update_UE_Jury_Observation(diction):
try:
diction = mycommon.strip_dictionary(diction)
"""
Verification des input acceptés
"""
field_list = ['token', 'tab_ids', 'jury_observation', 'jury_note', 'jury_validation']
incom_keys = diction.keys()
for val in incom_keys:
if val not in field_list and val.startswith('my_') is False:
mycommon.myprint(str(
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé")
return False, " Les informations fournies sont incorrectes"
"""
Verification des champs obligatoires
"""
field_list_obligatoire = ['token', 'tab_ids', 'jury_observation', 'jury_note', 'jury_validation']
for val in field_list_obligatoire:
if val not in diction:
mycommon.myprint(
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans la liste des arguments ")
return False, " Les informations fournies sont incorrectes"
"""
Verification de l'identité et autorisation de l'entité qui
appelle cette API
"""
token = ""
if ("token" in diction.keys()):
if diction['token']:
token = diction['token']
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
if (local_status is not True):
return local_status, my_partner
tab_ids = ""
tab_ids = []
tab_ids_ObjectId = []
if ("tab_ids" in diction.keys()):
if diction['tab_ids']:
tab_ids = diction['tab_ids']
tab_ids_splited = str(tab_ids).split(",")
# Controle de validité des inscriptions
for my_session_formation_final_note_classement in tab_ids_splited:
if( my_session_formation_final_note_classement):
tab_ids_ObjectId.append(ObjectId(str(my_session_formation_final_note_classement)))
update_data = {}
update_data['date_update'] = str(datetime.now())
update_data['update_by'] = str(my_partner['_id'])
update_data['jury_observation'] = str(diction['jury_observation'])
update_data['jury_note'] = str(diction['jury_note'])
update_data['jury_validation'] = str(diction['jury_validation'])
MYSY_GV.dbname['session_formation_final_note_classement'].update_many({'_id': {'$in' : tab_ids_ObjectId},
'valide': '1',
'partner_owner_recid': str(my_partner['recid']),
},
{'$set': update_data}
)
return True, " La décision du jury été correctement mise à jour"
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
return False, " Impossible de mettre à jour la décision du jury "

12
main.py
View File

@ -12752,6 +12752,18 @@ def Add_Update_Inscrit_Juy_Promo_Decision():
return jsonify(status=status, message=retval)
"""
API pour mettre à jour la decision du jury pour un jury d' UE (pas CAC mais UE)
"""
@app.route('/myclass/api/Add_Update_UE_Jury_Observation/', methods=['POST','GET'])
@crossdomain(origin='*')
def Add_Update_UE_Jury_Observation():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Add_Update_UE_Jury_Observation : payload = ",str(payload))
status, retval = jury_mgt.Add_Update_UE_Jury_Observation( payload)
return jsonify(status=status, message=retval)
if __name__ == '__main__':