07/10/2023 - 16h40

master
cherif 2023-10-07 16:51:31 +02:00
parent 658f08415d
commit e3aac2ba0c
4 changed files with 1181 additions and 19 deletions

View File

@ -1,9 +1,11 @@
<?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="04/10/2023 - 21h40">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="06/10/2023 - 21h40">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/email_inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_inscription_mgt.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -67,13 +69,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00076" summary="20/08/23 - 23h30">
<created>1692568622854</created>
<option name="number" value="00076" />
<option name="presentableId" value="LOCAL-00076" />
<option name="project" value="LOCAL" />
<updated>1692568622855</updated>
</task>
<task id="LOCAL-00077" summary="21/08/23 - 15h">
<created>1692623620293</created>
<option name="number" value="00077" />
@ -410,7 +405,14 @@
<option name="project" value="LOCAL" />
<updated>1696447101806</updated>
</task>
<option name="localTasksCounter" value="125" />
<task id="LOCAL-00125" summary="06/10/2023 - 21h40">
<created>1696628469996</created>
<option name="number" value="00125" />
<option name="presentableId" value="LOCAL-00125" />
<option name="project" value="LOCAL" />
<updated>1696628469998</updated>
</task>
<option name="localTasksCounter" value="126" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -425,7 +427,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="07/09/2023 - 14h" />
<MESSAGE value="08/09/2023 - 18h30" />
<MESSAGE value="11/09/23 - 12h30" />
<MESSAGE value="11/09/23 - 19h" />
@ -450,6 +451,7 @@
<MESSAGE value="02/10/2023 - 22h30" />
<MESSAGE value="03/10/2023 - 21h40" />
<MESSAGE value="04/10/2023 - 21h40" />
<option name="LAST_COMMIT_MESSAGE" value="04/10/2023 - 21h40" />
<MESSAGE value="06/10/2023 - 21h40" />
<option name="LAST_COMMIT_MESSAGE" value="06/10/2023 - 21h40" />
</component>
</project>

View File

@ -663,6 +663,7 @@ def UpdateStagiairetoClass(diction):
if (new_status != old_status and diction['status'] == "1" ):
# Il s'agit d'envoyer le message de confirmation d'une inscription
email_data['partner_owner_recid'] = str(partner_recid)
local_status, local_message = email_session.incription_training_confirmation_mail(email_data)
""""
@ -981,9 +982,7 @@ def SendInscriptionConfirmation(diction):
code_session = local_info_session[0]['code_session']
data_mail['code_session'] = code_session
data_mail['partner_owner_recid'] = str(partner_recid)
local_status, local_message = email_session.incription_training_confirmation_mail(data_mail)
return local_status, "La confirmation d'inscription a bien ete envoyée"
@ -4400,7 +4399,7 @@ def Send_LMS_Credentials_to_particpants(diction):
# Recuperation des données de la session
local_session = MYSY_GV.dbname['session_formation'].find_one(
{'code_session': str(diction['session_id']),
{'_id': ObjectId(str(diction['session_id'])),
'class_internal_url': str(diction['class_internal_url']), 'valide':'1',})
if (local_session is None):

File diff suppressed because one or more lines are too long

View File

@ -53,7 +53,7 @@ def incription_training_confirmation_mail(diction):
"""
Verification de la liste des champs obligatoires
"""
field_list_obligatoire = ['nom', 'prenom', 'email', 'date_du', 'date_au', 'title']
field_list_obligatoire = ['nom', 'prenom', 'email', 'title']
for val in field_list_obligatoire:
if val not in diction:
mycommon.myprint(
@ -126,6 +126,21 @@ def incription_training_confirmation_mail(diction):
if diction['formateur']:
local_formateur = diction['formateur']
prenom = ""
if ("prenom" in diction.keys()):
if diction['prenom']:
prenom = diction['prenom']
date_du = ""
if ("date_du" in diction.keys()):
if diction['date_du']:
date_du = diction['date_du']
date_fin = ""
if ("date_fin" in diction.keys()):
if diction['date_fin']:
date_fin = diction['date_fin']
# JINJA2
templateLoader = jinja2.FileSystemLoader(searchpath="./")
@ -136,9 +151,9 @@ def incription_training_confirmation_mail(diction):
body = {
"params" :{"nom": str(diction['nom']),
"prenom": str(diction['prenom']),
"date_du": str(diction['date_du']),
"date_fin": str(diction['date_au']),
"prenom": str(prenom),
"date_du": str(date_du),
"date_fin": str(date_fin),
"adresse": str(adresse_session),
"title": str(diction['title']),
"code_postal": str(local_code_postal),