14/04/2024 - 23h05
parent
fc9d7e5f02
commit
f62711ebb3
|
@ -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="11/04/2024 - 17h02">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="12/04/2024 - 15h05">
|
||||
<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$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/module_editique.py" beforeDir="false" afterPath="$PROJECT_DIR$/module_editique.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/email_inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_inscription_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/survey_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/survey_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -76,13 +77,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00218" summary="09/02/24 - 22hqsdsq">
|
||||
<created>1707599836404</created>
|
||||
<option name="number" value="00218" />
|
||||
<option name="presentableId" value="LOCAL-00218" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1707599836405</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00219" summary="11/02/2024 - 22h">
|
||||
<created>1707685370013</created>
|
||||
<option name="number" value="00219" />
|
||||
|
@ -419,7 +413,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1712847771191</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="267" />
|
||||
<task id="LOCAL-00267" summary="12/04/2024 - 15h05">
|
||||
<created>1712927149481</created>
|
||||
<option name="number" value="00267" />
|
||||
<option name="presentableId" value="LOCAL-00267" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1712927149482</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="268" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -461,7 +462,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="ddds" />
|
||||
<MESSAGE value="10/03/24 - 21h" />
|
||||
<MESSAGE value="11/03/2024 - 15h" />
|
||||
<MESSAGE value="12/03/2024 - 20h30" />
|
||||
|
@ -486,6 +486,7 @@
|
|||
<MESSAGE value="10/04/2024 - 11h50" />
|
||||
<MESSAGE value="10/04/2024 - 22h50" />
|
||||
<MESSAGE value="11/04/2024 - 17h02" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="11/04/2024 - 17h02" />
|
||||
<MESSAGE value="12/04/2024 - 15h05" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="12/04/2024 - 15h05" />
|
||||
</component>
|
||||
</project>
|
|
@ -364,8 +364,8 @@ Limite des zones de texte des formation
|
|||
- description
|
||||
"""
|
||||
CLASS_ZONE_PROGRAM_LIMIT = 1300
|
||||
CLASS_ZONE_DESCRIP_LIMIT = 1000
|
||||
CLASS_ZONE_OBJECTIF_LIMIT = 1000
|
||||
CLASS_ZONE_DESCRIP_LIMIT = 2000
|
||||
CLASS_ZONE_OBJECTIF_LIMIT = 2000
|
||||
|
||||
|
||||
"""
|
||||
|
|
3084
Log/log_file.log
3084
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -95,7 +95,6 @@ def incription_training_confirmation_mail(diction):
|
|||
to=to, bcc=bcc )
|
||||
"""
|
||||
|
||||
print("debut envoi mail de test ")
|
||||
# on rentre les renseignements pris sur le site du fournisseur
|
||||
|
||||
# msg = MIMEMultipart("alternative")
|
||||
|
@ -138,9 +137,9 @@ def incription_training_confirmation_mail(diction):
|
|||
date_du = diction['date_du']
|
||||
|
||||
date_fin = ""
|
||||
if ("date_fin" in diction.keys()):
|
||||
if diction['date_fin']:
|
||||
date_fin = diction['date_fin']
|
||||
if ("date_au" in diction.keys()):
|
||||
if diction['date_au']:
|
||||
date_fin = diction['date_au']
|
||||
|
||||
|
||||
# JINJA2
|
||||
|
@ -166,6 +165,8 @@ def incription_training_confirmation_mail(diction):
|
|||
"email": str(diction['email'])},
|
||||
}
|
||||
|
||||
print(" ### BODY DATA = ", body)
|
||||
|
||||
sourceHtml = template.render(params=body["params"])
|
||||
|
||||
msg.set_content(sourceHtml, subtype='html')
|
||||
|
@ -184,13 +185,18 @@ def incription_training_confirmation_mail(diction):
|
|||
partner_document_CONF_INSCRIPTION_data_qry = {'partner_owner_recid': str(diction['partner_owner_recid']),
|
||||
'valide': '1', 'locked': '0', 'ref_interne': 'CONF_INSCRIPTION'}
|
||||
|
||||
print(" ### partner_document_CONF_INSCRIPTION_data_qry = ", partner_document_CONF_INSCRIPTION_data_qry)
|
||||
#print(" ### partner_document_CONF_INSCRIPTION_data_qry 01 = ", partner_document_CONF_INSCRIPTION_data_qry)
|
||||
partner_document_CONF_INSCRIPTION_data = MYSY_GV.dbname['courrier_template'].find_one(
|
||||
{'partner_owner_recid': str(diction['partner_owner_recid']),
|
||||
'valide': '1', 'locked': '0', 'ref_interne': 'PRE_INSCRIPTION'})
|
||||
'valide': '1', 'locked': '0', 'ref_interne': 'CONF_INSCRIPTION'})
|
||||
|
||||
if (partner_document_CONF_INSCRIPTION_data is None):
|
||||
# Il n'existe pas de personnalisation de la preinscription pour ce partenaire, on va aller récupérer la presinscription pa defaut
|
||||
partner_document_CONF_INSCRIPTION_data_qry = {'partner_owner_recid': 'default',
|
||||
'valide': '1', 'locked': '0', 'ref_interne': 'CONF_INSCRIPTION'}
|
||||
|
||||
#print(" ### partner_document_CONF_INSCRIPTION_data_qry 01 = ", partner_document_CONF_INSCRIPTION_data_qry)
|
||||
|
||||
partner_document_CONF_INSCRIPTION_data = MYSY_GV.dbname['courrier_template'].find_one(
|
||||
{'partner_owner_recid': 'default',
|
||||
'valide': '1', 'locked': '0', 'ref_interne': 'CONF_INSCRIPTION'})
|
||||
|
@ -207,11 +213,14 @@ def incription_training_confirmation_mail(diction):
|
|||
3]) + " -Impossible d'envoyer l'email de la preinscription. Le parametrage du document est invalide")
|
||||
return False, " Impossible d'envoyer l'email de la preinscription. Le parametrage du document est invalide "
|
||||
|
||||
|
||||
#print(' #### partner_document_CONF_INSCRIPTION_data[contenu_doc]) === ', partner_document_CONF_INSCRIPTION_data['contenu_doc'])
|
||||
|
||||
CONF_INSCRIPTION_contenu_doc_Template = jinja2.Template(
|
||||
str(partner_document_CONF_INSCRIPTION_data['contenu_doc']))
|
||||
sourceHtml = CONF_INSCRIPTION_contenu_doc_Template.render(params=body["params"])
|
||||
|
||||
# print(" ### PRE_INSCRIPTION_contenu_doc = ",str(sourceHtml))
|
||||
#print(" ### sourceHtml CONF_INSCRIPTION_contenu_doc_Template = ",str(sourceHtml))
|
||||
msg.set_content(sourceHtml, subtype='html')
|
||||
|
||||
"""
|
||||
|
|
2
main.py
2
main.py
|
@ -5703,7 +5703,7 @@ API qui permet de modifier un document personnalisable
|
|||
def Update_Partner_Document():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Update_Partner_Document payload = ",payload)
|
||||
#print(" ### Update_Partner_Document payload = ",payload)
|
||||
status, retval = partner_document_mgt.Update_Partner_Document(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
|
|
@ -275,6 +275,10 @@ def Record_Survey_Data_No_Token(diction):
|
|||
|
||||
"""
|
||||
Survey for enduser : Cette fonction créer une enquete en prenant à partir d'une liste d'inscrit
|
||||
|
||||
/!\ : Cette fonction ne concerne uniquement et exclusibement les inscriptions validées (status = 1)
|
||||
|
||||
|
||||
"""
|
||||
|
||||
def Add_Survey_Tab_Inscrit(diction):
|
||||
|
@ -309,13 +313,13 @@ def Add_Survey_Tab_Inscrit(diction):
|
|||
qry = {'session_id': str(diction['session_id']),
|
||||
'_id':ObjectId(str(my_inscription_id)),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide':'1'}
|
||||
'valide':'1', 'status':'1'}
|
||||
|
||||
print(" qry2 === ", qry)
|
||||
tmp_count = MYSY_GV.dbname['inscription'].count_documents({'session_id': str(diction['session_id']),
|
||||
'_id':ObjectId(str(my_inscription_id)),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide':'1'})
|
||||
'valide':'1', 'status':'1'})
|
||||
|
||||
if (tmp_count <= 0):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " L'identifiant de l'apprenant est invalide ")
|
||||
|
@ -347,14 +351,14 @@ def Add_Survey_Tab_Inscrit(diction):
|
|||
req = {'session_id': str(diction['session_id']),
|
||||
'_id':ObjectId(str(my_inscription_id)),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1'
|
||||
'valide': '1', 'status':'1'
|
||||
}
|
||||
|
||||
print(" ### req = ", req)
|
||||
local_Insc_retval = MYSY_GV.dbname['inscription'].find_one({'session_id': str(diction['session_id']),
|
||||
'_id':ObjectId(str(my_inscription_id)),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1'
|
||||
'valide': '1', 'status':'1'
|
||||
})
|
||||
|
||||
if(local_Insc_retval is None ):
|
||||
|
@ -426,7 +430,7 @@ def Init_Survey_Tab_For_All_Session_Inscrit(diction):
|
|||
|
||||
for my_inscription_id in MYSY_GV.dbname['inscription'].find({'session_id': str(diction['session_id']),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide':'1'}):
|
||||
'valide':'1', 'status':'1'}):
|
||||
|
||||
tab_my_inscription_ids.append(str(my_inscription_id['_id']))
|
||||
|
||||
|
@ -465,14 +469,14 @@ def Init_Survey_Tab_For_All_Session_Inscrit(diction):
|
|||
req = {'session_id': str(diction['session_id']),
|
||||
'_id':ObjectId(str(my_inscription_id)),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1'
|
||||
'valide': '1', 'status':'1'
|
||||
}
|
||||
|
||||
|
||||
local_Insc_retval = MYSY_GV.dbname['inscription'].find_one({'session_id': str(diction['session_id']),
|
||||
'_id':ObjectId(str(my_inscription_id)),
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1'
|
||||
'valide': '1', 'status':'1'
|
||||
})
|
||||
|
||||
if(local_Insc_retval is None ):
|
||||
|
@ -933,6 +937,12 @@ def Send_Survey_TabIds(diction):
|
|||
# Cette demande d'enquete concerne une inscription
|
||||
local_inscription_id = local_survey_retval['inscription_id']
|
||||
|
||||
qry = {'_id': ObjectId(str(local_inscription_id)),
|
||||
'status': '1',
|
||||
'partner_owner_recid': str(my_partner['recid'])}
|
||||
|
||||
#print(" ### qry 010101 = ", qry)
|
||||
|
||||
inscription_data = MYSY_GV.dbname['inscription'].find_one({'_id': ObjectId(str(local_inscription_id)),
|
||||
'status': '1',
|
||||
'partner_owner_recid': str(my_partner['recid'])})
|
||||
|
@ -967,6 +977,8 @@ def Send_Survey_TabIds(diction):
|
|||
Fonction pour Recuperer la liste des enquete avec les filtre suivant :
|
||||
- session_id,
|
||||
- formulaire_type - ['pos', 'hot_eval', 'cool_eval']
|
||||
|
||||
|
||||
"""
|
||||
def Get_List_Survey_with_filter(diction):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue