14/11/2023 - 12h
parent
cf62d00da9
commit
0344583915
|
@ -1,12 +1,12 @@
|
|||
<?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="13/11/2023 - 12h30">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="13/11/2023 - 22h30">
|
||||
<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$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -76,13 +76,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00097" summary="06/09/2023 - 11h">
|
||||
<created>1693991026076</created>
|
||||
<option name="number" value="00097" />
|
||||
<option name="presentableId" value="LOCAL-00097" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693991026077</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00098" summary="06/09/2023 - 13h">
|
||||
<created>1693999843882</created>
|
||||
<option name="number" value="00098" />
|
||||
|
@ -419,7 +412,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1699876222242</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="146" />
|
||||
<task id="LOCAL-00146" summary="13/11/2023 - 22h30">
|
||||
<created>1699909122400</created>
|
||||
<option name="number" value="00146" />
|
||||
<option name="presentableId" value="LOCAL-00146" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1699909122401</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="147" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -434,7 +434,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="01/10/2023 - 23h" />
|
||||
<MESSAGE value="02/10/2023 - 11h" />
|
||||
<MESSAGE value="02/10/2023 - 13h30" />
|
||||
<MESSAGE value="02/10/2023 - 22h30" />
|
||||
|
@ -459,6 +458,7 @@
|
|||
<MESSAGE value="11/11/2023 - 17h" />
|
||||
<MESSAGE value="11/11/2023 - 23h" />
|
||||
<MESSAGE value="13/11/2023 - 12h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="13/11/2023 - 12h30" />
|
||||
<MESSAGE value="13/11/2023 - 22h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="13/11/2023 - 22h30" />
|
||||
</component>
|
||||
</project>
|
|
@ -1138,9 +1138,16 @@ def SendPre_InscriptionEmail(diction):
|
|||
data_mail['date_au'] = date_fin
|
||||
|
||||
formateur = ""
|
||||
if ("formateur" in local_info_session.keys()):
|
||||
if local_info_session['formateur']:
|
||||
formateur = local_info_session['formateur']
|
||||
if ("formateur_id" in local_info_session.keys()):
|
||||
if local_info_session['formateur_id']:
|
||||
formateur_data = MYSY_GV.dbname['ressource_humaine'].find_one({'_id':ObjectId(str(local_info_session['formateur_id'])),
|
||||
'valide':'1',
|
||||
'locked':'1',
|
||||
'partner_recid':str(local_session[0]['partner_owner_recid'])})
|
||||
|
||||
if (formateur_data and "nom" in formateur_data.keys() and "prenom" in formateur_data.keys()):
|
||||
formateur = str(formateur_data['nom']) + " " + str(formateur_data['prenom'])
|
||||
|
||||
data_mail['formateur'] = formateur
|
||||
|
||||
distantiel = ""
|
||||
|
@ -3214,10 +3221,21 @@ def PrintAttendeeDetail_perSession(diction):
|
|||
return False, " Impossible d'imprimer la fiche detaillée : code session erronée "
|
||||
|
||||
my_trainer = ""
|
||||
if ("formateur" in tmp_val.keys()):
|
||||
if tmp_val['formateur']:
|
||||
my_trainer = tmp_val['formateur']
|
||||
my_retrun_dict['formateur'] = tmp_val['formateur']
|
||||
if ("formateur_id" in tmp_val.keys()):
|
||||
if tmp_val['formateur_id']:
|
||||
|
||||
formateur_data = MYSY_GV.dbname['ressource_humaine'].find_one(
|
||||
{'_id': ObjectId(str(tmp_val['formateur_id'])),
|
||||
'valide': '1',
|
||||
'locked': '1',
|
||||
'partner_recid': str(partner_recid)})
|
||||
|
||||
if (formateur_data and "nom" in formateur_data.keys() and "prenom" in formateur_data.keys()):
|
||||
formateur = str(formateur_data['nom']) + " " + str(formateur_data['prenom'])
|
||||
|
||||
|
||||
my_trainer = formateur
|
||||
my_retrun_dict['formateur_id'] = tmp_val['formateur_id']
|
||||
|
||||
if (my_trainer == ""):
|
||||
mycommon.myprint(
|
||||
|
|
2093
Log/log_file.log
2093
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -43,7 +43,7 @@ def Add_Update_SessionFormation(diction):
|
|||
'code_postal', 'ville', 'formateur', 'code_session',
|
||||
'class_internal_url', 'session_status', 'date_debut_inscription', 'date_fin_inscription',
|
||||
'attestation_certif', "distantiel", "presentiel", "prix_session", 'contenu_ftion', 'lms_class_code',
|
||||
'session_ondemande', 'source', 'session_id', 'session_etape', 'pays']
|
||||
'session_ondemande', 'source', 'session_id', 'session_etape', 'pays', 'formateur_id']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -152,6 +152,21 @@ def Add_Update_SessionFormation(diction):
|
|||
if ("prix_session" in diction.keys()):
|
||||
mydata['prix_session'] = diction['prix_session']
|
||||
|
||||
formateur_id = ""
|
||||
if ("formateur_id" in diction.keys()):
|
||||
formateur_id = diction['formateur_id']
|
||||
# Verification de la validité du formateur (collection employé)
|
||||
is_formateur_id_ok = MYSY_GV.dbname['ressource_humaine'].count_documents({'_id':ObjectId(str(formateur_id)),
|
||||
'partner_recid':str(partner_recid),
|
||||
'valide':'1',
|
||||
'locked':'0'
|
||||
})
|
||||
|
||||
if(is_formateur_id_ok <= 0 ):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - L'identifiant du formateur est invalide")
|
||||
return False, " L'identifiant du formateur est invalide "
|
||||
|
||||
mydata['formateur_id'] = formateur_id
|
||||
|
||||
if ("adresse" in diction.keys()):
|
||||
if diction['adresse']:
|
||||
|
@ -485,7 +500,7 @@ def GetSessionFormation(diction):
|
|||
}
|
||||
]
|
||||
|
||||
print(" ##### myquery GetSessionFormation = "+str(myquery))
|
||||
#print(" ##### myquery GetSessionFormation = "+str(myquery))
|
||||
RetObject = []
|
||||
|
||||
nb_val = 0
|
||||
|
@ -507,7 +522,22 @@ def GetSessionFormation(diction):
|
|||
|
||||
user['title'] = title
|
||||
user['lms_class_code'] = lms_class_code
|
||||
formateur_nom_prenom = ""
|
||||
# Si il y a un code formateur_id, alors on va recuperer les nom et prenom du formation
|
||||
if( "formateur_id" in retval.keys() and retval['formateur_id']):
|
||||
|
||||
formateur_data = MYSY_GV.dbname['ressource_humaine'].find_one({'_id':ObjectId(str(retval['formateur_id'])),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'partner_recid':str(partner_recid)
|
||||
})
|
||||
|
||||
if(formateur_data and "nom" in formateur_data.keys() and "prenom" in formateur_data.keys() ):
|
||||
formateur_nom_prenom = str(formateur_data['nom'])+" "+str(formateur_data['prenom'])
|
||||
|
||||
|
||||
user['formateur_nom_prenom'] = formateur_nom_prenom
|
||||
print(" ### user = ", user)
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
|
@ -858,7 +888,17 @@ def GetAllValideSessionPartner_List(diction):
|
|||
val['date_fin_inscription'] = retVal['date_fin_inscription'][0:10]
|
||||
|
||||
val['distantiel'] = retVal['distantiel']
|
||||
val['formateur'] = retVal['formateur']
|
||||
|
||||
if( "formateur" in retVal.keys()):
|
||||
val['formateur'] = retVal['formateur']
|
||||
else:
|
||||
val['formateur'] = ""
|
||||
|
||||
if ("formateur_id" in retVal.keys()):
|
||||
val['formateur_id'] = retVal['formateur_id']
|
||||
else:
|
||||
val['formateur_id'] = ""
|
||||
|
||||
|
||||
nb_participant = "1"
|
||||
if( "nb_participant" in retVal.keys()):
|
||||
|
@ -1047,6 +1087,11 @@ def GetAllValideSessionPartner_List_filter_like(diction):
|
|||
else:
|
||||
val['formateur'] = ""
|
||||
|
||||
if ("formateur_id" in retVal.keys()):
|
||||
val['formateur_id'] = retVal['formateur_id']
|
||||
else:
|
||||
val['formateur_id'] = ""
|
||||
|
||||
nb_participant = "1"
|
||||
if ("nb_participant" in retVal.keys()):
|
||||
nb_participant = retVal['nb_participant']
|
||||
|
@ -1238,6 +1283,12 @@ def GetAllValideSessionPartner_List_no_filter(diction):
|
|||
else:
|
||||
val['formateur'] = ""
|
||||
|
||||
if ("formateur_id" in retVal.keys()):
|
||||
val['formateur_id'] = retVal['formateur_id']
|
||||
else:
|
||||
val['formateur_id'] = ""
|
||||
|
||||
|
||||
nb_participant = "1"
|
||||
if ("nb_participant" in retVal.keys()):
|
||||
nb_participant = retVal['nb_participant']
|
||||
|
|
40
class_mgt.py
40
class_mgt.py
|
@ -52,7 +52,7 @@ def add_class(diction):
|
|||
'price', 'url','duration', 'duration_unit', 'token', 'plus_produit', 'mots_cle','domaine',
|
||||
'internal_url', 'zone_diffusion', 'metier', 'published', 'img_url', 'objectif',
|
||||
'programme', 'prerequis', 'note', 'cpf', 'certif', 'class_inscription_url', 'pourqui',
|
||||
'support', 'img_banner_detail_class', 'source', 'lms_class_code']
|
||||
'support', 'img_banner_detail_class', 'source', 'lms_class_code', 'formateur_id']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -208,6 +208,23 @@ def add_class(diction):
|
|||
if diction['class_inscription_url']:
|
||||
mydata['class_inscription_url'] = diction['class_inscription_url']
|
||||
|
||||
formateur_id = ""
|
||||
if ("formateur_id" in diction.keys()):
|
||||
formateur_id = diction['formateur_id']
|
||||
# Verification de la validité du formateur (collection employé)
|
||||
is_formateur_id_ok = MYSY_GV.dbname['ressource_humaine'].count_documents(
|
||||
{'_id': ObjectId(str(formateur_id)),
|
||||
'partner_recid': str(user_recid),
|
||||
'valide': '1',
|
||||
'locked': '0'
|
||||
})
|
||||
|
||||
if (is_formateur_id_ok <= 0):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - L'identifiant du formateur est invalide")
|
||||
return False, " L'identifiant du formateur est invalide "
|
||||
|
||||
mydata['formateur_id'] = formateur_id
|
||||
|
||||
|
||||
if ("certif" in diction.keys()):
|
||||
if diction['certif']:
|
||||
|
@ -564,7 +581,7 @@ def update_class(diction):
|
|||
'domaine', 'internal_code', 'internal_url','zone_diffusion', 'metier',
|
||||
'published', 'img_url', 'objectif', 'programme', 'prerequis', 'note',
|
||||
'cpf', 'certif', 'class_inscription_url','pourqui', 'support', 'img_banner_detail_class',
|
||||
'duration_unit', 'source', 'lms_class_code']
|
||||
'duration_unit', 'source', 'lms_class_code', 'formateur_id']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -631,7 +648,22 @@ def update_class(diction):
|
|||
if ("source" in diction.keys()):
|
||||
mydata['source'] = diction['source']
|
||||
|
||||
formateur_id = ""
|
||||
if ("formateur_id" in diction.keys()):
|
||||
formateur_id = diction['formateur_id']
|
||||
# Verification de la validité du formateur (collection employé)
|
||||
is_formateur_id_ok = MYSY_GV.dbname['ressource_humaine'].count_documents(
|
||||
{'_id': ObjectId(str(formateur_id)),
|
||||
'partner_recid': str(user_recid),
|
||||
'valide': '1',
|
||||
'locked': '0'
|
||||
})
|
||||
|
||||
if (is_formateur_id_ok <= 0):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - L'identifiant du formateur est invalide")
|
||||
return False, " L'identifiant du formateur est invalide "
|
||||
|
||||
mydata['formateur_id'] = formateur_id
|
||||
|
||||
if ("external_code" in diction.keys()):
|
||||
my_external_code = diction['external_code']
|
||||
|
@ -4299,6 +4331,10 @@ def get_Class_From_Internal_Url(diction):
|
|||
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
qry = {'valide': '1', 'locked': '0', 'internal_url':str(diction['internal_url']),
|
||||
'partner_owner_recid':str(my_partner['recid'])}
|
||||
|
||||
|
||||
for retval in MYSY_GV.dbname['myclass'].find({'valide': '1', 'locked': '0', 'internal_url':str(diction['internal_url']),
|
||||
'partner_owner_recid':str(my_partner['recid'])}):
|
||||
user = retval
|
||||
|
|
Loading…
Reference in New Issue