11/02/2025 - 15h30

master
cherif 2025-02-11 15:42:13 +01:00
parent 547ae6fff7
commit 0fb4ab69f1
5 changed files with 1438 additions and 25 deletions

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="08/02/205 - 22h30"> <list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="10/02/205 - 21h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <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$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/email_inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_inscription_mgt.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/survey_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/survey_mgt.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -76,13 +77,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1680804787304</updated> <updated>1680804787304</updated>
</task> </task>
<task id="LOCAL-00387" summary="01/09/2024 - 14:00">
<created>1725191980575</created>
<option name="number" value="00387" />
<option name="presentableId" value="LOCAL-00387" />
<option name="project" value="LOCAL" />
<updated>1725191980575</updated>
</task>
<task id="LOCAL-00388" summary="01/09/2024 - 20:00"> <task id="LOCAL-00388" summary="01/09/2024 - 20:00">
<created>1725213634326</created> <created>1725213634326</created>
<option name="number" value="00388" /> <option name="number" value="00388" />
@ -419,7 +413,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1739050182546</updated> <updated>1739050182546</updated>
</task> </task>
<option name="localTasksCounter" value="436" /> <task id="LOCAL-00436" summary="10/02/205 - 21h">
<created>1739217938933</created>
<option name="number" value="00436" />
<option name="presentableId" value="LOCAL-00436" />
<option name="project" value="LOCAL" />
<updated>1739217938934</updated>
</task>
<option name="localTasksCounter" value="437" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
@ -461,7 +462,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="qsdsqqs" />
<MESSAGE value="29/10/2024 - 18h30" /> <MESSAGE value="29/10/2024 - 18h30" />
<MESSAGE value="qsd" /> <MESSAGE value="qsd" />
<MESSAGE value="22/11/2024 - 18h" /> <MESSAGE value="22/11/2024 - 18h" />
@ -486,6 +486,7 @@
<MESSAGE value="01/02/2025 - 20h" /> <MESSAGE value="01/02/2025 - 20h" />
<MESSAGE value="06-02-2025 - new_design_2025" /> <MESSAGE value="06-02-2025 - new_design_2025" />
<MESSAGE value="08/02/205 - 22h30" /> <MESSAGE value="08/02/205 - 22h30" />
<option name="LAST_COMMIT_MESSAGE" value="08/02/205 - 22h30" /> <MESSAGE value="10/02/205 - 21h" />
<option name="LAST_COMMIT_MESSAGE" value="10/02/205 - 21h" />
</component> </component>
</project> </project>

File diff suppressed because one or more lines are too long

View File

@ -10009,7 +10009,7 @@ def Invoice_Inscrption_With_Split_Session_By_Inscription_Id( tab_files, diction)
'_id':{'$in':tab_my_inscription_ids_ObjectId}, '_id':{'$in':tab_my_inscription_ids_ObjectId},
"invoiced": {'$ne': '1'},}) "invoiced": {'$ne': '1'},})
print(" ### inscription_data = ", inscription_data) #print(" ### inscription_data = ", inscription_data)
tab_inscrit_for_splited_invoice = [] tab_inscrit_for_splited_invoice = []
tab_inscrit_for_NOT_splited_invoice = [] tab_inscrit_for_NOT_splited_invoice = []

View File

@ -10972,14 +10972,15 @@ def Update_LMS_Inscrition_End_Date():
""" """
API qui recuperer les reponses d'un survey donné dans une fichier pdf API qui recuperer les reponses d'un survey donné dans une fichier pdf
""" """
@app.route('/myclass/api/Export_To_Excel_Survey_with_filter_Tab_Survey_Id/<token>/<tab_ids>', methods=['POST','GET']) @app.route('/myclass/api/Export_To_Excel_Survey_with_filter_Tab_Survey_Id/<token>/<tab_ids>/<type>', methods=['POST','GET'])
@crossdomain(origin='*') @crossdomain(origin='*')
def Export_To_Excel_Survey_with_filter_Tab_Survey_Id(token, tab_ids): def Export_To_Excel_Survey_with_filter_Tab_Survey_Id(token, tab_ids, type):
# On recupere le corps (payload) de la requete # On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary(request.form.to_dict()) payload = mycommon.strip_dictionary(request.form.to_dict())
payload = {} payload = {}
payload['token'] = str(token) payload['token'] = str(token)
payload['tab_ids'] = str(tab_ids) payload['tab_ids'] = str(tab_ids)
payload['type'] = str(type)
print(" ### Export_To_Excel_Survey_with_filter_Tab_Survey_Id payload = ",payload) print(" ### Export_To_Excel_Survey_with_filter_Tab_Survey_Id payload = ",payload)
localStatus, response = survey_mgt.Export_To_Excel_Survey_with_filter_Tab_Survey_Id(payload) localStatus, response = survey_mgt.Export_To_Excel_Survey_with_filter_Tab_Survey_Id(payload)

View File

