diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 54daabc..ea33e86 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,13 +1,10 @@ - + - - - @@ -429,7 +426,6 @@ - @@ -454,6 +450,7 @@ - \ No newline at end of file diff --git a/Log/log_file.log b/Log/log_file.log index 087b9f4..c3e9dae 100644 --- a/Log/log_file.log +++ b/Log/log_file.log @@ -1677747,3 +1677747,361 @@ RuntimeError: Working outside of application context. This typically means that you attempted to use functionality that needed the current application. To solve this, set up an application context with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-25 21:31:21.157776+02:00 (in 299.992369 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-25 21:31:21 CEST)" (scheduled at 2023-07-25 21:26:21.157776+02:00) +INFO:root:2023-07-25 21:26:21.167120 : mardi, 25. juillet 2023 09:26:21 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-25 21:31:21 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-25 21:36:07.775918+02:00 (in 299.997449 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-25 21:36:07 CEST)" (scheduled at 2023-07-25 21:31:07.775918+02:00) +INFO:root:2023-07-25 21:31:07.780470 : mardi, 25. juillet 2023 09:31:07 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-25 21:36:07 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-25 21:36:21.157776+02:00 (in 299.989727 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-25 21:36:21 CEST)" (scheduled at 2023-07-25 21:31:21.157776+02:00) +INFO:root:2023-07-25 21:31:21.170053 : mardi, 25. juillet 2023 09:31:21 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-25 21:36:21 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +INFO:root:2023-07-26 22:36:21.784659 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-07-26 22:36:21.785668 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-07-26 22:36:21.785668 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-07-26 22:36:21.785668 : ++ FLASK PORT 5001 ++ +INFO:root:2023-07-26 22:36:21.785668 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:apscheduler.scheduler:Adding job tentatively -- it will be properly scheduled when the scheduler starts +INFO:apscheduler.scheduler:Added job "Flask_Cron_Strip_Get_Customer_Abonnement_Data" to job store "default" +INFO:apscheduler.scheduler:Scheduler started +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:41:21.857212+02:00 (in 299.996361 seconds) +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-07-26 22:36:34.454576 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-07-26 22:36:34.455868 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-07-26 22:36:34.455868 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-07-26 22:36:34.455868 : ++ FLASK PORT 5001 ++ +INFO:root:2023-07-26 22:36:34.455868 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:apscheduler.scheduler:Adding job tentatively -- it will be properly scheduled when the scheduler starts +INFO:apscheduler.scheduler:Added job "Flask_Cron_Strip_Get_Customer_Abonnement_Data" to job store "default" +INFO:apscheduler.scheduler:Scheduler started +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:41:34.529353+02:00 (in 299.997000 seconds) +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 101-758-117 +INFO:root:2023-07-26 22:36:43.185162 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:36:43] "POST /myclass/api/Push_Class_To_MySy_LMS HTTP/1.1" 308 - +INFO:root:2023-07-26 22:36:43.196166 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-07-26 22:36:44.374541 : Impossible de créer la formation dans le LMS (5){ProgrammingError("You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(21, '8', 'email_to_teachers_on_new_work_feedback', NULL, NULL, '', '1', '',...' at line 1")} +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:36:44] "POST /myclass/api/Push_Class_To_MySy_LMS/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading +INFO:apscheduler.scheduler:Scheduler has been shut down +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added +INFO:werkzeug: * Restarting with stat +INFO:root:2023-07-26 22:38:16.801653 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-07-26 22:38:16.801653 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-07-26 22:38:16.801653 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-07-26 22:38:16.801653 : ++ FLASK PORT 5001 ++ +INFO:root:2023-07-26 22:38:16.801653 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:apscheduler.scheduler:Adding job tentatively -- it will be properly scheduled when the scheduler starts +INFO:apscheduler.scheduler:Added job "Flask_Cron_Strip_Get_Customer_Abonnement_Data" to job store "default" +INFO:apscheduler.scheduler:Scheduler started +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:43:16.873421+02:00 (in 299.997003 seconds) +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 101-758-117 +DEBUG:apscheduler.scheduler:Looking for jobs to run +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:41:21 CEST)" (scheduled at 2023-07-26 22:41:21.857212+02:00) +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:46:21.857212+02:00 (in 299.997676 seconds) +INFO:root:2023-07-26 22:41:21.873734 : mercredi, 26. juillet 2023 10:41:21 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:46:21 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +INFO:root:2023-07-26 22:41:48.993932 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:41:48] "POST /myclass/api/Push_Class_To_MySy_LMS HTTP/1.1" 308 - +INFO:root:2023-07-26 22:41:49.006020 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:41:50] "POST /myclass/api/Push_Class_To_MySy_LMS/ HTTP/1.1" 200 - +DEBUG:apscheduler.scheduler:Looking for jobs to run +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:43:16 CEST)" (scheduled at 2023-07-26 22:43:16.873421+02:00) +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:48:16.873421+02:00 (in 299.988147 seconds) +INFO:root:2023-07-26 22:43:16.888756 : mercredi, 26. juillet 2023 10:43:16 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:48:16 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +INFO:root:2023-07-26 22:44:08.581109 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:44:08] "POST /myclass/api/Push_Class_To_MySy_LMS HTTP/1.1" 308 - +INFO:root:2023-07-26 22:44:08.590082 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:44:09] "POST /myclass/api/Push_Class_To_MySy_LMS/ HTTP/1.1" 200 - +INFO:root:2023-07-26 22:45:40.723939 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:45:40] "POST /myclass/api/Push_Class_To_MySy_LMS HTTP/1.1" 308 - +INFO:root:2023-07-26 22:45:40.735350 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:45:41] "POST /myclass/api/Push_Class_To_MySy_LMS/ HTTP/1.1" 200 - +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:51:21.857212+02:00 (in 299.987205 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:51:21 CEST)" (scheduled at 2023-07-26 22:46:21.857212+02:00) +INFO:root:2023-07-26 22:46:21.873775 : mercredi, 26. juillet 2023 10:46:21 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:51:21 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:53:16.873421+02:00 (in 299.996404 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:53:16 CEST)" (scheduled at 2023-07-26 22:48:16.873421+02:00) +INFO:root:2023-07-26 22:48:16.879030 : mercredi, 26. juillet 2023 10:48:16 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:53:16 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:56:21.857212+02:00 (in 299.984354 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:56:21 CEST)" (scheduled at 2023-07-26 22:51:21.857212+02:00) +INFO:root:2023-07-26 22:51:21.875933 : mercredi, 26. juillet 2023 10:51:21 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:56:21 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +INFO:root:2023-07-26 22:52:41.525023 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:52:41] "POST /myclass/api/Push_Class_To_MySy_LMS HTTP/1.1" 308 - +INFO:root:2023-07-26 22:52:41.533270 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:52:42] "POST /myclass/api/Push_Class_To_MySy_LMS/ HTTP/1.1" 200 - +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:58:16.873421+02:00 (in 299.986062 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:58:16 CEST)" (scheduled at 2023-07-26 22:53:16.873421+02:00) +INFO:root:2023-07-26 22:53:16.889352 : mercredi, 26. juillet 2023 10:53:16 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:58:16 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\lms_chamilo\\mysy_lms.py', reloading +INFO:apscheduler.scheduler:Scheduler has been shut down +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added +INFO:werkzeug: * Restarting with stat +INFO:root:2023-07-26 22:53:53.878677 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-07-26 22:53:53.878677 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-07-26 22:53:53.878677 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-07-26 22:53:53.879684 : ++ FLASK PORT 5001 ++ +INFO:root:2023-07-26 22:53:53.879684 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:apscheduler.scheduler:Adding job tentatively -- it will be properly scheduled when the scheduler starts +INFO:apscheduler.scheduler:Added job "Flask_Cron_Strip_Get_Customer_Abonnement_Data" to job store "default" +INFO:apscheduler.scheduler:Scheduler started +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 22:58:54.206547+02:00 (in 299.992986 seconds) +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 101-758-117 +INFO:root:2023-07-26 22:53:58.378199 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:53:58] "POST /myclass/api/Push_Class_To_MySy_LMS HTTP/1.1" 308 - +INFO:root:2023-07-26 22:53:58.387199 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [26/Jul/2023 22:53:59] "POST /myclass/api/Push_Class_To_MySy_LMS/ HTTP/1.1" 200 - +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 23:01:21.857212+02:00 (in 299.994417 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 23:01:21 CEST)" (scheduled at 2023-07-26 22:56:21.857212+02:00) +INFO:root:2023-07-26 22:56:21.865800 : mercredi, 26. juillet 2023 10:56:21 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 23:01:21 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 22:58:54 CEST)" (scheduled at 2023-07-26 22:58:54.206547+02:00) +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 23:03:54.206547+02:00 (in 299.995015 seconds) +INFO:root:2023-07-26 22:58:54.215644 : mercredi, 26. juillet 2023 10:58:54 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 23:03:54 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 23:06:21.857212+02:00 (in 299.997149 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 23:06:21 CEST)" (scheduled at 2023-07-26 23:01:21.857212+02:00) +INFO:root:2023-07-26 23:01:21.863571 : mercredi, 26. juillet 2023 11:01:21 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 23:06:21 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. +DEBUG:apscheduler.scheduler:Looking for jobs to run +DEBUG:apscheduler.scheduler:Next wakeup is due at 2023-07-26 23:08:54.206547+02:00 (in 299.981208 seconds) +INFO:apscheduler.executors.default:Running job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 23:08:54 CEST)" (scheduled at 2023-07-26 23:03:54.206547+02:00) +INFO:root:2023-07-26 23:03:54.228141 : mercredi, 26. juillet 2023 11:03:54 : Envoie des données de prefacturation : - 0 clients ==> A traiter. - 0 clients==> traiter OKK. - 0 clients ==> traiter ERREUR. +ERROR:apscheduler.executors.default:Job "Flask_Cron_Strip_Get_Customer_Abonnement_Data (trigger: interval[0:05:00], next run at: 2023-07-26 23:08:54 CEST)" raised an exception +Traceback (most recent call last): + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job + retval = job.func(*job.args, **job.kwargs) + File "C:\Users\billa\Documents\myclass.com\Siteweb\Production\Ela_back\Back_Office\main.py", line 3127, in Flask_Cron_Strip_Get_Customer_Abonnement_Data + return jsonify(status=localStatus, message=message) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\json\__init__.py", line 342, in jsonify + return current_app.json.response(*args, **kwargs) + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 316, in __get__ + obj = instance._get_current_object() + File "C:\Users\billa\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\local.py", line 513, in _get_current_object + raise RuntimeError(unbound_message) from None +RuntimeError: Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information. diff --git a/lms_chamilo/mysy_lms.py b/lms_chamilo/mysy_lms.py index b5ff68b..e98d071 100644 --- a/lms_chamilo/mysy_lms.py +++ b/lms_chamilo/mysy_lms.py @@ -3589,6 +3589,127 @@ def Push_Class_To_MySy_LMS(diction): conn.commit() + """ + Recuperation du dernier iid de la table c_document + """ + query_max_c_document = " SELECT max(iid) FROM c_document " + + cur.execute(query_max_c_document) + max_c_document_id = "" + for query_max_c_document_val in cur: + max_c_document_id = query_max_c_document_val[0] + + if (int(mycommon.tryInt(max_c_document_id)) <= 0 ): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Vous n'avez pas les droits nécessaires pour publier une formation dans le LMS (3)") + return False, " - Vous n'avez pas les droits nécessaires pour publier une formation dans le LMS (3) ", + + max_c_document_id_int = int(mycommon.tryInt(max_c_document_id)) + 1 + query_insert_c_document = " INSERT INTO c_document (id,c_id,`path`,comment,title,filetype,`size`,readonly,session_id) " \ + " VALUES " \ + " ('"+str(max_c_document_id_int)+"', '"+ str(new_class_id) +"' ,'/shared_folder',NULL,'Répertoires des utilisateurs','folder',0,0,0), " \ + " ('"+str(max_c_document_id_int)+"', '"+ str(new_class_id) +"' ,'/chat_files',NULL,'Historique de conversations dans le chat','folder',0,0,0), " \ + " ('"+str(max_c_document_id_int)+"', '"+ str(new_class_id) +"' ,'/certificates',NULL,'Certificats','folder',0,0,0); " + + print(" #### query_insert_c_document = ", query_insert_c_document) + try: + cur.execute(query_insert_c_document) + + except mariadb.Error as e: + # print(f"Error: {e}") + mycommon.myprint(" Impossible de créer la formation dans le LMS (4)" + str({e})) + return False, " Impossible de créer la formation dans le LMS (4) " + str({e}) + + conn.commit() + + """ + Insertion dans la table : course_setting + """ + query_insert_course_setting = " INSERT INTO c_course_setting (id,c_id,variable,subkey,`type`,category,value,title,comment,subkeytext) VALUES " \ + " (1, '"+ str(new_class_id) +"', 'email_alert_manager_on_new_doc',NULL,NULL,'work','0','',NULL,NULL), " \ + " (2, '"+ str(new_class_id) +"', 'email_alert_on_new_doc_dropbox',NULL,NULL,'dropbox','0','',NULL,NULL), " \ + " (3, '"+ str(new_class_id) +"', 'allow_user_edit_agenda',NULL,NULL,'agenda','0','',NULL,NULL), " \ + " (4, '"+ str(new_class_id) +"', 'allow_user_edit_announcement',NULL,NULL,'announcement','0','',NULL,NULL), " \ + " (5, '"+ str(new_class_id) +"', 'email_alert_manager_on_new_quiz',NULL,NULL,'quiz','1','',NULL,NULL), " \ + " (6, '"+ str(new_class_id) +"', 'allow_user_image_forum',NULL,NULL,'forum','1','',NULL,NULL), " \ + " (7, '"+ str(new_class_id) +"', 'course_theme',NULL,NULL,'theme','','',NULL,NULL), " \ + " (8, '"+ str(new_class_id) +"', 'allow_learning_path_theme',NULL,NULL,'theme','1','',NULL,NULL), " \ + " (9, '"+ str(new_class_id) +"', 'allow_open_chat_window',NULL,NULL,'chat','1','',NULL,NULL), " \ + " (10, '"+ str(new_class_id) +"', 'email_alert_to_teacher_on_new_user_in_course',NULL,NULL,'registration','0','',NULL,NULL), " \ + " (11, '"+ str(new_class_id) +"', 'allow_user_view_user_list', NULL, NULL, 'user', '1', '', NULL, NULL)," \ + " (12, '"+ str(new_class_id) +"', 'display_info_advance_inside_homecourse', NULL, NULL, 'thematic_advance', '1', '', NULL, NULL)," \ + " (13, '"+ str(new_class_id) +"', 'email_alert_students_on_new_homework', NULL, NULL, 'work', '0', '', NULL, NULL)," \ + " (14, '"+ str(new_class_id) +"', 'enable_lp_auto_launch', NULL, NULL, 'learning_path', '0', '', NULL, NULL)," \ + " (15, '"+ str(new_class_id) +"', 'enable_exercise_auto_launch', NULL, NULL, 'exercise', '0', '', NULL, NULL)," \ + " (16, '"+ str(new_class_id) +"', 'enable_document_auto_launch', NULL, NULL, 'document', '0', '', NULL, NULL)," \ + " (17, '"+ str(new_class_id) +"', 'pdf_export_watermark_text', NULL, NULL, 'learning_path', '', '', NULL, NULL)," \ + " (18, '"+ str(new_class_id) +"', 'allow_public_certificates', NULL, NULL, 'certificates', '', '', NULL, NULL)," \ + " (19, '"+ str(new_class_id) +"', 'documents_default_visibility', NULL, NULL, 'document', 'visible', '', NULL, NULL)," \ + " (20, '"+ str(new_class_id) +"', 'show_course_in_user_language', NULL, NULL, '', '2', '', NULL, NULL), " \ + " (21, '"+ str(new_class_id) +"', 'email_to_teachers_on_new_work_feedback', NULL, NULL, '', '1', '', NULL, NULL)," \ + " (22, '"+ str(new_class_id) +"', 'email_alert_teachers_new_post', NULL, NULL, 'portfolio', '1', '', NULL, NULL)," \ + " (23, '"+ str(new_class_id) +"', 'email_alert_teachers_student_new_comment', NULL, NULL, 'portfolio', '1', '', NULL, NULL)," \ + " (24, '"+ str(new_class_id) +"', 'agenda_share_events_in_sessions', NULL, NULL, 'agenda', '0', '', NULL, NULL)," \ + " (NULL, '"+ str(new_class_id) +"', 'courselegal', 'courselegal', 'text', 'plugins', '', '', NULL, NULL)," \ + " (NULL, '"+ str(new_class_id) +"', 'customcertificate_course_enable', 'customcertificate', 'checkbox', 'plugins', '', '', NULL, NULL)," \ + " (NULL, '"+ str(new_class_id) +"', 'use_certificate_default', 'customcertificate', 'checkbox', 'plugins', '', '', NULL, NULL);" + + print(" #### query_insert_course_setting = ", query_insert_course_setting) + try: + cur.execute(query_insert_course_setting) + + except mariadb.Error as e: + # print(f"Error: {e}") + mycommon.myprint(" Impossible de créer la formation dans le LMS (5)" + str({e})) + return False, " Impossible de créer la formation dans le LMS (5) " + str({e}) + + conn.commit() + + """ + Insert dans la table : c_tool + """ + query_insert_c_tool = " INSERT INTO c_tool (id,c_id,name,link,image,visibility,admin,address,added_tool,target,category,session_id,description,custom_icon) VALUES " \ + " (1, '"+ str(new_class_id) +"', 'course_description','course_description/index.php','info.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (2, '"+ str(new_class_id) +"', 'calendar_event','calendar/agenda.php','agenda.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (3, '"+ str(new_class_id) +"', 'document','document/document.php','folder_document.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (4, '"+ str(new_class_id) +"', 'learnpath','lp/lp_controller.php','scorms.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (5, '"+ str(new_class_id) +"', 'link','link/link.php','links.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (6, '"+ str(new_class_id) +"', 'quiz','exercise/exercise.php','quiz.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (7, '"+ str(new_class_id) +"', 'announcement','announcements/announcements.php','valves.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (8, '"+ str(new_class_id) +"', 'forum','forum/index.php','forum.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (9, '"+ str(new_class_id) +"', 'dropbox','dropbox/index.php','dropbox.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (10, '"+ str(new_class_id) +"', 'user','user/user.php','members.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (11, '"+ str(new_class_id) +"', 'group','group/group.php','group.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (12, '"+ str(new_class_id) +"', 'chat','chat/chat.php','chat.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (13, '"+ str(new_class_id) +"', 'student_publication','work/work.php','works.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (14, '"+ str(new_class_id) +"', 'survey','survey/survey_list.php','survey.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (15, '"+ str(new_class_id) +"', 'wiki','wiki/index.php','wiki.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (16, '"+ str(new_class_id) +"', 'gradebook','gradebook/index.php','gradebook.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (17, '"+ str(new_class_id) +"', 'glossary','glossary/index.php','glossary.gif',1,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (18, '"+ str(new_class_id) +"', 'notebook','notebook/index.php','notebook.gif',1,'0','squaregrey.gif',0,'_self','interaction',0,NULL,NULL), " \ + " (19, '"+ str(new_class_id) +"', 'attendance','attendance/index.php','attendance.gif',0,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL), " \ + " (20, '"+ str(new_class_id) +"', 'course_progress','course_progress/index.php','course_progress.gif',0,'0','squaregrey.gif',0,'_self','authoring',0,NULL,NULL) ," \ + " (24, '"+ str(new_class_id) +"', 'blog_management','blog/blog_admin.php','blog_admin.gif',0,'1','squaregrey.gif',0,'_self','admin',0,NULL,NULL), " \ + " (25, '"+ str(new_class_id) +"', 'tracking','tracking/courseLog.php','statistics.gif',0,'1','',0,'_self','admin',0,NULL,NULL), " \ + " (26, '"+ str(new_class_id) +"', 'course_setting','course_info/infocours.php','reference.gif',0,'1','',0,'_self','admin',0,NULL,NULL), " \ + " (27, '"+ str(new_class_id) +"', 'course_maintenance','course_info/maintenance.php','backup.gif',0,'1','',0,'_self','admin',0,NULL,NULL), " \ + " (106, '"+ str(new_class_id) +"', 'courselegal','courselegal/start.php','courselegal.png',1,'0','squaregrey.gif',0,'_self','plugin',0,NULL,NULL), " \ + " (107, '"+ str(new_class_id) +"', 'customcertificate','customcertificate/start.php','customcertificate.png',0,'0','squaregrey.gif',0,'_self','plugin',0,NULL,NULL), " \ + " (108, '"+ str(new_class_id) +"', 'google_meet','google_meet/start.php','google_meet.png',1,'0','squaregrey.gif',0,'_self','plugin',0,NULL,NULL); " + + + + print(" #### query_insert_c_tool = ", query_insert_c_tool) + try: + cur.execute(query_insert_c_tool) + + except mariadb.Error as e: + # print(f"Error: {e}") + mycommon.myprint(" Impossible de créer la formation dans le LMS (6)" + str({e})) + return False, " Impossible de créer la formation dans le LMS (4) " + str({e}) + + conn.commit() return True, " La formation " + str(lms_class_code) + "a été correctement Ajoutée/Mise à jour sur la plateforme de E-Learning"