31/01/2024 - 20h
parent
2a11b604a2
commit
2bcf801cf4
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="ss">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="31/01/2024 - 16h">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_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$/Session_Formation_Sequence.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation_Sequence.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/emargement.py" beforeDir="false" afterPath="$PROJECT_DIR$/emargement.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/module_editique.py" beforeDir="false" afterPath="$PROJECT_DIR$/module_editique.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -76,13 +77,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00158" summary="24/11/2023 - 18h30">
|
||||
<created>1700846519563</created>
|
||||
<option name="number" value="00158" />
|
||||
<option name="presentableId" value="LOCAL-00158" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1700846519569</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00159" summary="30/11/2023 - 21h">
|
||||
<created>1701375202172</created>
|
||||
<option name="number" value="00159" />
|
||||
|
@ -419,7 +413,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1706645717009</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="207" />
|
||||
<task id="LOCAL-00207" summary="31/01/2024 - 16h">
|
||||
<created>1706713340253</created>
|
||||
<option name="number" value="00207" />
|
||||
<option name="presentableId" value="LOCAL-00207" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1706713340254</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="208" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -434,7 +435,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="27/12/2023 - 23h" />
|
||||
<MESSAGE value="28/12/2023- 19h" />
|
||||
<MESSAGE value="29/12/2023- 12h" />
|
||||
<MESSAGE value="31/12/2023- 18h" />
|
||||
|
@ -459,6 +459,7 @@
|
|||
<MESSAGE value="rrrf" />
|
||||
<MESSAGE value="29/01/24 - 21h30" />
|
||||
<MESSAGE value="ss" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="ss" />
|
||||
<MESSAGE value="31/01/2024 - 16h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="31/01/2024 - 16h" />
|
||||
</component>
|
||||
</project>
|
2172
Log/log_file.log
2172
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -5638,6 +5638,14 @@ def Create_Convocation_By_Stagiaire_PDF(diction):
|
|||
tab_class.append(class_data['_id'])
|
||||
|
||||
|
||||
# Recuperation des sequences d'une session de formation
|
||||
tab_sequence_session = []
|
||||
for local_retval in MYSY_GV.dbname['session_formation_sequence'].find({'partner_owner_recid':str(my_partner['recid']),
|
||||
'session_id':str(session_data['_id']),
|
||||
'valide':'1',
|
||||
'locked':'0'}):
|
||||
tab_sequence_session.append(local_retval['_id'])
|
||||
|
||||
|
||||
# Creation du dictionnaire d'information à utiliser pour la creation du doc
|
||||
convention_dictionnary_data = {}
|
||||
|
@ -5648,6 +5656,7 @@ def Create_Convocation_By_Stagiaire_PDF(diction):
|
|||
new_diction['list_class_id'] = tab_class
|
||||
new_diction['list_client_id'] = []
|
||||
new_diction['list_apprenant_id'] = tab_apprenant
|
||||
new_diction['list_sequence_session_id'] = tab_sequence_session
|
||||
|
||||
local_status, local_retval = mycommon.Get_Dictionnary_data_For_Template(new_diction)
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ def Add_Session_Sequence(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'session_id', 'sequence_title', 'sequence_start', 'sequence_end', ]
|
||||
field_list = ['token', 'session_id', 'sequence_title', 'sequence_start', 'sequence_end', 'agenda', 'objectif', 'commentaire' ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -185,12 +185,29 @@ def Add_Session_Sequence(diction):
|
|||
if( "sequence_title" in diction.keys() ):
|
||||
sequence_title = str(diction['sequence_title'])
|
||||
|
||||
agenda = ""
|
||||
if ("agenda" in diction.keys()):
|
||||
agenda = str(diction['agenda'])
|
||||
|
||||
objectif = ""
|
||||
if ("objectif" in diction.keys()):
|
||||
objectif = str(diction['objectif'])
|
||||
|
||||
commentaire = ""
|
||||
if ("commentaire" in diction.keys()):
|
||||
commentaire = str(diction['commentaire'])
|
||||
|
||||
|
||||
my_data = {}
|
||||
my_data['session_id'] = str(diction['session_id'])
|
||||
my_data['sequence_title'] = sequence_title
|
||||
my_data['sequence_start'] = date_debut_seq
|
||||
my_data['sequence_end'] = date_fin_seq
|
||||
|
||||
my_data['agenda'] = agenda
|
||||
my_data['objectif'] = objectif
|
||||
my_data['commentaire'] = commentaire
|
||||
|
||||
my_data['valide'] = "1"
|
||||
my_data['locked'] = "0"
|
||||
my_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
@ -488,7 +505,7 @@ def Update_Session_Sequence(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', '_id', 'session_id', 'sequence_title', 'sequence_start', 'sequence_end', ]
|
||||
field_list = ['token', '_id', 'session_id', 'sequence_title', 'sequence_start', 'sequence_end', 'agenda', 'objectif', 'commentaire']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -621,13 +638,22 @@ def Update_Session_Sequence(diction):
|
|||
return False, " La date de fin de séquence" + str(
|
||||
date_debut_seq) + " chevauche une autre séquence"
|
||||
|
||||
sequence_title = ""
|
||||
if ("sequence_title" in diction.keys()):
|
||||
sequence_title = str(diction['sequence_title'])
|
||||
|
||||
update_data = {}
|
||||
|
||||
if ("sequence_title" in diction.keys()):
|
||||
update_data['sequence_title'] = str(diction['sequence_title'])
|
||||
|
||||
if ("agenda" in diction.keys()):
|
||||
update_data['agenda'] = str(diction['agenda'])
|
||||
|
||||
if ("objectif" in diction.keys()):
|
||||
update_data['objectif'] = str(diction['objectif'])
|
||||
|
||||
if ("commentaire" in diction.keys()):
|
||||
update_data['commentaire'] = str(diction['commentaire'])
|
||||
|
||||
|
||||
update_data['session_id'] = str(diction['session_id'])
|
||||
update_data['sequence_title'] = sequence_title
|
||||
update_data['sequence_start'] = date_debut_seq
|
||||
update_data['sequence_end'] = date_fin_seq
|
||||
update_data['valide'] = "1"
|
||||
|
|
|
@ -415,8 +415,8 @@ def GetTableauEmargement(diction):
|
|||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(inspect.stack()[0][
|
||||
3]) + " - Le champ '" + val + "' n'est pas autorisé, Creation partenaire annulée")
|
||||
return False, "Impossible de créer la liste d'emargement. Toutes les informations fournies ne sont pas valables"
|
||||
3]) + " - Le champ '" + val + "' n'est pas autorisé")
|
||||
return False, "Toutes les informations fournies ne sont pas valables"
|
||||
|
||||
"""
|
||||
Verification de la liste des champs obligatoires
|
||||
|
@ -427,7 +427,7 @@ def GetTableauEmargement(diction):
|
|||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - : La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, "Impossible de créer la liste d'emargement, Toutes les informations necessaires n'ont pas été fournies"
|
||||
return False, "Toutes les informations necessaires n'ont pas été fournies"
|
||||
|
||||
mydata = {}
|
||||
|
||||
|
@ -514,6 +514,12 @@ def UpdateUserEmargementDate(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
partner_recid = str(my_partner['recid'])
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
if retval is False:
|
||||
|
@ -526,35 +532,19 @@ def UpdateUserEmargementDate(diction):
|
|||
if diction['is_present']:
|
||||
is_present = diction['is_present']
|
||||
|
||||
|
||||
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(my_token)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de valider l'emargement ")
|
||||
return False, "Impossible de valider l'emargement "
|
||||
|
||||
mydata = {}
|
||||
|
||||
mydata['date_update'] = str(datetime.now())
|
||||
now = str(datetime.now().strftime("%d/%m/%Y, %H:%M:%S"))
|
||||
mydata['date_update'] = now
|
||||
|
||||
if (is_present == "1"):
|
||||
mydata['is_present'] = True
|
||||
elif (is_present == "0"):
|
||||
mydata['is_present'] = False
|
||||
|
||||
|
||||
"""if( my_matin == "1"):
|
||||
mydata['matin'] = True
|
||||
elif (my_matin == "0"):
|
||||
mydata['matin'] = False
|
||||
|
||||
if (my_apresmidi == "1"):
|
||||
mydata['apresmidi'] = True
|
||||
elif (my_apresmidi == "0"):
|
||||
mydata['apresmidi'] = False
|
||||
"""
|
||||
|
||||
mydata['statut'] = "2"
|
||||
mydata['date_emargement'] = now
|
||||
mydata['update_by'] = str(my_partner['_id'])
|
||||
|
||||
query_key = {}
|
||||
query_key['_id'] = ObjectId(str(diction['_id']))
|
||||
|
@ -573,7 +563,7 @@ def UpdateUserEmargementDate(diction):
|
|||
)
|
||||
|
||||
|
||||
return True, "OK"
|
||||
return True, "La mise à jour a été correctement faite"
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||
|
|
|
@ -2913,33 +2913,24 @@ def UserEmargementValidation(diction):
|
|||
"""
|
||||
coll_emargement = MYSY_GV.dbname['emargement']
|
||||
now = datetime.now()
|
||||
|
||||
mydata = {}
|
||||
mydata['date_update'] = now
|
||||
mydata['statut'] = "2"
|
||||
mydata['is_present'] = True
|
||||
mydata['date_emargement'] = now
|
||||
mydata['update_by'] = ""
|
||||
|
||||
if( diction['session'] == "1" ):
|
||||
print(" ### emargement le matin")
|
||||
|
||||
ret_val = coll_emargement.find_one_and_update({'_id': ObjectId(str( diction['value']))},
|
||||
{"$set":
|
||||
{"date_update": str(now),
|
||||
'is_present': True,
|
||||
}
|
||||
},
|
||||
{"$set":mydata },
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
print(ret_val)
|
||||
|
||||
|
||||
"""elif (diction['session'] == "2"):
|
||||
print(" ### emargement l'apres midi")
|
||||
ret_val = coll_emargement.find_one_and_update({'_id': ObjectId(str(diction['value']))},
|
||||
{"$set":
|
||||
{"date_update": str(now),
|
||||
'is_present': True,
|
||||
}
|
||||
},
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
|
||||
|
||||
print(ret_val)
|
||||
"""
|
||||
|
||||
return True, " Emargement ok "
|
||||
|
||||
|
@ -4319,7 +4310,8 @@ def Get_Dictionnary_data_For_Template(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'list_stagiaire_id', 'list_session_id', 'list_class_id', 'list_client_id', 'list_apprenant_id']
|
||||
field_list = ['token', 'list_stagiaire_id', 'list_session_id', 'list_class_id', 'list_client_id',
|
||||
'list_apprenant_id', 'list_sequence_session_id']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -4701,6 +4693,34 @@ def Get_Dictionnary_data_For_Template(diction):
|
|||
|
||||
dictionnary_data['list_client_data'] = list_client_data
|
||||
|
||||
"""
|
||||
Recuperartion des champs des sequences des sessions
|
||||
"""
|
||||
sequence_session_liste_champ = [ 'sequence_title', 'sequence_start', 'sequence_end', 'agenda', 'objectif', 'commentaire' ]
|
||||
list_sequence_session_data = []
|
||||
tab_sequence_session = diction['list_sequence_session_id']
|
||||
|
||||
for sequence_session_data in MYSY_GV.dbname['session_formation_sequence'].find({'_id': {'$in': tab_sequence_session, },
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(my_partner['recid'])
|
||||
}):
|
||||
|
||||
|
||||
new_session_data = {}
|
||||
for champ in sequence_session_liste_champ:
|
||||
if (champ in sequence_session_data.keys() ):
|
||||
new_champ_name = "sequence_session_" + str(champ)
|
||||
new_field = {new_champ_name: str(sequence_session_data[champ])}
|
||||
new_session_data.update(new_field)
|
||||
else:
|
||||
new_champ_name = "sequence_session_" + str(champ)
|
||||
new_field = {new_champ_name: ""}
|
||||
new_session_data.update(new_field)
|
||||
|
||||
list_sequence_session_data.append(new_session_data)
|
||||
|
||||
dictionnary_data['list_sequence_session_data'] = list_sequence_session_data
|
||||
|
||||
|
||||
# Recuperation des données système
|
||||
# Ajout des champs système comme la date du jour
|
||||
|
|
Loading…
Reference in New Issue