@ -1504,7 +1504,7 @@ def Send_Survey_TabIds(diction):
print(" inscription_data = ", inscription_data) #print(" inscription_data = ", inscription_data)
if (inscription_data and "session_id" in inscription_data.keys() and inscription_data['session_id']): if (inscription_data and "session_id" in inscription_data.keys() and inscription_data['session_id']):
local_status, local_retval = module_editique.Editic_Log_History_Action_From_courrier_template_type_document_ref_interne( local_status, local_retval = module_editique.Editic_Log_History_Action_From_courrier_template_type_document_ref_interne(
@ -1850,7 +1850,7 @@ def Automatic_Send_Survey_TabIds(diction):
mycommon.myprint( mycommon.myprint(
" WARNING : Impossible de logguer l'historique pour l'inscrit : " + str(local_inscription_id)) " WARNING : Impossible de logguer l'historique pour l'inscrit : " + str(local_inscription_id))
print(" inscription_data = ", inscription_data) #print(" inscription_data = ", inscription_data)
local_status, local_retval = module_editique.Editic_Log_History_Action_From_courrier_template_type_document_ref_interne( local_status, local_retval = module_editique.Editic_Log_History_Action_From_courrier_template_type_document_ref_interne(
my_partner, str(courrier_ref_interne), str(inscription_data['session_id']), 'inscription', my_partner, str(courrier_ref_interne), str(inscription_data['session_id']), 'inscription',
@ -1873,12 +1873,11 @@ def Automatic_Send_Survey_TabIds(diction):
""" """
Fonction pour Recuperer la liste des enquete avec les filtre suivant : Fonction pour Recuperer la liste des enquete avec les filtre suivant :
- session_id, - session_id,
- formulaire_type - ['pos', 'hot_eval', 'cold_eval', 'human_eval', 'autre_eval'] - formulaire_type - ['pos', 'hot_eval', 'cold_eval', 'human_eval', 'autre_eval']
""" """
def Get_List_Survey_with_filter(diction): def Get_List_Survey_with_filter(diction):
try: try:
@ -2365,7 +2364,7 @@ def Export_To_Excel_Survey_with_filter_Tab_Survey_Id(diction):
""" """
Verification des input acceptés Verification des input acceptés
""" """
field_list = ['token', 'tab_ids' ] field_list = ['token', 'tab_ids', 'type' ]
incom_keys = diction.keys() incom_keys = diction.keys()
for val in incom_keys: for val in incom_keys:
@ -2377,7 +2376,7 @@ def Export_To_Excel_Survey_with_filter_Tab_Survey_Id(diction):
""" """
Verification des champs obligatoires Verification des champs obligatoires
""" """
field_list_obligatoire = ['token', 'tab_ids'] field_list_obligatoire = ['token', 'tab_ids', 'type']
for val in field_list_obligatoire: for val in field_list_obligatoire:
if val not in diction: if val not in diction:
@ -2403,14 +2402,14 @@ def Export_To_Excel_Survey_with_filter_Tab_Survey_Id(diction):
if diction['tab_ids']: if diction['tab_ids']:
my_survey_ids = diction['tab_ids'] my_survey_ids = diction['tab_ids']
my_survey_type = ""
if( "type" in diction.keys() ):
my_survey_type = diction['type']
my_survey_ids = my_survey_ids.replace(".", ",") my_survey_ids = my_survey_ids.replace(".", ",")
tab_my_survey_ids = str(my_survey_ids).split(",") tab_my_survey_ids = str(my_survey_ids).split(",")
tab_my_survey_ids = [s.strip() for s in tab_my_survey_ids] tab_my_survey_ids = [s.strip() for s in tab_my_survey_ids]
""" """
Verifier la validité des survey Verifier la validité des survey
""" """
@ -2570,6 +2569,42 @@ def Export_To_Excel_Survey_with_filter_Tab_Survey_Id(diction):
return False, " L'identifiant de la session de formation est invalide " return False, " L'identifiant de la session de formation est invalide "
"""
11/02/2025 -
Si c'est l'evaluation d'un enseignant par un apprenant, il faut recuprer les données de l'enseignant pour l'afficher dans la fiche
"""
evaluation_formateur = "0"
formateur_nom = ""
formateur_prenom = ""
formateur_email = ""
if( Survey_Data['survey_type'] == "human_eval" and Survey_Data['related_collection'] == "ressource_humaine" and "related_collection_id" in Survey_Data.keys()
and Survey_Data['related_collection_id']):
evaluation_formateur = "1"
formateur_data = MYSY_GV.dbname['ressource_humaine'].find_one(
{'_id': ObjectId(str(Survey_Data['related_collection_id'])),
'valide': '1',
'partner_recid': str(
my_partner['recid'])}, {'nom': 1, 'prenom':1, 'email':1})
if( formateur_data and 'nom' in formateur_data.keys() ):
formateur_nom = formateur_data['nom']
if (formateur_data and 'prenom' in formateur_data.keys()):
formateur_prenom = formateur_data['prenom']
if (formateur_data and 'email' in formateur_data.keys()):
formateur_email = formateur_data['email']
param_survey_data['evaluation_formateur'] = evaluation_formateur
param_survey_data['formateur_evalue_nom'] = formateur_nom
param_survey_data['formateur_evalue_prenom'] = formateur_prenom
param_survey_data['formateur_evalue_email'] = formateur_email
""" """
Recuperer les données de la formation Recuperer les données de la formation
""" """
@ -2646,6 +2681,11 @@ def Export_To_Excel_Survey_with_filter_Tab_Survey_Id(diction):
param_survey_data['date_envoi'] = str(date_envoi) param_survey_data['date_envoi'] = str(date_envoi)
# Type de questionnaire
param_survey_data['survey_type'] = str(my_survey_type)
print(" param_survey_data = ", param_survey_data)
# Champ : date_reponse # Champ : date_reponse
date_reponse = "" date_reponse = ""
if ("date_reponse" in Survey_Data.keys()): if ("date_reponse" in Survey_Data.keys()):