18/08/2024 - 21h55
parent
fb9b09959c
commit
3999549ca8
|
@ -1,10 +1,10 @@
|
|||
<?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="17/08/2024 - 20h55">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="18/08/2024 - 16h55">
|
||||
<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$/agenda.py" beforeDir="false" afterPath="$PROJECT_DIR$/agenda.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/suivi_pedagogique_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/suivi_pedagogique_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
|
@ -76,13 +76,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00325" summary="06/06/2024 - 12h">
|
||||
<created>1717668732175</created>
|
||||
<option name="number" value="00325" />
|
||||
<option name="presentableId" value="LOCAL-00325" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1717668732176</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00326" summary="06/06/2024 - 20h">
|
||||
<created>1717697890411</created>
|
||||
<option name="number" value="00326" />
|
||||
|
@ -419,7 +412,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1723920962711</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="374" />
|
||||
<task id="LOCAL-00374" summary="18/08/2024 - 16h55">
|
||||
<created>1724077502402</created>
|
||||
<option name="number" value="00374" />
|
||||
<option name="presentableId" value="LOCAL-00374" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1724077502403</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="375" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -461,7 +461,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="dqsdqs" />
|
||||
<MESSAGE value="dqsdqss" />
|
||||
<MESSAGE value="17/07/2024 - 11h30" />
|
||||
<MESSAGE value="17/07/2024 - 11h30sdf" />
|
||||
|
@ -486,6 +485,7 @@
|
|||
<MESSAGE value="ddd" />
|
||||
<MESSAGE value="dddss" />
|
||||
<MESSAGE value="17/08/2024 - 20h55" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="17/08/2024 - 20h55" />
|
||||
<MESSAGE value="18/08/2024 - 16h55" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="18/08/2024 - 16h55" />
|
||||
</component>
|
||||
</project>
|
1787
Log/log_file.log
1787
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -12670,6 +12670,10 @@ def Add_SessionFormation_From_Quotation_Line(diction):
|
|||
mydata['price_by'] = "persession"
|
||||
mydata['session_status'] = "1"
|
||||
|
||||
mydata['distantiel'] = "0"
|
||||
mydata['presentiel'] = "0"
|
||||
mydata['is_bpf'] = "0"
|
||||
|
||||
mydata['date_debut_inscription'] = str(mydata['date_debut'])
|
||||
mydata['date_fin_inscription'] = str(mydata['date_fin'])
|
||||
|
||||
|
|
|
@ -54,7 +54,8 @@ def Add_Update_Agenda_Event(diction):
|
|||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', '_id', 'related_collection', 'event_title', 'event_start', 'event_end', 'related_collection_recid', 'comment',
|
||||
'event_type', 'justified', 'linked_collection', 'linked_collection_recid']
|
||||
'event_type', 'justified', 'linked_collection', 'linked_collection_recid',
|
||||
'related_role']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -140,6 +141,11 @@ def Add_Update_Agenda_Event(diction):
|
|||
else:
|
||||
mydata['linked_collection_recid'] = ""
|
||||
|
||||
if ("related_role" in diction.keys()):
|
||||
mydata['related_role'] = str(diction['related_role'])
|
||||
else:
|
||||
mydata['related_role'] = ""
|
||||
|
||||
|
||||
|
||||
comment = ""
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""
|
||||
Ce fichier permet de gerer le suivi pédagogique d'un apprenant
|
||||
Un suivi pédagique est defini par par :
|
||||
- apprenant_id,
|
||||
- apprenant_id, (pour le suivi d'un apprenant)
|
||||
- employee_id, (pour le suivi d'un autre employe)
|
||||
- class_id (pas obligatoire)
|
||||
- session_id (pas obligatoire)
|
||||
- class_eu_id (pas obligatoire)
|
||||
|
@ -58,7 +59,7 @@ def Add_Suivi_Pedagogique(diction):
|
|||
"""
|
||||
field_list = ['token', 'apprenant_id', 'class_id', 'session_id', 'class_eu_id', 'responsable_id',
|
||||
'date_heure_debut', 'date_heure_fin', 'observation',
|
||||
'commentaire', ]
|
||||
'commentaire', 'employee_id']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -70,7 +71,7 @@ def Add_Suivi_Pedagogique(diction):
|
|||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'apprenant_id', 'responsable_id', 'date_heure_debut', 'date_heure_fin', 'observation' ]
|
||||
field_list_obligatoire = ['token', 'apprenant_id', 'responsable_id', 'date_heure_debut', 'date_heure_fin', 'observation' , 'employee_id']
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
|
@ -92,6 +93,16 @@ def Add_Suivi_Pedagogique(diction):
|
|||
return local_status, my_partner
|
||||
|
||||
|
||||
"""
|
||||
On suit pedagogiquement soit un apprenant, soit un employé. Donc si les deux sont renseigné, le système
|
||||
doit mettre une erreur
|
||||
"""
|
||||
if( diction['apprenant_id'] and diction['employee_id']):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Vous devez préciser l'entité qui doit être suivie ")
|
||||
return False, " Vous devez préciser l'entité qui doit être suivie "
|
||||
|
||||
|
||||
# Verifier que la formation et l'ue de la formation existe et sont valides
|
||||
|
||||
if( "class_id" in diction.keys() and "class_eu_id" in diction.keys() ):
|
||||
|
@ -127,22 +138,49 @@ def Add_Suivi_Pedagogique(diction):
|
|||
"""
|
||||
Verifier que le l'apprenant est valide
|
||||
"""
|
||||
is_valide_apprenant = MYSY_GV.dbname['apprenant'].count_documents(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if (is_valide_apprenant != 1):
|
||||
cible_evaluation_data = None
|
||||
if( diction["apprenant_id"]):
|
||||
is_valide_apprenant = MYSY_GV.dbname['apprenant'].count_documents(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if (is_valide_apprenant != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'apprenant est invalide ")
|
||||
return False, " L'identifiant de l'apprenant est invalide "
|
||||
|
||||
cible_evaluation_data = MYSY_GV.dbname['apprenant'].find_one(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
|
||||
elif( diction["employee_id"]):
|
||||
is_valide_employee_id = MYSY_GV.dbname['ressource_humaine'].count_documents(
|
||||
{'_id': ObjectId(str(diction['employee_id'])),
|
||||
'partner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if (is_valide_employee_id != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'employé est invalide ")
|
||||
return False, " L'identifiant de l'employé est invalide "
|
||||
|
||||
cible_evaluation_data = MYSY_GV.dbname['apprenant'].find_one(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
else:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'apprenant est invalide ")
|
||||
return False, " L'identifiant de l'apprenant est invalide "
|
||||
|
||||
is_valide_apprenant_data = MYSY_GV.dbname['apprenant'].find_one(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
str(inspect.stack()[0][3]) + " Impossible d'identifier la cible du suivi pédagogique ")
|
||||
return False, " Impossible d'identifier la cible du suivi pédagogique "
|
||||
|
||||
"""
|
||||
Verifier que le responsable est valide
|
||||
|
@ -241,37 +279,70 @@ def Add_Suivi_Pedagogique(diction):
|
|||
Ajouter le suivi pédagogique dans l'agenda de
|
||||
l'apprenant et du responsable
|
||||
"""
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
new_event['related_collection'] = "apprenant"
|
||||
new_event['event_title'] = "Suivi Pédagogique"
|
||||
new_event['event_start'] = datetime.strptime(str(date_heure_debut).strip(), '%d/%m/%Y %H:%M').strftime("%Y-%m-%dT%H:%M")
|
||||
new_event['event_end'] = datetime.strptime(str(date_heure_fin).strip(), '%d/%m/%Y %H:%M').strftime("%Y-%m-%dT%H:%M")
|
||||
new_event['related_collection_recid'] = str(diction['apprenant_id'])
|
||||
new_event['event_type'] = "autre"
|
||||
if( diction['apprenant_id']):
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
new_event['related_collection'] = "apprenant"
|
||||
new_event['related_role'] = "target"
|
||||
new_event['event_title'] = "Suivi Pédagogique"
|
||||
new_event['event_start'] = datetime.strptime(str(date_heure_debut).strip(), '%d/%m/%Y %H:%M').strftime("%Y-%m-%dT%H:%M")
|
||||
new_event['event_end'] = datetime.strptime(str(date_heure_fin).strip(), '%d/%m/%Y %H:%M').strftime("%Y-%m-%dT%H:%M")
|
||||
new_event['related_collection_recid'] = str(diction['apprenant_id'])
|
||||
new_event['event_type'] = "autre"
|
||||
|
||||
comment = " Responsable : "+str(is_valide_responsable_data['civilite']) +" "+str(is_valide_responsable_data['prenom'])+" "+str(is_valide_responsable_data['nom'])+" "
|
||||
comment = comment+ "\n Apprenant : " + str(is_valide_apprenant_data['civilite']) + " " + str( is_valide_apprenant_data['prenom']) + " " + str(is_valide_apprenant_data['nom']) + " \n "
|
||||
comment = comment +"\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
comment = " Responsable : "+str(is_valide_responsable_data['civilite']) +" "+str(is_valide_responsable_data['prenom'])+" "+str(is_valide_responsable_data['nom'])+" "
|
||||
comment = comment+ "\n Pour : " + str(cible_evaluation_data['civilite']) + " " + str( cible_evaluation_data['prenom']) + " " + str(cible_evaluation_data['nom']) + " \n "
|
||||
comment = comment +"\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
|
||||
new_event['comment'] = comment
|
||||
new_event['_id'] = ""
|
||||
new_event['comment'] = comment
|
||||
new_event['_id'] = ""
|
||||
|
||||
new_event['linked_collection'] = "suivi_pedagogique"
|
||||
new_event['linked_collection_recid'] = str(inserted_id)
|
||||
new_event['linked_collection'] = "suivi_pedagogique"
|
||||
new_event['linked_collection_recid'] = str(inserted_id)
|
||||
|
||||
|
||||
|
||||
add_agenda_status, add_agenda_retval = agenda.Add_Update_Agenda_Event(new_event)
|
||||
add_agenda_status, add_agenda_retval = agenda.Add_Update_Agenda_Event(new_event)
|
||||
|
||||
if( add_agenda_status is False ):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible d'ajouter la suivi pédagogique dans l'agenda de l'apprenant ")
|
||||
if( add_agenda_status is False ):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible d'ajouter la suivi pédagogique dans l'agenda de l'apprenant ")
|
||||
|
||||
elif( diction['employee_id']):
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
new_event['related_collection'] = "ressource_humaine"
|
||||
new_event['related_role'] = "target"
|
||||
new_event['event_title'] = "Suivi Pédagogique"
|
||||
new_event['event_start'] = datetime.strptime(str(date_heure_debut).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['event_end'] = datetime.strptime(str(date_heure_fin).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['related_collection_recid'] = str(diction['apprenant_id'])
|
||||
new_event['event_type'] = "autre"
|
||||
|
||||
comment = " Responsable : " + str(is_valide_responsable_data['civilite']) + " " + str(
|
||||
is_valide_responsable_data['prenom']) + " " + str(is_valide_responsable_data['nom']) + " "
|
||||
comment = comment + "\n Pour : " + str(cible_evaluation_data['civilite']) + " " + str(
|
||||
cible_evaluation_data['prenom']) + " " + str(cible_evaluation_data['nom']) + " \n "
|
||||
comment = comment + "\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
|
||||
new_event['comment'] = comment
|
||||
new_event['_id'] = ""
|
||||
|
||||
new_event['linked_collection'] = "suivi_pedagogique"
|
||||
new_event['linked_collection_recid'] = str(inserted_id)
|
||||
|
||||
add_agenda_status, add_agenda_retval = agenda.Add_Update_Agenda_Event(new_event)
|
||||
|
||||
if (add_agenda_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible d'ajouter la suivi pédagogique dans l'agenda de l'apprenant ")
|
||||
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
new_event['related_collection'] = "ressource_humaine"
|
||||
new_event['related_role'] = "responsable"
|
||||
new_event['event_title'] = "Suivi Pédagogique"
|
||||
new_event['event_start'] = datetime.strptime(str(date_heure_debut).strip(), '%d/%m/%Y %H:%M').strftime("%Y-%m-%dT%H:%M")
|
||||
new_event['event_end'] = datetime.strptime(str(date_heure_fin).strip(), '%d/%m/%Y %H:%M').strftime("%Y-%m-%dT%H:%M")
|
||||
|
@ -280,7 +351,7 @@ def Add_Suivi_Pedagogique(diction):
|
|||
|
||||
comment = " Responsable : " + str(is_valide_responsable_data['civilite']) + " " + str(
|
||||
is_valide_responsable_data['prenom']) + " " + str(is_valide_responsable_data['nom']) + " "
|
||||
comment = comment + "\n Apprenant : " + str(is_valide_apprenant_data['civilite']) + " " + str( is_valide_apprenant_data['prenom']) + " " + str(is_valide_apprenant_data['nom']) + " \n "
|
||||
comment = comment + "\n Pour : " + str(cible_evaluation_data['civilite']) + " " + str( cible_evaluation_data['prenom']) + " " + str(cible_evaluation_data['nom']) + " \n "
|
||||
comment = comment + "\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
|
||||
new_event['comment'] = comment
|
||||
|
@ -315,7 +386,7 @@ def Update_Suivi_Pedagogique(diction):
|
|||
"""
|
||||
field_list = ['token', 'apprenant_id', 'class_id', 'session_id', 'class_eu_id', 'responsable_id',
|
||||
'date_heure_debut', 'date_heure_fin', 'observation',
|
||||
'commentaire', '_id']
|
||||
'commentaire', '_id', 'employee_id']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -327,7 +398,8 @@ def Update_Suivi_Pedagogique(diction):
|
|||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'apprenant_id', 'responsable_id', 'date_heure_debut', 'date_heure_fin', 'observation', '_id' ]
|
||||
field_list_obligatoire = ['token', 'apprenant_id', 'responsable_id', 'date_heure_debut', 'date_heure_fin',
|
||||
'observation', '_id', 'employee_id' ]
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
|
@ -348,7 +420,15 @@ def Update_Suivi_Pedagogique(diction):
|
|||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
|
||||
"""
|
||||
On suit pedagogiquement soit un apprenant, soit un employé. Donc si les deux sont renseigné, le système
|
||||
doit mettre une erreur
|
||||
"""
|
||||
if (diction['apprenant_id'] and diction['employee_id']):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Vous devez préciser l'entité qui doit être suivie ")
|
||||
return False, " Vous devez préciser l'entité qui doit être suivie "
|
||||
|
||||
"""
|
||||
Verifier que le suivi pédagogique exite
|
||||
"""
|
||||
|
@ -398,22 +478,48 @@ def Update_Suivi_Pedagogique(diction):
|
|||
"""
|
||||
Verifier que le l'apprenant est valide
|
||||
"""
|
||||
is_valide_apprenant = MYSY_GV.dbname['apprenant'].count_documents(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if (is_valide_apprenant != 1):
|
||||
cible_evaluation_data = None
|
||||
|
||||
if (diction["apprenant_id"]):
|
||||
is_valide_apprenant = MYSY_GV.dbname['apprenant'].count_documents(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if (is_valide_apprenant != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'apprenant est invalide ")
|
||||
return False, " L'identifiant de l'apprenant est invalide "
|
||||
|
||||
cible_evaluation_data = MYSY_GV.dbname['apprenant'].find_one(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
elif (diction["employee_id"]):
|
||||
is_valide_employee_id = MYSY_GV.dbname['ressource_humaine'].count_documents(
|
||||
{'_id': ObjectId(str(diction['employee_id'])),
|
||||
'partner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if (is_valide_employee_id != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'employé est invalide ")
|
||||
return False, " L'identifiant de l'employé est invalide "
|
||||
|
||||
cible_evaluation_data = MYSY_GV.dbname['apprenant'].find_one(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
else:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'apprenant est invalide ")
|
||||
return False, " L'identifiant de l'apprenant est invalide "
|
||||
|
||||
is_valide_apprenant_data = MYSY_GV.dbname['apprenant'].find_one(
|
||||
{'_id': ObjectId(str(diction['apprenant_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'})
|
||||
str(inspect.stack()[0][3]) + " Impossible d'identifier la cible du suivi pédagogique ")
|
||||
return False, " Impossible d'identifier la cible du suivi pédagogique "
|
||||
|
||||
"""
|
||||
Verifier que le responsable est valide
|
||||
|
@ -523,59 +629,102 @@ def Update_Suivi_Pedagogique(diction):
|
|||
l'apprenant et du responsable
|
||||
"""
|
||||
|
||||
event_to_update = MYSY_GV.dbname['agenda'].find_one({
|
||||
'partner_owner_recid':str(my_partner['recid']),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'related_collection':'apprenant',
|
||||
'linked_collection':'suivi_pedagogique',
|
||||
'linked_collection_recid':str(local_suivi_peda_id)})
|
||||
if (diction['apprenant_id']):
|
||||
event_to_update = MYSY_GV.dbname['agenda'].find_one({
|
||||
'partner_owner_recid':str(my_partner['recid']),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'related_collection':'apprenant',
|
||||
'related_role':'target',
|
||||
'linked_collection':'suivi_pedagogique',
|
||||
'linked_collection_recid':str(local_suivi_peda_id)})
|
||||
|
||||
print({
|
||||
'partner_owner_recid':str(my_partner['recid']),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'related_collection':'apprenant',
|
||||
'linked_collection':'suivi_pedagogique',
|
||||
'linked_collection_recid':str(local_suivi_peda_id)})
|
||||
|
||||
if( event_to_update ):
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
new_event['related_collection'] = "apprenant"
|
||||
new_event['event_title'] = "Suivi Pédagogique"
|
||||
new_event['event_start'] = datetime.strptime(str(date_heure_debut).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['event_end'] = datetime.strptime(str(date_heure_fin).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['related_collection_recid'] = str(diction['apprenant_id'])
|
||||
new_event['event_type'] = "autre"
|
||||
|
||||
comment = " Responsable : " + str(is_valide_responsable_data['civilite']) + " " + str(
|
||||
is_valide_responsable_data['prenom']) + " " + str(is_valide_responsable_data['nom']) + " "
|
||||
comment = comment + "\n Apprenant : " + str(is_valide_apprenant_data['civilite']) + " " + str(
|
||||
is_valide_apprenant_data['prenom']) + " " + str(is_valide_apprenant_data['nom']) + " \n "
|
||||
comment = comment + "\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
if( event_to_update ):
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
new_event['related_collection'] = "apprenant"
|
||||
new_event['related_role'] = "target"
|
||||
new_event['event_title'] = "Suivi Pédagogique"
|
||||
new_event['event_start'] = datetime.strptime(str(date_heure_debut).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['event_end'] = datetime.strptime(str(date_heure_fin).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['related_collection_recid'] = str(diction['apprenant_id'])
|
||||
new_event['event_type'] = "autre"
|
||||
|
||||
new_event['comment'] = comment
|
||||
new_event['_id'] = str(event_to_update['_id'])
|
||||
comment = " Responsable : " + str(is_valide_responsable_data['civilite']) + " " + str(
|
||||
is_valide_responsable_data['prenom']) + " " + str(is_valide_responsable_data['nom']) + " "
|
||||
comment = comment + "\n Pour : " + str(cible_evaluation_data['civilite']) + " " + str(
|
||||
cible_evaluation_data['prenom']) + " " + str(cible_evaluation_data['nom']) + " \n "
|
||||
comment = comment + "\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
|
||||
new_event['linked_collection'] = "suivi_pedagogique"
|
||||
new_event['linked_collection_recid'] = str(local_suivi_peda_id)
|
||||
new_event['comment'] = comment
|
||||
new_event['_id'] = str(event_to_update['_id'])
|
||||
|
||||
new_event['linked_collection'] = "suivi_pedagogique"
|
||||
new_event['linked_collection_recid'] = str(local_suivi_peda_id)
|
||||
|
||||
add_agenda_status, add_agenda_retval = agenda.Add_Update_Agenda_Event(new_event)
|
||||
|
||||
if (add_agenda_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible d'ajouter la suivi pédagogique dans l'agenda de l'apprenant ")
|
||||
|
||||
elif (diction['employee_id']):
|
||||
event_to_update = MYSY_GV.dbname['agenda'].find_one({
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'related_collection': 'ressource_humaine',
|
||||
'related_role': 'target',
|
||||
'linked_collection': 'suivi_pedagogique',
|
||||
'linked_collection_recid': str(local_suivi_peda_id)})
|
||||
|
||||
if (event_to_update):
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
new_event['related_collection'] = "ressource_humaine"
|
||||
new_event['related_role'] = "target"
|
||||
new_event['event_title'] = "Suivi Pédagogique"
|
||||
new_event['event_start'] = datetime.strptime(str(date_heure_debut).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['event_end'] = datetime.strptime(str(date_heure_fin).strip(), '%d/%m/%Y %H:%M').strftime(
|
||||
"%Y-%m-%dT%H:%M")
|
||||
new_event['related_collection_recid'] = str(diction['apprenant_id'])
|
||||
new_event['event_type'] = "autre"
|
||||
|
||||
comment = " Responsable : " + str(is_valide_responsable_data['civilite']) + " " + str(
|
||||
is_valide_responsable_data['prenom']) + " " + str(is_valide_responsable_data['nom']) + " "
|
||||
comment = comment + "\n Pour : " + str(cible_evaluation_data['civilite']) + " " + str(
|
||||
cible_evaluation_data['prenom']) + " " + str(cible_evaluation_data['nom']) + " \n "
|
||||
comment = comment + "\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
|
||||
new_event['comment'] = comment
|
||||
new_event['_id'] = str(event_to_update['_id'])
|
||||
|
||||
new_event['linked_collection'] = "suivi_pedagogique"
|
||||
new_event['linked_collection_recid'] = str(local_suivi_peda_id)
|
||||
|
||||
add_agenda_status, add_agenda_retval = agenda.Add_Update_Agenda_Event(new_event)
|
||||
|
||||
if (add_agenda_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible d'ajouter la suivi pédagogique dans l'agenda de l'apprenant ")
|
||||
|
||||
add_agenda_status, add_agenda_retval = agenda.Add_Update_Agenda_Event(new_event)
|
||||
|
||||
if (add_agenda_status is False):
|
||||
mycommon.myprint(
|
||||
" WARNING : Impossible d'ajouter la suivi pédagogique dans l'agenda de l'apprenant ")
|
||||
|
||||
event_to_update = MYSY_GV.dbname['agenda'].find_one({
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'related_role': 'responsable',
|
||||
'related_collection': 'ressource_humaine',
|
||||
'linked_collection': 'suivi_pedagogique',
|
||||
'linked_collection_recid': str(local_suivi_peda_id)})
|
||||
|
||||
|
||||
if (event_to_update):
|
||||
new_event = {}
|
||||
new_event['token'] = str(my_token)
|
||||
|
@ -590,8 +739,8 @@ def Update_Suivi_Pedagogique(diction):
|
|||
|
||||
comment = " Responsable : " + str(is_valide_responsable_data['civilite']) + " " + str(
|
||||
is_valide_responsable_data['prenom']) + " " + str(is_valide_responsable_data['nom']) + " "
|
||||
comment = comment + "\n Apprenant : " + str(is_valide_apprenant_data['civilite']) + " " + str(
|
||||
is_valide_apprenant_data['prenom']) + " " + str(is_valide_apprenant_data['nom']) + " \n "
|
||||
comment = comment + "\n Pour : " + str(cible_evaluation_data['civilite']) + " " + str(
|
||||
cible_evaluation_data['prenom']) + " " + str(cible_evaluation_data['nom']) + " \n "
|
||||
comment = comment + "\n Unite Enseignement : " + str(local_eu_data['titre'])
|
||||
|
||||
new_event['comment'] = comment
|
||||
|
|
Loading…
Reference in New Issue