25/05/23 - 17h

master
cherif 2023-05-25 17:21:23 +02:00
parent c16640610e
commit acb0cc3d47
7 changed files with 449 additions and 15 deletions

View File

@ -1,8 +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="22/05/23 - 23h">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="23/05/23 - 23h">
<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$/Template/MySy_confirmation_Pre_inscription_formation_tpl.html" beforeDir="false" afterPath="$PROJECT_DIR$/Template/MySy_confirmation_Pre_inscription_formation_tpl.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Template/MySy_confirmation_inscription_formation_tpl.html" beforeDir="false" afterPath="$PROJECT_DIR$/Template/MySy_confirmation_inscription_formation_tpl.html" 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$/lms_chamilo/mysy_lms.py" beforeDir="false" afterPath="$PROJECT_DIR$/lms_chamilo/mysy_lms.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -235,7 +240,14 @@
<option name="project" value="LOCAL" />
<updated>1684787274307</updated>
</task>
<option name="localTasksCounter" value="26" />
<task id="LOCAL-00026" summary="23/05/23 - 23h">
<created>1684872485100</created>
<option name="number" value="00026" />
<option name="presentableId" value="LOCAL-00026" />
<option name="project" value="LOCAL" />
<updated>1684872485101</updated>
</task>
<option name="localTasksCounter" value="27" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -272,6 +284,7 @@
<MESSAGE value="21/05/23 - 10h" />
<MESSAGE value="21/05/23 - 22h" />
<MESSAGE value="22/05/23 - 23h" />
<option name="LAST_COMMIT_MESSAGE" value="22/05/23 - 23h" />
<MESSAGE value="23/05/23 - 23h" />
<option name="LAST_COMMIT_MESSAGE" value="23/05/23 - 23h" />
</component>
</project>

View File

@ -61,7 +61,7 @@ def AddStagiairetoClass(diction):
Verification de la liste des champs obligatoires
"""
field_list_obligatoire = ['nom', 'prenom', 'email', 'telephone', 'modefinancement',
'class_internal_url', 'session_id', 'token']
'class_internal_url', 'session_id', ]
for val in field_list_obligatoire:
if val not in diction:
@ -77,17 +77,18 @@ def AddStagiairetoClass(diction):
mydata['session_id'] = str(diction['session_id']).strip()
session_id = str(diction['session_id']).strip()
"""
mytoken = ""
if ("token" in diction.keys()):
if diction['token']:
mytoken = str(diction['token']).strip()
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
if (partner_recid is False):
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer les données du partenaire ")
return False, "Impossible de recuperer les données du partenaire "
"""
"""
Recuperation des info de la session de formation
@ -464,6 +465,11 @@ def UpdateStagiairetoClass(diction):
if ("lms_class_code" in local_tmp_session.keys() and local_tmp_session['lms_class_code']):
lms_class_code = local_tmp_session['lms_class_code']
session_ondemande = ""
if ("session_ondemande" in local_tmp_session.keys() and local_tmp_session['session_ondemande']):
session_ondemande = local_tmp_session['session_ondemande']
email_data['session_ondemande'] = session_ondemande
if ( diction['status'] == "1" ):
# Il s'agit d'envoyer le message de confirmation d'une inscription
@ -749,6 +755,12 @@ def SendInscriptionConfirmation(diction):
adresse = local_session[0]['adresse']
data_mail['adresse'] = adresse
session_ondemande = ""
if ("session_ondemande" in local_session[0].keys()):
if local_session[0]['session_ondemande']:
session_ondemande = local_session[0]['session_ondemande']
data_mail['session_ondemande'] = session_ondemande
local_status, local_message = email_session.incription_training_confirmation_mail(data_mail)
@ -807,6 +819,8 @@ def SendPre_InscriptionEmail(diction):
data_mail['telephone'] = local_session[0]['telephone']
#3 - Recuperations des info de la session (a distance, formateur, etc)
local_info_session = MYSY_GV.dbname['session_formation'].find({'formation_session_id': str(diction['session_id']),
'valide':'1'})
@ -849,6 +863,11 @@ def SendPre_InscriptionEmail(diction):
if local_info_session[0]['adresse']:
data_mail['adresse'] = local_info_session[0]['adresse']
if ("session_ondemande" in local_info_session[0].keys()):
if local_info_session[0]['session_ondemande']:
data_mail['session_ondemande'] = local_info_session[0]['session_ondemande']
#print(" Pre_incription_training_confirmation_mail DATA = ",data_mail )
# Envoi de l'email de confirmation au demandeur de la formation
@ -2690,6 +2709,13 @@ def Send_LMS_Credentials_to_particpants(diction):
return False, " - impossible de recuperer les données du partenaire"
# Par defaut, lms_virtualhost_url = l'url racine.
lms_virtualhost_url = MYSY_GV.MYSY_LMS_URL
if ("lms_virtualhost_url" in my_partner.keys()):
if my_partner['lms_virtualhost_url']:
lms_virtualhost_url = my_partner['lms_virtualhost_url']
data_mail = {}
# 1 - Recuperation des données de la formation
local_class = MYSY_GV.dbname['myclass'].find({'internal_url': str(diction['class_internal_url'])})
@ -2762,7 +2788,7 @@ def Send_LMS_Credentials_to_particpants(diction):
email_data['login'] = email
email_data['pwd'] = lms_pwd
email_data['lms_url'] = MYSY_GV.MYSY_LMS_URL
email_data['lms_url'] = str(lms_virtualhost_url)
email_data['course_owner_email'] = my_partner['email']
email_data['partner_recid'] = my_partner['recid']

View File

@ -1584356,3 +1584356,255 @@ INFO:werkzeug:127.0.0.1 - - [22/May/2023 22:00:01] "POST /myclass/api/GetActiveS
INFO:root:2023-05-22 22:00:01.381908 : Security check : IP adresse '127.0.0.1' connected
INFO:werkzeug:127.0.0.1 - - [22/May/2023 22:00:01] "POST /myclass/api/get_class/ HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [22/May/2023 22:00:01] "POST /myclass/api/get_associated_class_of_partnair/ HTTP/1.1" 200 -
INFO:root:2023-05-24 21:16:56.249503 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:16:56.250502 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:16:56.251504 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:16:56.251504 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:16:56.251504 : ++ LMS_BAS_URL mysy-training.fr/ ++
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://localhost:5001
INFO:werkzeug:Press CTRL+C to quit
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 21:17:07.625989 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:17:07.625989 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:17:07.625989 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:17:07.626994 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:17:07.626994 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 21:36:42.518340 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:36:42.518340 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:36:42.518340 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:36:42.518340 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:36:42.518340 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 21:37:31.282957 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:37:31.282957 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:37:31.282957 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:37:31.282957 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:37:31.282957 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 21:38:14.448136 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:38:14.448136 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:38:14.449138 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:38:14.449138 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:38:14.449138 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 21:39:08.522603 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:39:08.522603 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:39:08.522603 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:39:08.522603 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:39:08.522603 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 21:39:26.341683 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:39:26.341683 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:39:26.341683 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:39:26.341683 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:39:26.341683 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 21:39:44.535507 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 21:39:44.535507 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 21:39:44.536509 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 21:39:44.536509 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 21:39:44.536509 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:04:17.240272 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:04:17.240272 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:04:17.240272 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:04:17.241275 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:04:17.241275 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:04:58.725168 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:04:58.725168 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:04:58.725677 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:04:58.725677 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:04:58.725677 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:15:38.359759 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:15:38.359759 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:15:38.359759 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:15:38.359759 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:15:38.359759 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:16:51.212173 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:16:51.212173 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:16:51.212173 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:16:51.212173 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:16:51.212173 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:17:29.964112 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:17:29.964112 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:17:29.964112 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:17:29.965125 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:17:29.965125 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:18:46.120720 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:18:46.120720 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:18:46.120720 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:18:46.120720 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:18:46.120720 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\email_inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:19:26.236500 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:19:26.236500 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:19:26.236500 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:19:26.236500 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:19:26.236500 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:38:56.214024 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:38:56.214024 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:38:56.214024 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:38:56.214024 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:38:56.214024 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:39:21.572032 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:39:21.573030 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:39:21.574037 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:39:21.574037 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:39:21.575037 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-24 22:39:46.270782 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-24 22:39:46.270782 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-24 22:39:46.270782 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-24 22:39:46.270782 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-24 22:39:46.270782 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:02:14.402028 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:02:14.402028 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:02:14.402028 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:02:14.402028 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:02:14.402028 : ++ LMS_BAS_URL mysy-training.fr/ ++
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://localhost:5001
INFO:werkzeug:Press CTRL+C to quit
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:02:30.457067 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:02:30.458071 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:02:30.458071 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:02:30.458071 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:02:30.458071 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:04:30.253450 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:04:30.253450 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:04:30.253450 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:04:30.253450 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:04:30.253450 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:20:00.882320 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:20:00.883315 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:20:00.883315 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:20:00.883315 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:20:00.883315 : ++ LMS_BAS_URL mysy-training.fr/ ++
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://localhost:5001
INFO:werkzeug:Press CTRL+C to quit
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:20:13.838326 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:20:13.838326 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:20:13.838326 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:20:13.839792 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:20:13.839792 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:41:18.215993 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:41:18.215993 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:41:18.215993 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:41:18.215993 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:41:18.215993 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:42:13.313257 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:42:13.314256 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:42:13.314256 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:42:13.314256 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:42:13.314256 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:42:50.789834 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:42:50.790834 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:42:50.790834 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:42:50.790834 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:42:50.790834 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:43:09.798031 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:43:09.798031 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:43:09.799543 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:43:09.799543 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:43:09.799543 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat
INFO:root:2023-05-25 12:43:34.764262 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++
INFO:root:2023-05-25 12:43:34.764262 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++
INFO:root:2023-05-25 12:43:34.764262 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++
INFO:root:2023-05-25 12:43:34.764262 : ++ FLASK PORT 5001 ++
INFO:root:2023-05-25 12:43:34.764262 : ++ LMS_BAS_URL mysy-training.fr/ ++
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 710-830-086
INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\Inscription_mgt.py', reloading
INFO:werkzeug: * Restarting with stat

View File

@ -77,6 +77,9 @@
style="height:165px; padding-left: 10px; padding-right: 10px;font-size: x-small;"
valign="middle" width="600">
{% if params.session_ondemande is defined and params.session_ondemande != '1' %}
<div style="display: block;">
<div style="margin-left: auto; margin-right: auto;font-size: x-small;">
<div style="text-align: center; font-family: Verdana, Geneva, Tahoma, sans-serif;
@ -92,7 +95,7 @@
Votre demande d'inscription à la session de
formation :
<font color="green" weight="bold"> {{params.title}}
<font color="green" weight="bold"><b> {{params.title}} </b>
</font> qui se tiendra
{% if params.date_du == params.date_fin %}
@ -150,6 +153,52 @@
</p>
</div>
</div>
{% endif %}
{% if params.session_ondemande is defined and params.session_ondemande == '1' %}
<div style="margin-left: auto; margin-right: auto;font-size: x-small;">
<div style="text-align: center; font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: x-small; line-height: 1.4rem;color: #3b3e40;">
<p
style="font-size:14px;font-weight:600; margin-top: 1rem;color:#232558;">
Votre demande d'inscription à la formation : {{
params.title }}</p>
<p style="text-align:justify; font-size:13px; text-align: left;"> Bonjour {{params.nom}} {{params.prenom}}</p>
<p style="text-align:justify; font-size:13px; line-height: 1.8rem;">
<p style="text-align:justify; font-size:13px; line-height: 1.8rem;">
Votre demande d'inscription à la session de
formation en ligne:
<font color="green" weight="bold"><b> {{params.title}} </b> </font>
a bien été prise en compte.
</p>
<p style="text-align:justify; font-size:13px; line-height: 1.8rem;">
Notre équipe pédagogique prendra rapidement contact
avec vous pour finaliser votre inscription.
</p>
<p style="text-align:justify; font-size:13px; line-height: 1.8rem;">
Nous vous remercions d'avoir choisi notre formation.
</p>
</p>
<p
style="font-size: 13px;margin-top: 1rem; line-height: normal; margin-bottom: 1rem; text-align: left;line-height: 1.6rem;">
Cordialement<br /> <br/>
<b>MySy Training Technology</b><br />
Téléphone : +331 77 00 38 57<br />
Email : contact@mysy-training.com<br />
Site : https://www.mysy-training.com/
</p>
</div>
</div>
{% endif %}
-------------
</div>
</td>

View File

@ -76,7 +76,7 @@
<td align="center" height="165"
style="height:165px; padding-left: 10px; padding-right: 10px;background-color:#F9F9FF"
valign="middle" width="600">
{% if params.session_ondemande is defined and params.session_ondemande != '1' %}
<div style="display: block;">
<div style="margin-left: auto; margin-right: auto">
<div style="text-align: center;
@ -178,6 +178,68 @@
</div>
</div>
</div>
{% endif %}
{% if params.session_ondemande is defined and params.session_ondemande == '1' %}
<div style="display: block;">
<div style="margin-left: auto; margin-right: auto">
<div style="text-align: center;
font-size: x-small; line-height: 1.4rem;color: #3b3e40;">
<p
style="font-size:14px;font-weight:600; margin-top: 1rem;color:#232558;">
MySy Training : Inscription à la formation {{
params.title }}</p>
<p
style="text-align:justify; font-size:13px; text-align: left;">
Bonjour {{params.nom}} {{params.prenom}}</p>
<p style="text-align:justify">
<p style="text-align:justify; font-size:13px; line-height: 1.8rem;">
Nous avons le plaisir de vous confirmer votre
inscription à la session de formation en ligne :
<font color="green" weight="bold"> <b> {{params.title}} </b>
</font>
</p>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center" valign="middle"
width="600">
<img alt="Mysy Training Logo"
src="https://img.mysy-training.com/Ok_PNG.png"
alt="Mysy Training ok" width="10%"
style="display: block;" />
</td>
</tr>
</tbody>
</table>
<p style="text-align:justify; font-size:13px; line-height: 1.8rem;">
Vous recevrez très prochainement vos identifiants de connexion ainsi que les modalités de participation.
</p>
<p style="text-align:justify; font-size:13px; line-height: 1.8rem;">
Vous trouverez en pièce jointe les conditions dannulation de votre inscription, si besoin.
Merci pour votre confiance.
</p>
</p>
<p
style="font-size: 13px;margin-top: 1rem; line-height: normal; margin-bottom: 1rem; text-align: left;line-height: 1.6rem;">
Cordialement<br /> <br/>
<b>MySy Training Technology</b><br />
Téléphone : +331 77 00 38 57<br />
Email : contact@mysy-training.com<br />
Site : https://www.mysy-training.com/
</p>
</div>
</div>
</div>
{% endif %}
</td>
</tr>

View File

@ -78,6 +78,11 @@ def incription_training_confirmation_mail(diction):
adresse_session = adresse
session_ondemande = ""
if ("session_ondemande" in diction.keys()):
if diction['session_ondemande']:
session_ondemande = diction['session_ondemande']
"""
send_smtp_email = sib_api_v3_sdk.SendSmtpEmail(template_id=1, params={ "nom": str(diction['nom']),
@ -136,14 +141,12 @@ def incription_training_confirmation_mail(diction):
"date_fin": str(diction['date_au']),
"adresse": str(adresse_session),
"title": str(diction['title']),
"code_postal": str(local_code_postal),
"ville": str(local_ville),
"distantiel": str(local_distantiel),
"presentiel": str(local_presentiel),
"formateur": str(local_formateur),
"session_ondemande": str(session_ondemande),
"email": str(diction['email'])},
}
@ -446,6 +449,11 @@ def Pre_incription_training_confirmation_mail(diction):
if diction['adresse']:
local_adress = diction['adresse']
session_ondemande = "0"
if ("session_ondemande" in diction.keys()):
if diction['session_ondemande']:
session_ondemande = diction['session_ondemande']
# JINJA2
templateLoader = jinja2.FileSystemLoader(searchpath="./")
templateEnv = jinja2.Environment(loader=templateLoader)
@ -463,7 +471,10 @@ def Pre_incription_training_confirmation_mail(diction):
"code_postal": str(diction['code_postal']),
"ville": str(diction['ville']),
"adresse":str(local_adress),
"email": str(diction['email'])},
"email": str(diction['email']),
"session_ondemande": str(session_ondemande),
},
}
sourceHtml = template.render(params=body["params"])
@ -531,6 +542,11 @@ def Notification_partner_Pre_incription_mail(diction):
if diction['code_postal']:
local_code_postal = diction['code_postal']
session_ondemande = "0"
if ("session_ondemande" in diction.keys()):
if diction['session_ondemande']:
session_ondemande = diction['session_ondemande']
tomorrow = datetime.date.today() + datetime.timedelta(days=1)
tomorrow_day = tomorrow.strftime("%A")
@ -570,7 +586,9 @@ def Notification_partner_Pre_incription_mail(diction):
"title": str(diction['title']),
"code_postal": str(local_code_postal),
"ville": str(local_ville),
"email": str(diction['email'])},
"email": str(diction['email']),
"session_ondemande": str(session_ondemande),
},
}
sourceHtml = template.render(params=body["params"])

View File

@ -1776,6 +1776,20 @@ def Create_MySy_LMS_Apprenant(diction):
mycommon.myprint(str(inspect.stack()[0][3]) + " - Le token est vide")
return False, " Impossible de créer le compte LMS", False
# Recuperation des données du partenaire qui est propritaire de la formation
local_status, my_partner = mycommon.get_partner_data_from_recid(partner_recid)
if (local_status is False):
mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire proprietaire de la formation")
return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire proprietaire de la formation"
# On affecte le lms_virtualhost_id par defaut à la racine, donc le site principale.
# Si le propritaire de la formation à un 'lms_virtualhost_id' dédié, on remplace le principale par celui du proprio
lms_virtualhost_id = "1"
if ("lms_virtualhost_id" in my_partner.keys()):
if my_partner['lms_virtualhost_id']:
lms_virtualhost_id = my_partner['lms_virtualhost_id']
lastname = ""
if ("lastname" in diction.keys()):
if diction['lastname']:
@ -1933,7 +1947,7 @@ def Create_MySy_LMS_Apprenant(diction):
lastrowid = cur.lastrowid
my_query_access_url_rel_user = "INSERT INTO access_url_rel_user SET access_url_id='1' , user_id='" + str(
my_query_access_url_rel_user = "INSERT INTO access_url_rel_user SET access_url_id='"+str(lms_virtualhost_id)+"' , user_id='" + str(
new_lms_user_id) + "' "
print(" ### my_query_access_url_rel_user = ", my_query_access_url_rel_user)
try: