13/10/2024 - 14h
parent
6f10281f23
commit
6cf17fa848
|
@ -1,12 +1,19 @@
|
|||
<?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="07/10/2024 - 20h30">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="12/10/204 - 18h">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Collection_Historique.py" beforeDir="false" afterPath="$PROJECT_DIR$/Collection_Historique.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$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/apprenant_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/apprenant_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/notes_apprenant_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/notes_apprenant_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partner_produit_service_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_produit_service_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ressources_materiels.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_materiels.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -76,13 +83,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00357" summary="23/07/2024 - 12h">
|
||||
<created>1721725653358</created>
|
||||
<option name="number" value="00357" />
|
||||
<option name="presentableId" value="LOCAL-00357" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1721725653358</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00358" summary="23/07/2024 - 12h">
|
||||
<created>1721725677746</created>
|
||||
<option name="number" value="00358" />
|
||||
|
@ -419,7 +419,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1728325045730</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="406" />
|
||||
<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>
|
||||
<option name="localTasksCounter" value="407" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -461,7 +468,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="dddqsd" />
|
||||
<MESSAGE value="dddqsdd" />
|
||||
<MESSAGE value="dddqsdddd" />
|
||||
<MESSAGE value="dddqsddddss" />
|
||||
|
@ -486,6 +492,7 @@
|
|||
<MESSAGE value="05/10/2024 - 12h" />
|
||||
<MESSAGE value="05/10/2024 - 18h30" />
|
||||
<MESSAGE value="07/10/2024 - 20h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="07/10/2024 - 20h30" />
|
||||
<MESSAGE value="12/10/204 - 18h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="12/10/204 - 18h" />
|
||||
</component>
|
||||
</project>
|
|
@ -43,7 +43,7 @@ Ajouter le log vers celui qui a éffectué l'action.
|
|||
Ceci pour tracer les action d'une pesonne comme la suppression d'un objet.
|
||||
|
||||
Idée :
|
||||
Si suppresion : Mettre l'_id, nom, prenom (ou numero de commande, code) de l'objet supprimé.
|
||||
Si Suppression : Mettre l'_id, nom, prenom (ou numero de commande, code) de l'objet supprimé.
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -768,7 +768,7 @@ def AddStagiairetoClass(diction):
|
|||
history_event_dict['related_collection_recid'] = str(my_session_data['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
|
||||
local_inscrit_info = "Id Inscrit : " + str(inserted_id)
|
||||
local_inscrit_info = " : " + str(inserted_id)
|
||||
if ("email" in diction.keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + diction["email"]
|
||||
|
||||
|
@ -1291,75 +1291,7 @@ def UpdateStagiairetoClass(diction):
|
|||
if( local_status is False ):
|
||||
return local_status, local_retval
|
||||
|
||||
""""
|
||||
Inscription sur le LMS :
|
||||
Si la session de formation possede un code de formation lms 'lms_class_code'
|
||||
|
||||
Alors cela veut dire que c'est une formation qui est gérée avec le LMS de MYSY.
|
||||
Donc l'inscription va generer :
|
||||
1 - La creation du compte LMS participant
|
||||
2 - L'inscription de l'utilisateur à la formation.
|
||||
|
||||
"""
|
||||
|
||||
"""
|
||||
if( lms_class_code.strip() != ""):
|
||||
print(" ### Debut creation lms_class_code.strip() pour le code class ", lms_class_code)
|
||||
new_diction = {}
|
||||
new_diction['token'] = diction['token']
|
||||
new_diction['lastname'] = user_nom
|
||||
new_diction['firstname'] = user_prenom
|
||||
new_diction['email'] = myemail
|
||||
new_diction['password'] = secrets.token_urlsafe(6)
|
||||
new_diction['locked'] = "0"
|
||||
|
||||
#split_mail_tab = str(myemail).split('@')
|
||||
#new_diction['username'] = split_mail_tab[0]
|
||||
|
||||
new_diction['username'] = myemail
|
||||
|
||||
|
||||
local_status, local_message, local_participant_lms_id = mys_lms.Create_MySy_LMS_Apprenant(new_diction)
|
||||
|
||||
if( local_status is False ):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) +" WARNING : le compte LSM n'a pas été correctement crée")
|
||||
return_message = return_message + " le compte LSM n'a pas été correctement crée. "
|
||||
else:
|
||||
# Mettre à jour la collection "inscription" en ajoutant local_participant_lms_id et et le mot de passe
|
||||
print(" ### Mise à jour 'inscription' pour inscription_line_id = ", inscription_line_id,
|
||||
" local_participant_lms_id = ", local_participant_lms_id, " str(new_diction['password'] ", str(new_diction['password']))
|
||||
local_ret_val = MYSY_GV.dbname['inscription'].find_one_and_update({'_id':ObjectId(str(inscription_line_id))},
|
||||
{"$set":{'lms_user_id':str(local_participant_lms_id),
|
||||
'lms_pwd':str(new_diction['password']),
|
||||
'lms_class_code':str(lms_class_code),
|
||||
'date_update':str(datetime.now()),
|
||||
'update_by':str(my_partner['_id'])}
|
||||
},
|
||||
upsert=False,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
if (local_ret_val and local_ret_val['_id']):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " Le compte LMS du participant a été correctement mis à jour : local_ret_val['_id'] = "+str( local_ret_val['_id']))
|
||||
|
||||
print(" ### Debut de l'inscription au à la formation dans le LMS ")
|
||||
new_diction = {}
|
||||
new_diction['token'] = diction['token']
|
||||
new_diction['user_lms_id'] = local_participant_lms_id
|
||||
new_diction['course_code'] = lms_class_code
|
||||
|
||||
|
||||
local_status2, local_message2 = mys_lms.Add_User_To_LMS_Class(new_diction)
|
||||
if (local_status2 is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " WARNING : Impossbile de finaliser l'inscription dans le LMS")
|
||||
return_message = return_message + " Impossbile de finaliser l'inscription dans le LMS. "
|
||||
else:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " TOP, l'inscription dans le LMS a ete correctement faite")
|
||||
|
||||
else:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - WARNING : Impossible de mettre à jour le compte LMS ")
|
||||
return_message = return_message + " Impossible de mettre à jour le compte LMS."
|
||||
|
||||
"""
|
||||
|
||||
elif ( new_status != old_status and diction['status'] == "-1" ):
|
||||
# Il s'agit d'envoyer le message de refus d'une inscription
|
||||
|
@ -1373,24 +1305,52 @@ def UpdateStagiairetoClass(diction):
|
|||
|
||||
|
||||
|
||||
mycommon.myprint(" Les données du stagiaire ont été correctement mise à jour")
|
||||
if( len(str(return_message)) > 5):
|
||||
return True, "Les données du stagiaire ont été correctement mise à jour. WARNING : "+return_message
|
||||
"""
|
||||
# Ajout de l'evenement dans l'historique pour l'inscrit
|
||||
"""
|
||||
|
||||
"""
|
||||
# Ajout de l'evenement dans l'historique
|
||||
"""
|
||||
now = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S"))
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = diction['token']
|
||||
history_event_dict['related_collection'] = "inscription"
|
||||
history_event_dict['related_collection_recid'] = str(diction['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
history_event_dict['action_description'] = str(message_for_historic)
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible de logguer l'historique pour l'évènement : " + str(history_event_dict))
|
||||
message_for_historic = message_for_historic+", pour la session : "+str(local_tmp_session_data['_id'])
|
||||
if( "code_session" in local_tmp_session_data.keys() ):
|
||||
message_for_historic = message_for_historic + ", code session " + str(local_tmp_session_data['code_session'])
|
||||
|
||||
|
||||
now = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S"))
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = diction['token']
|
||||
history_event_dict['related_collection'] = "inscription"
|
||||
history_event_dict['related_collection_recid'] = str(diction['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
history_event_dict['action_description'] = str(message_for_historic)
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible de logguer l'historique pour l'évènement : " + str(history_event_dict))
|
||||
|
||||
|
||||
inscrit_data = MYSY_GV.dbname['inscription'].find_one({'_id':ObjectId(str(diction['_id']).strip()),
|
||||
'partner_owner_recid': str(partner_recid),})
|
||||
"""
|
||||
# Ajout de l'evenement dans l'historique pour la session
|
||||
"""
|
||||
session_info_message = "Annulation de l'inscription : "+str(inscrit_data['_id'])
|
||||
if ("email" in local_tmp_session_data.keys()):
|
||||
session_info_message = session_info_message + ", " + str(local_tmp_session_data['email'])
|
||||
if ("nom" in local_tmp_session_data.keys()):
|
||||
session_info_message = session_info_message + ", " + str(local_tmp_session_data['nom'])
|
||||
if ("prenom" in local_tmp_session_data.keys()):
|
||||
session_info_message = session_info_message + ", " + str(local_tmp_session_data['prenom'])
|
||||
|
||||
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = diction['token']
|
||||
history_event_dict['related_collection'] = "session_formation"
|
||||
history_event_dict['related_collection_recid'] = str(local_tmp_session_data['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
history_event_dict['action_description'] = str(session_info_message)
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible de logguer l'historique pour l'évènement : " + str(history_event_dict))
|
||||
|
||||
return True, "Les données du stagiaire ont été correctement mise à jour"
|
||||
|
||||
|
@ -5579,6 +5539,58 @@ def RefuseAttendeeInscription_with_motif(diction):
|
|||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible d'annuler l'inscription ")
|
||||
return False, " Impossible d'annuler l'inscription "
|
||||
|
||||
"""
|
||||
12/10/2024 - loguer les action dans l'historique général
|
||||
|
||||
"""
|
||||
## Add to log history pour l'inscrit 'inscription'
|
||||
now = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S"))
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = str(mytoken)
|
||||
history_event_dict['related_collection'] = "inscription"
|
||||
history_event_dict['related_collection_recid'] = str(local_inscription[0]['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
|
||||
local_session_info = ""
|
||||
if ("_id" in local_session.keys()):
|
||||
local_session_info = "_Id Session : " + str(local_session["_id"])
|
||||
if ("code_session" in local_session.keys()):
|
||||
local_session_info = local_session_info + ", Code Session : " + local_session["code_session"]
|
||||
|
||||
history_event_dict['action_description'] = "Refus inscription à " + str(local_session_info)
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible de logguer l'historique pour l'évènement : " + str(history_event_dict))
|
||||
|
||||
## Add to log history pour la session 'session_formation'
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = str(mytoken)
|
||||
history_event_dict['related_collection'] = "session_formation"
|
||||
history_event_dict['related_collection_recid'] = str(local_session['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
|
||||
local_inscrit_info = ""
|
||||
if ("_id" in local_inscription[0].keys()):
|
||||
local_inscrit_info = "_Id Inscrit : " + str(local_inscription[0]["_id"])
|
||||
if ("email" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["email"]
|
||||
|
||||
if ("nom" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["nom"]
|
||||
|
||||
if ("prenom" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["prenom"]
|
||||
|
||||
history_event_dict['action_description'] = "Refus inscription de " + str(local_inscrit_info)
|
||||
|
||||
# print(" ### laaaaaaaaa history_event_dict = ", history_event_dict)
|
||||
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible de logguer l'historique pour l'évènement : " + str(history_event_dict))
|
||||
|
||||
"""
|
||||
Verification s'il y a une inscription LMS, au quel cas, on l'annule aussi
|
||||
"""
|
||||
|
@ -5618,6 +5630,8 @@ def RefuseAttendeeInscription_with_motif(diction):
|
|||
if( return_message.strip() != ""):
|
||||
return True, return_message
|
||||
|
||||
|
||||
|
||||
return True, "L'inscription a été correctement annulée"
|
||||
|
||||
except Exception as e:
|
||||
|
@ -6637,7 +6651,6 @@ def AcceptAttendeeInscription(diction):
|
|||
else:
|
||||
# Il faut créer un dossier apprenant
|
||||
|
||||
print(" 11 ")
|
||||
local_status, local_retval = apprenant_mgt.Add_Apprenant(new_apprenant_diction)
|
||||
if( local_status is False):
|
||||
return local_status, local_retval
|
||||
|
@ -6701,18 +6714,21 @@ def AcceptAttendeeInscription(diction):
|
|||
history_event_dict['action_date'] = str(now)
|
||||
|
||||
local_inscrit_info = ""
|
||||
if ("_id" in local_inscription.keys()):
|
||||
local_inscrit_info = "_Id Inscrit : " + str(local_inscription["_id"])
|
||||
if ("email" in local_inscription.keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription["email"]
|
||||
if ("_id" in local_inscription[0].keys() ):
|
||||
local_inscrit_info = "_Id Inscrit : " + str(local_inscription[0]["_id"])
|
||||
if ("email" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["email"]
|
||||
|
||||
if ("nom" in local_inscription.keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription["nom"]
|
||||
if ("nom" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["nom"]
|
||||
|
||||
if ("prenom" in local_inscription.keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription["prenom"]
|
||||
if ("prenom" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["prenom"]
|
||||
|
||||
history_event_dict['action_description'] = "Validation inscription de " + str(local_inscrit_info)
|
||||
|
||||
#print(" ### laaaaaaaaa history_event_dict = ", history_event_dict)
|
||||
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
|
@ -6950,10 +6966,7 @@ def DeleteAttendeeInscription(diction):
|
|||
3]) + " - Impossible de supprimer l'inscription. L'inscription doit être annulée ou à l'etat 'préinscrit' avant d'être supprimé")
|
||||
return False, " - Impossible de supprimer l'inscription. L'inscription doit être annulée ou à l'etat 'préinscrit' avant d'être supprimé"
|
||||
|
||||
detlete_retval = MYSY_GV.dbname['inscription'].delete_one(
|
||||
{'session_id': str(diction['session_id']), 'email': str(diction['email']),
|
||||
'class_internal_url': str(diction['class_internal_url'])},
|
||||
)
|
||||
|
||||
|
||||
"""
|
||||
## Add to log history
|
||||
|
@ -6964,25 +6977,31 @@ def DeleteAttendeeInscription(diction):
|
|||
history_event_dict = {}
|
||||
history_event_dict['token'] = mytoken
|
||||
history_event_dict['related_collection'] = "inscription"
|
||||
history_event_dict['related_collection_recid'] = str(local_inscription['_id'])
|
||||
history_event_dict['related_collection_recid'] = str(local_inscription[0]['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
|
||||
local_inscrit_info = "Id Inscrit : " + str(local_inscription['_id'])
|
||||
if ("email" in local_inscription.keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription["email"]
|
||||
local_inscrit_info = "Id Inscrit : " + str(local_inscription[0]['_id'])
|
||||
if ("email" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["email"]
|
||||
|
||||
if ("nom" in local_inscription.keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription["nom"]
|
||||
if ("nom" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["nom"]
|
||||
|
||||
if ("prenom" in local_inscription.keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription["prenom"]
|
||||
if ("prenom" in local_inscription[0].keys()):
|
||||
local_inscrit_info = local_inscrit_info + ", " + local_inscription[0]["prenom"]
|
||||
|
||||
history_event_dict['action_description'] = "Suppresion de " + str(local_inscrit_info)
|
||||
history_event_dict['action_description'] = "Suppression de " + str(local_inscrit_info)
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible de logguer l'historique pour l'évènement : " + str(history_event_dict))
|
||||
|
||||
detlete_retval = MYSY_GV.dbname['inscription'].delete_one(
|
||||
{'session_id': str(diction['session_id']), 'email': str(diction['email']),
|
||||
'class_internal_url': str(diction['class_internal_url'])},
|
||||
)
|
||||
|
||||
|
||||
return True, "L'inscription a été correctement supprimée"
|
||||
|
||||
except Exception as e:
|
||||
|
@ -7418,7 +7437,7 @@ def getRecodedStagiaireImage_from_front(diction=None):
|
|||
|
||||
|
||||
"""
|
||||
Suppresion d'un image d'un stagiaire
|
||||
Suppression d'un image d'un stagiaire
|
||||
"""
|
||||
def DeleteImage_Stagiaire_v2(diction=None):
|
||||
try:
|
||||
|
|
4174
Log/log_file.log
4174
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -4288,7 +4288,7 @@ def Delete_SessionFormation(diction):
|
|||
if ("code_session" in session_data.keys()):
|
||||
local_session_info = local_session_info + ", " + session_data["code_session"]
|
||||
|
||||
history_event_dict['action_description'] = "Suppresion de " + str(local_session_info)
|
||||
history_event_dict['action_description'] = "Suppression de " + str(local_session_info)
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
|
@ -4310,7 +4310,7 @@ def Delete_SessionFormation(diction):
|
|||
|
||||
|
||||
"""
|
||||
Cette fonction prends une liste '_id' de session et effectue la suppresion
|
||||
Cette fonction prends une liste '_id' de session et effectue la Suppression
|
||||
si les conditions sont remplie.
|
||||
|
||||
list_session_id = ['id1', 'id2', 'id3,]
|
||||
|
|
|
@ -1495,7 +1495,7 @@ def Get_Apprenant_Recorded_Image_from_front(diction=None):
|
|||
return False, " Impossible de recupérer l'image de l'apprenant"
|
||||
|
||||
"""
|
||||
Suppresion d'un image de l'apprenant
|
||||
Suppression d'un image de l'apprenant
|
||||
"""
|
||||
def Delete_Apprenant_Image(diction=None):
|
||||
try:
|
||||
|
|
|
@ -6680,7 +6680,7 @@ def Add_Update_UE_To_Class(diction):
|
|||
# print(" ####### laaaa diction = ", diction)
|
||||
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = str(diction['token'])
|
||||
history_event_dict['token'] = str(token)
|
||||
history_event_dict['related_collection'] = "myclass"
|
||||
history_event_dict['related_collection_recid'] = str(is_class_exist_data['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
|
@ -6730,7 +6730,7 @@ def Add_Update_UE_To_Class(diction):
|
|||
# print(" ####### laaaa diction = ", diction)
|
||||
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = str(diction['token'])
|
||||
history_event_dict['token'] = str(token)
|
||||
history_event_dict['related_collection'] = "myclass"
|
||||
history_event_dict['related_collection_recid'] = str(is_class_exist_data['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
|
@ -6738,6 +6738,8 @@ def Add_Update_UE_To_Class(diction):
|
|||
history_event_dict['action_description'] = "Ajout de l'Unité d'enseignement " + str(
|
||||
is_ue_exist_data['_id']) + ", Code UE :" + str(is_ue_exist_data['code'])
|
||||
|
||||
print(" history_event_dict = ", history_event_dict)
|
||||
|
||||
local_status, local_retval = mycommon.Collection_Historique.Add_Historique_Event(history_event_dict)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
|
@ -6852,7 +6854,7 @@ def Delete_UE_From_Class(diction):
|
|||
# print(" ####### laaaa diction = ", diction)
|
||||
|
||||
history_event_dict = {}
|
||||
history_event_dict['token'] = str(diction['token'])
|
||||
history_event_dict['token'] = str(token)
|
||||
history_event_dict['related_collection'] = "myclass"
|
||||
history_event_dict['related_collection_recid'] = str(is_class_exist_data['_id'])
|
||||
history_event_dict['action_date'] = str(now)
|
||||
|
|
5
main.py
5
main.py
|
@ -6437,7 +6437,8 @@ Ajout et mise à jour des droits d'acces d'un user (ressource_humaine_id)
|
|||
def Add_Update_User_Access_Right():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Add_Update_User_Access_Right payload = ",payload)
|
||||
print(" ### Add_Update_User_Access_Right payload (trop long cherif= ")
|
||||
#print(" ### Add_Update_User_Access_Right payload (trop long cherif= ", payload)
|
||||
status, retval = user_access_right.Add_Update_User_Access_Right(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
@ -7609,7 +7610,7 @@ def Update_Group_Purchase_Price():
|
|||
return jsonify(status=status, message=retval)
|
||||
|
||||
"""
|
||||
API de suppresion d'un groupe de prix d'achat
|
||||
API de Suppression d'un groupe de prix d'achat
|
||||
"""
|
||||
@app.route('/myclass/api/Delete_Group_Purchase_Price/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
|
|
|
@ -821,7 +821,7 @@ def Get_List_UE_Evaluation(diction):
|
|||
|
||||
|
||||
"""
|
||||
Suppresion d'une evaluation d'une formation.
|
||||
Suppression d'une evaluation d'une formation.
|
||||
|
||||
/!\ : les regles ne sont pas encore implément. il faut le faire
|
||||
"""
|
||||
|
|
|
@ -699,7 +699,7 @@ def Update_Partner_Product_Image(file_img=None, Folder=None, diction=None):
|
|||
return False, "Impossible d'enregistrer l'image"
|
||||
|
||||
"""
|
||||
Suppresion d'un image d'un produit
|
||||
Suppression d'un image d'un produit
|
||||
"""
|
||||
def DeleteImage_Partner_Product(diction=None):
|
||||
try:
|
||||
|
|
|
@ -1898,7 +1898,7 @@ def Get_Given_Ressource_Humaine(diction):
|
|||
|
||||
data_cle['valide'] = "1"
|
||||
data_cle['locked'] = "0"
|
||||
data_cle['is_partner_admin_account'] = "0"
|
||||
#data_cle['is_partner_admin_account'] = "0"
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
|
@ -2014,6 +2014,9 @@ def Get_Given_Ressource_Humaine(diction):
|
|||
local_val['note'] = local_data_note
|
||||
|
||||
|
||||
if( "date_naissance" not in user.keys() ):
|
||||
user['date_naissance'] = "01/01/1901"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
|
@ -2098,7 +2101,7 @@ def Update_Ressource_Humaine_Image(file_img=None, Folder=None, diction=None):
|
|||
return False, "Impossible d'enregistrer l'image"
|
||||
|
||||
"""
|
||||
Suppresion d'un image d'une ressource humaine
|
||||
Suppression d'un image d'une ressource humaine
|
||||
"""
|
||||
def DeleteImage_Ressource_Humaine(diction=None):
|
||||
try:
|
||||
|
|
|
@ -1075,7 +1075,7 @@ def Update_Ressource_Materielle_Image(file_img=None, Folder=None, diction=None):
|
|||
return False, "Impossible d'enregistrer l'image"
|
||||
|
||||
"""
|
||||
Suppresion d'un image d'une ressource humaine
|
||||
Suppression d'un image d'une ressource humaine
|
||||
"""
|
||||
def DeleteImage_Ressource_Materielle(diction=None):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue