From 19575ec64ed7bd46b0035f69e0edab8835b5f759 Mon Sep 17 00:00:00 2001 From: cherif Date: Mon, 29 May 2023 20:46:57 +0200 Subject: [PATCH] 29/0523 - 20h --- .idea/workspace.xml | 20 +- GlobalVariable.py | 4 +- Inscription_mgt.py | 5 + Log/log_file.log | 222 ++++++++++ Template/MySy_Evaluation_Class_tpl.html | 512 +++++++++++++++++++++--- email_inscription_mgt.py | 3 +- lms_chamilo/mysy_lms.py | 9 +- prj_common.py | 16 +- 8 files changed, 720 insertions(+), 71 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9f5f2c9..25d87fb 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,13 +1,15 @@ - + + - - + + + @@ -292,6 +301,7 @@ - \ No newline at end of file diff --git a/GlobalVariable.py b/GlobalVariable.py index ff0d123..3ec3d2b 100644 --- a/GlobalVariable.py +++ b/GlobalVariable.py @@ -269,8 +269,8 @@ MAX_PARTICIPANT_BY_CSV = 50 Stripe : Nom des produits et prix et la clé de config """ if (MYSY_ENV == "PROD"): - STRIPE_GOLD_PRICE_ID = "price_1MT0hIAbmaEugrFTBZxxyUdB" - STRIPE_STANDARD_PRICE_ID = "price_1MT0icAbmaEugrFTvtvpMZbG" + STRIPE_GOLD_PRICE_ID = "price_1MUSs8AbmaEugrFTLotyGESS" + STRIPE_STANDARD_PRICE_ID = "price_1MUSoGAbmaEugrFTTjz5lSye" STRIPE_TEST_PRICE_ID = "price_1MT0f0AbmaEugrFTJjdZZXG7" STRIPE_CONFIG_KEY_PUB = "pk_live_51LUUfAAbmaEugrFTyfNe4Dj0vbxc5qXQqNs0rztjAKy8oSlc5EEQyJGjA8Z5kXmP2gvUMcYLUBYCIyWWzLCw59RY00PtGInkVf" STRIPE_CONFIG_API_KEY = "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" diff --git a/Inscription_mgt.py b/Inscription_mgt.py index db57c6e..3838397 100644 --- a/Inscription_mgt.py +++ b/Inscription_mgt.py @@ -2026,6 +2026,11 @@ def SendTrainingEvaluationEmail(diction): if local_session_info['presentiel']: my_retrun_dict['presentiel'] = local_session_info['presentiel'] + session_ondemande = "" + if ("session_ondemande" in local_session_info.keys()): + if local_session_info['session_ondemande']: + my_retrun_dict['session_ondemande'] = local_session_info['session_ondemande'] + # Envoi de l'email de notification au formateur local_status, local_message = email_session.Evaluation_training_confirmation_mail(my_retrun_dict) diff --git a/Log/log_file.log b/Log/log_file.log index 08c3df8..020fdeb 100644 --- a/Log/log_file.log +++ b/Log/log_file.log @@ -1586049,3 +1586049,225 @@ DEBUG:stripe:link=https://dashboard.stripe.com/test/logs/req_ejLuxaP8bXeaiW mess INFO:stripe:error_code=None error_message='You cannot update a subscription that is `canceled` or `incomplete_expired`.' error_param=None error_type=invalid_request_error message='Stripe API error received' INFO:root:2023-05-27 20:00:12.632689 : strip_update_subscription_qty -Request req_ejLuxaP8bXeaiW: You cannot update a subscription that is `canceled` or `incomplete_expired`. - ERRORRRR AT Line : 849 INFO:werkzeug:127.0.0.1 - - [27/May/2023 20:00:12] "POST /myclass/api/strip_update_subscription_qty/ HTTP/1.1" 200 - +INFO:root:2023-05-29 09:54:37.255197 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-05-29 09:54:37.256217 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-05-29 09:54:37.256217 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-05-29 09:54:37.256217 : ++ FLASK PORT 5001 ++ +INFO:root:2023-05-29 09:54:37.256217 : ++ 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-29 09:54:49.875856 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-05-29 09:54:49.875856 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-05-29 09:54:49.875856 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-05-29 09:54:49.875856 : ++ FLASK PORT 5001 ++ +INFO:root:2023-05-29 09:54:49.875856 : ++ LMS_BAS_URL mysy-training.fr/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 128-772-473 +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-29 15:42:41.724205 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-05-29 15:42:41.724205 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-05-29 15:42:41.724205 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-05-29 15:42:41.725257 : ++ FLASK PORT 5001 ++ +INFO:root:2023-05-29 15:42:41.725257 : ++ LMS_BAS_URL mysy-training.fr/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 128-772-473 +INFO:root:2023-05-29 18:59:30.763927 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-05-29 18:59:30.765950 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-05-29 18:59:30.765950 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-05-29 18:59:30.765950 : ++ FLASK PORT 5001 ++ +INFO:root:2023-05-29 18:59:30.765950 : ++ 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-29 18:59:46.218670 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-05-29 18:59:46.218670 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-05-29 18:59:46.218670 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-05-29 18:59:46.218670 : ++ FLASK PORT 5001 ++ +INFO:root:2023-05-29 18:59:46.218670 : ++ LMS_BAS_URL mysy-training.fr/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 128-772-473 +INFO:root:2023-05-29 19:00:04.519229 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:04.520837 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:04.521867 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:04] "POST /myclass/api/get_List_domaine_formation/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:04] "POST /myclass/api/Get_Suggested_Fr_Cities/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:04] "POST /myclass/api/Get_Suggested_Word/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:05.712352 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:05.713925 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:05] "POST /myclass/api/get_all_class/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.234573 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.237847 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.240870 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.244004 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.247016 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.251341 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.259453 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.264693 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.272502 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.274802 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.277040 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.280382 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.289013 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.294403 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.297916 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.304350 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.309037 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.312513 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:06.316763 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:06.326521 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:06] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:09.714260 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:10.504581 : partner_login Connexion partnair contact@mysy-training.com : OK, Date : 2023-05-29 19:00:09.715334 , _id = 641c21666cad03956ab28252 +INFO:root:2023-05-29 19:00:10.517152 : partner_login Connexion partener_token : OK , _id = 641c23520d5d7f136a823b3c +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:10] "POST /myclass/api/partner_login/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:10.636451 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:10.640414 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:10.642749 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:10] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:10.647741 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:10.657315 : Connexion du partner recid = 8a77c1642a21a9a417a8583f4ef7f2f9c174a99996abb4c63a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:10] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:10] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:10] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:10.788592 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:10] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:00:15.347733 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:00:15.352735 : Connexion du partner recid = 8a77c1642a21a9a417a8583f4ef7f2f9c174a99996abb4c63a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:00:15] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:23.726813 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:23.729031 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:23] "POST /myclass/api/get_List_domaine_formation/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:23.732049 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:23] "POST /myclass/api/Get_Suggested_Fr_Cities/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:23] "POST /myclass/api/Get_Suggested_Word/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:24.696148 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:24.698139 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:24] "POST /myclass/api/get_all_class/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.396239 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:25.399765 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.403337 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.410361 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.414360 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.420049 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.426583 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:25.430084 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.436136 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.442337 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.448629 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.454958 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.463673 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.472480 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.477014 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:25.482028 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.489525 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.495882 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.504133 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:25.510170 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:25] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:28.953527 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:28.956525 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:28.956525 : Le token partner est vide +INFO:root:2023-05-29 19:07:28.960530 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:28.963590 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:28.963590 : Le token partner est vide +INFO:root:2023-05-29 19:07:28.968087 : Le token du partenaire n'est pas valide +INFO:root:2023-05-29 19:07:28.973304 : getRecodedImage - Impossible de recuperer le recid du user +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:28] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:28.976840 : get_partner_account - Le token n'est pas valide +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:28] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:28.980323 : LMS_Get_Partner_Data - partner_recid KO : Impossible d'importer la liste des participants +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:28] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:28.988557 : get_partner_class - Le token est vide +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:28] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:31.632598 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:31.637701 : partner_login Connexion partnair contact@mysy-training.com : OK, Date : 2023-05-29 19:07:31.633619 , _id = 641c21666cad03956ab28252 +INFO:root:2023-05-29 19:07:31.642150 : partner_login Connexion partener_token : OK , _id = 641c23520d5d7f136a823b3c +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:31] "POST /myclass/api/partner_login/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:31.771370 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:31.775383 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:31] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:31.784182 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:31.784182 : Connexion du partner recid = 8a77c1642a21a9a417a8583f4ef7f2f9c174a99996abb4c63a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:31] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:31.787645 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:31] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:31] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:32.033122 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:32] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:07:37.526532 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:07:37.531846 : Connexion du partner recid = 8a77c1642a21a9a417a8583f4ef7f2f9c174a99996abb4c63a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:07:37] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:15:37.155329 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:15:37.159475 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:15:37] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:15:37.164463 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:15:37.168696 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:15:37.174121 : Connexion du partner recid = 8a77c1642a21a9a417a8583f4ef7f2f9c174a99996abb4c63a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:15:37] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:15:37] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:15:37] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:15:38.194932 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:15:38] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 - +INFO:root:2023-05-29 19:15:40.859822 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-05-29 19:15:40.865981 : Connexion du partner recid = 8a77c1642a21a9a417a8583f4ef7f2f9c174a99996abb4c63a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/May/2023 19:15:40] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +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-29 20:25:21.976639 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-05-29 20:25:21.976639 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-05-29 20:25:21.976639 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-05-29 20:25:21.977639 : ++ FLASK PORT 5001 ++ +INFO:root:2023-05-29 20:25:21.977639 : ++ LMS_BAS_URL mysy-training.fr/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 128-772-473 +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-29 20:26:26.669625 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-05-29 20:26:26.669625 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-05-29 20:26:26.669625 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-05-29 20:26:26.669625 : ++ FLASK PORT 5001 ++ +INFO:root:2023-05-29 20:26:26.669625 : ++ LMS_BAS_URL mysy-training.fr/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 128-772-473 diff --git a/Template/MySy_Evaluation_Class_tpl.html b/Template/MySy_Evaluation_Class_tpl.html index a645b2e..7f78784 100644 --- a/Template/MySy_Evaluation_Class_tpl.html +++ b/Template/MySy_Evaluation_Class_tpl.html @@ -70,7 +70,7 @@ + style="background-color:#F9F9FF"> - - -
-

- Evalution de la formation

-

Bonjour {{ params.prenom }}   {{ params.nom }}

+ +

-

- Vous avez suivi la fomation {{ params.title }} du {{ params.date_du }} au {{ params.date_fin }} - Merci d'evaluer cette fomration, -

- -
- - -
- - -
Evaluez la formation
-
-
- + + + + + + +
+
+
+
+ + + + + + +
+ + + + + + +
+
+ 👋 + Chère + / + Cher + {{ + params.prenom + }} + {{ + params.nom + }}, +
+
+ {% + if + params.session_ondemande + is + defined + and + params.session_ondemande + == + '1' + %} +

+ Vous + avez + suivi + la + fomation + {{ + params.title + }} + en ligne.
+ Merci + d'evaluer + cette + fomration, + + +

+ {% + else + %} + + {% if params.date_du == params.date_fin %} +

+ Vous + avez + suivi + la + fomation + {{ + params.title + }} + le + {{ + params.date_du + }} +
+ Merci + d'evaluer + cette + fomration, + + +

+ {% else %} +

+ Vous + avez + suivi + la + fomation + {{ + params.title + }} + du + {{ + params.date_du + }} + au + {{ + params.date_fin + }}
+ Merci + d'evaluer + cette + fomration, + + +

+ {% endif %} + + {% + endif + %} + + Avez-vous + aimé + cette + formation + ? +
+ + + + + + + + + + + + + + +
+
+ Si + vous + ne + parvenez + pas + à + cliquer + sur + une + étoile, + vous + pouvez + copier/coller + ce + lien + dans + votre + navigateur + pour + démarrer + l'enquête:{{params.mysyurl}} + +
+
+
+
+ + + + + + + +
+
+
+
+ + + + + + +
+
+

👉 + En + prenant + un + peu + de + votre + temps + pour + répondre + à + ce + questionnaire + vous + nous + donnez + les + moyens + de + mieux + vous + satisfaire + et + d'améliorer + l'efficacité + de + notre + travail.👉 + Vous + pouvez + interrompre + le + questionnaire + et + le + reprendre + à + tout + moment + en + cliquant + à + nouveau + sur + le + lien. + + + + +

+
+
+
+
+ +
+ + +
+ Merci + pour + votre + implication + et + votre + coopération.

- Cordialement

- MySy Training Technology
- Téléphone : +331 77 00 38 57
- Email : contact@mysy-training.com
- Site : https://www.mysy-training.com/ -

+ style="font-size: 13px;margin-top: 1rem; line-height: normal; margin-bottom: 1rem; text-align: left;line-height: 1.6rem;"> + Cordialement

+ MySy Training Technology
+ Téléphone : +331 77 00 38 57
+ Email : contact@mysy-training.com
+ Site : https://www.mysy-training.com/ +

+
- -
- - - - + + + + + + + + - - - - - - - - + + + - - -
+
+ + + + - - -
-

  -
  -
+
  + -
-
- - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/email_inscription_mgt.py b/email_inscription_mgt.py index aae79fe..02da16f 100644 --- a/email_inscription_mgt.py +++ b/email_inscription_mgt.py @@ -627,7 +627,7 @@ def Evaluation_training_confirmation_mail(diction): """ Verification de la liste des champs obligatoires """ - field_list_obligatoire = ['nom', 'prenom', 'email', 'date_du', 'date_au', 'adresse', 'title', 'token_eval', 'internal_url'] + field_list_obligatoire = ['nom', 'prenom', 'email', 'date_du', 'date_au', 'adresse', 'title', 'token_eval', 'internal_url', 'session_ondemande'] for val in field_list_obligatoire: if val not in diction: mycommon.myprint( @@ -680,6 +680,7 @@ def Evaluation_training_confirmation_mail(diction): "presentiel": str(diction['presentiel']), "distantiel": str(diction['distantiel']), "email": str(diction['email']), + "session_ondemande": str(diction['session_ondemande']), "mysyurl": str(my_url)} } sourceHtml = template.render(params=body["params"]) diff --git a/lms_chamilo/mysy_lms.py b/lms_chamilo/mysy_lms.py index a8b5566..66c6e1e 100644 --- a/lms_chamilo/mysy_lms.py +++ b/lms_chamilo/mysy_lms.py @@ -171,10 +171,15 @@ def Create_MySy_LMS_User(diction): suffix_nom_partner = str(nom_partner)[0:3] - username = str(str(username)+"_"+str(suffix_nom_partner)).lower() - username = unidecode(username) + local_status, username = mycommon.RemoveAllNonAlphaNumeric(unidecode(username)) + if( local_status is False ): + mycommon.myprint( + str(inspect.stack()[0][3]) + " - erreur : RemoveAllNonAlphaNumeric ") + return False, str( + inspect.stack()[0][3]) + " - erreur : RemoveAllNonAlphaNumeric " + #print(" ### username = ",username) registration_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S") diff --git a/prj_common.py b/prj_common.py index 59f74a4..89a6798 100644 --- a/prj_common.py +++ b/prj_common.py @@ -2992,4 +2992,18 @@ def is_LMS_user_exist(diction): except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno)) - return False, " Impossible de verifier l'existence du compte utilisateur dans le LMS " \ No newline at end of file + return False, " Impossible de verifier l'existence du compte utilisateur dans le LMS " + +""" +# Remove all non-alphanumeric characters from string +Cette fonction supprime tous les caractères non alphanumeric d'une chaine +""" +def RemoveAllNonAlphaNumeric(sentence): + try: + new_sentence = re.sub(r'[\W_]', '', sentence) + return True, new_sentence + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de RemoveAllNonAlphaNumeric " \ No newline at end of file