parent
ee144cd1a0
commit
3d36e639a3
|
|
@ -4,10 +4,13 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="18/03/2026 - 22h">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="20/03/2026 - 9h">
|
||||
<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_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$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/model_planning_sequence_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_planning_sequence_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -451,7 +454,7 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1747251650255</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="551" />
|
||||
<option name="localTasksCounter" value="552" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
|
@ -493,7 +496,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="30/01/2026 - 18h" />
|
||||
<MESSAGE value="02/02/2026 - 18h" />
|
||||
<MESSAGE value="03/02/2026" />
|
||||
<MESSAGE value="09/02/2026" />
|
||||
|
|
@ -518,6 +520,7 @@
|
|||
<MESSAGE value="14/03/2026 - 22h" />
|
||||
<MESSAGE value="17/03/2026 - 22h" />
|
||||
<MESSAGE value="18/03/2026 - 22h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="18/03/2026 - 22h" />
|
||||
<MESSAGE value="20/03/2026 - 9h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="20/03/2026 - 9h" />
|
||||
</component>
|
||||
</project>
|
||||
2121
Log/log_file.log
2121
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
|
@ -57,7 +57,7 @@ def Add_Session_Sequence(diction):
|
|||
"""
|
||||
field_list = ['token', 'session_id', 'sequence_title', 'sequence_start', 'sequence_end', 'agenda', 'objectif',
|
||||
'commentaire', 'check_chevauchement', 'grp_apprenant_id', 'ue_id', 'type', 'ue_planif_line_id',
|
||||
'mode_animation', 'volume_theorique']
|
||||
'mode_animation', 'volume_theorique', 'obligatoire']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -223,6 +223,12 @@ def Add_Session_Sequence(diction):
|
|||
if( "sequence_title" in diction.keys() ):
|
||||
sequence_title = str(diction['sequence_title'])
|
||||
|
||||
obligatoire = ""
|
||||
if ("obligatoire" in diction.keys() and diction['obligatoire'] in ['', '1', '0']):
|
||||
obligatoire = str(diction['obligatoire'])
|
||||
if (str(diction['obligatoire']) != '1'):
|
||||
obligatoire = "0"
|
||||
|
||||
agenda = ""
|
||||
if ("agenda" in diction.keys()):
|
||||
agenda = str(diction['agenda'])
|
||||
|
|
@ -317,6 +323,8 @@ def Add_Session_Sequence(diction):
|
|||
|
||||
my_data['mode_animation'] = mode_animation
|
||||
|
||||
my_data['obligatoire'] = obligatoire
|
||||
|
||||
my_data['grp_apprenant_id'] = grp_apprenant_id
|
||||
my_data['ue_id'] = ue_id
|
||||
my_data['unite_enseignement_planif_id'] = ue_planif_line_id
|
||||
|
|
@ -379,7 +387,7 @@ def Add_Session_Sequence_Return_New_Seq_Data(diction):
|
|||
"""
|
||||
field_list = ['token', 'session_id', 'sequence_title', 'sequence_start', 'sequence_end', 'agenda', 'objectif',
|
||||
'commentaire', 'check_chevauchement', 'grp_apprenant_id', 'ue_id', 'type', 'ue_planif_line_id',
|
||||
'mode_animation', 'volume_theorique', 'tab_grp_apprenant_ids']
|
||||
'mode_animation', 'volume_theorique', 'tab_grp_apprenant_ids', 'obligatoire']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -583,6 +591,12 @@ def Add_Session_Sequence_Return_New_Seq_Data(diction):
|
|||
if ("volume_theorique" in diction.keys()):
|
||||
volume_theorique = str(diction['volume_theorique'])
|
||||
|
||||
obligatoire = ""
|
||||
if ("obligatoire" in diction.keys() and diction['obligatoire'] in ['', '1', '0']):
|
||||
obligatoire = str(diction['obligatoire'])
|
||||
if (str(diction['obligatoire']) != '1'):
|
||||
obligatoire = "0"
|
||||
|
||||
|
||||
objectif = ""
|
||||
if ("objectif" in diction.keys()):
|
||||
|
|
@ -673,6 +687,8 @@ def Add_Session_Sequence_Return_New_Seq_Data(diction):
|
|||
my_data['objectif'] = objectif
|
||||
my_data['commentaire'] = commentaire
|
||||
|
||||
my_data['obligatoire'] = obligatoire
|
||||
|
||||
my_data['mode_animation'] = mode_animation
|
||||
|
||||
my_data['grp_apprenant_id'] = grp_apprenant_id
|
||||
|
|
@ -1392,7 +1408,7 @@ def Update_Session_Sequence(diction):
|
|||
"""
|
||||
field_list = ['token', '_id', 'session_id', 'sequence_title', 'sequence_start', 'sequence_end', 'agenda', 'objectif',
|
||||
'commentaire', 'check_chevauchement', 'grp_apprenant_id', 'ue_id', 'type', 'ue_planif_line_id',
|
||||
'mode_animation', 'volume_theorique', 'tab_grp_apprenant_ids']
|
||||
'mode_animation', 'volume_theorique', 'tab_grp_apprenant_ids', 'obligatoire']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -1569,6 +1585,11 @@ def Update_Session_Sequence(diction):
|
|||
if ("sequence_title" in diction.keys()):
|
||||
update_data['sequence_title'] = str(diction['sequence_title'])
|
||||
|
||||
if ("obligatoire" in diction.keys() and diction['obligatoire'] in ['', '1', '0']):
|
||||
update_data['obligatoire'] = str(diction['obligatoire'])
|
||||
if( str(diction['obligatoire']) != '1'):
|
||||
update_data['obligatoire'] = "0"
|
||||
|
||||
if ("agenda" in diction.keys()):
|
||||
update_data['agenda'] = str(diction['agenda'])
|
||||
|
||||
|
|
@ -1787,6 +1808,8 @@ def Get_Session_Sequence_List(diction):
|
|||
for New_retVal in MYSY_GV.dbname['session_formation_sequence'].find({'session_id':str(diction['session_id']),
|
||||
'partner_owner_recid':str(my_partner['recid']), 'valide':'1', 'locked':'0'}):
|
||||
|
||||
#print(" New_retVal = ", New_retVal)
|
||||
|
||||
user = New_retVal
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
|
@ -1795,6 +1818,9 @@ def Get_Session_Sequence_List(diction):
|
|||
if ("type" not in user.keys()):
|
||||
user['type'] = ""
|
||||
|
||||
if ("obligatoire" not in user.keys()):
|
||||
user['obligatoire'] = "0"
|
||||
|
||||
|
||||
if ("volume_theorique" not in user.keys()):
|
||||
user['volume_theorique'] = ""
|
||||
|
|
@ -4584,6 +4610,9 @@ def Get_Session_Sequence_List_With_Filter(diction):
|
|||
if ("type" not in user.keys()):
|
||||
user['type'] = ""
|
||||
|
||||
if ("obligatoire" not in user.keys()):
|
||||
user['obligatoire'] = "0"
|
||||
|
||||
|
||||
if ("volume_theorique" not in user.keys()):
|
||||
user['volume_theorique'] = ""
|
||||
|
|
|
|||
315
emargement.py
315
emargement.py
|
|
@ -226,6 +226,9 @@ le statut de l'émargement :
|
|||
0 ==> Initial
|
||||
1 ==> Envoyé
|
||||
2 ==> Validé
|
||||
|
||||
|
||||
|
||||
"""
|
||||
def CreateTableauEmargement_From_Sequence(diction):
|
||||
try:
|
||||
|
|
@ -500,6 +503,314 @@ def CreateTableauEmargement_From_Sequence(diction):
|
|||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||
return False, "Impossible initialiser de créer le tableau d'émargement "
|
||||
|
||||
"""
|
||||
20/03/2026 -
|
||||
Creation des émargements pour la formation initiale.
|
||||
Ici on va aller chercher les personnes qui sont dans les groupes associé à la séquence
|
||||
"""
|
||||
|
||||
def CreateTableauEmargement_From_Sequence_FI(diction):
|
||||
try:
|
||||
'''
|
||||
# Verification que les champs reçus dans l'API sont bien dans la liste des champs autorisés
|
||||
# Cela evite le cas ou une entité tierce ajouter les valeurs inconnu dans l'API
|
||||
# Ici on doit mettre tous les champs possible (obligatoire ou non) de la BDD dans la liste
|
||||
# field_list.
|
||||
'''
|
||||
field_list = ['class_internal_url', 'session_id', 'token', 'tab_inscrit_ids', 'tab_sequence_ids']
|
||||
incom_keys = diction.keys()
|
||||
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"
|
||||
|
||||
"""
|
||||
Verification de la liste des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['class_internal_url', 'session_id', 'token']
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - : La valeur '" + val + "' n'est pas presente dans la liste des arguments ")
|
||||
return False, "Impossible de créer la liste d'emargement, Toutes les informations necessaires n'ont pas été fournies"
|
||||
|
||||
mydata = {}
|
||||
|
||||
my_token = ""
|
||||
if ("token" in diction.keys()):
|
||||
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 = my_partner['recid']
|
||||
|
||||
tab_inscrit_ids = []
|
||||
tab_inscrit_ids_Object = []
|
||||
if ("tab_inscrit_ids" in diction.keys() and diction['tab_inscrit_ids']):
|
||||
tab_inscrit_ids_work = str(diction['tab_inscrit_ids']).split(",")
|
||||
|
||||
for tmp in tab_inscrit_ids_work:
|
||||
if(tmp):
|
||||
tab_inscrit_ids.append(tmp)
|
||||
tab_inscrit_ids_Object.append(ObjectId(tmp))
|
||||
|
||||
tab_sequence_ids = []
|
||||
tab_sequence_ids_Object = []
|
||||
if ("tab_sequence_ids" in diction.keys() and diction['tab_sequence_ids']):
|
||||
tab_sequence_ids_work = str(diction['tab_sequence_ids']).split(",")
|
||||
|
||||
for tmp in tab_sequence_ids_work:
|
||||
if (tmp):
|
||||
tab_sequence_ids.append(tmp)
|
||||
tab_sequence_ids_Object.append(ObjectId(tmp))
|
||||
|
||||
|
||||
class_internal_url = ""
|
||||
if ("class_internal_url" in diction.keys()):
|
||||
if diction['class_internal_url']:
|
||||
class_internal_url = diction['class_internal_url']
|
||||
|
||||
session_id = ""
|
||||
if ("session_id" in diction.keys()):
|
||||
if diction['session_id']:
|
||||
mydata['session_id'] = diction['session_id']
|
||||
session_id = diction['session_id']
|
||||
|
||||
|
||||
"""
|
||||
Recuperation des info de la session de formation
|
||||
"""
|
||||
qry = {"_id":ObjectId(str(session_id)), "valide": "1", 'partner_owner_recid':str(partner_recid)}
|
||||
|
||||
# Verifier que la session existe
|
||||
session_formation_count = MYSY_GV.dbname['session_formation'].count_documents(qry)
|
||||
if( session_formation_count <= 0 ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - Aucune session de formation valide ")
|
||||
return False, "Aucune session de formation valide "
|
||||
|
||||
|
||||
session_data = MYSY_GV.dbname['session_formation'].find_one({"_id":ObjectId(str(session_id)), "valide": "1"})
|
||||
|
||||
|
||||
# Verifier qu'on a bien des sequences valides pour cette session de formation
|
||||
is_existe_sequence_session_valide_count = 0
|
||||
if(len(tab_sequence_ids) <= 0 ):
|
||||
is_existe_sequence_session_valide_count = MYSY_GV.dbname['session_formation_sequence'].count_documents({'session_id':str(diction['session_id']),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'partner_owner_recid':str(partner_recid)})
|
||||
else:
|
||||
is_existe_sequence_session_valide_count = MYSY_GV.dbname['session_formation_sequence'].count_documents(
|
||||
{'session_id': str(diction['session_id']),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'partner_owner_recid': str(partner_recid),
|
||||
'_id':{'$in':tab_sequence_ids_Object}}
|
||||
)
|
||||
|
||||
if( is_existe_sequence_session_valide_count <= 0):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - Aucune sequence valide pour cette session de formation ")
|
||||
return False, "Aucune sequence valide pour cette session de formation "
|
||||
|
||||
|
||||
# Recuperation de la liste des sequences associées à la session
|
||||
|
||||
|
||||
i = 0 # compteur de securité
|
||||
|
||||
|
||||
# On vide la collection emargement pour la session = str(session_id)
|
||||
filt_inscrit = {}
|
||||
filt_inscrit_for_inscription_collection = {}
|
||||
if (len(tab_inscrit_ids) > 0):
|
||||
filt_inscrit = {'inscription_id': {'$in': tab_inscrit_ids},
|
||||
'locked': '0',
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(
|
||||
partner_recid)
|
||||
}
|
||||
|
||||
filt_inscrit_for_inscription_collection = {'_id': {'$in': tab_inscrit_ids_Object},
|
||||
'locked': '0',
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(
|
||||
partner_recid)
|
||||
}
|
||||
|
||||
|
||||
filt_sequence = {}
|
||||
filt_sequence_for_sequence_collection = {}
|
||||
if (len(tab_sequence_ids) > 0):
|
||||
filt_sequence = {'session_formation_sequence_id': {'$in': tab_sequence_ids},
|
||||
'locked': '0',
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(
|
||||
partner_recid)
|
||||
}
|
||||
|
||||
filt_sequence_for_sequence_collection = {'_id': {'$in': tab_sequence_ids_Object},
|
||||
'locked': '0',
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(
|
||||
partner_recid)
|
||||
}
|
||||
|
||||
|
||||
|
||||
local_myquery = {"$and":[ {"session_id": str(session_id), 'partner_owner_recid':str(partner_recid)},
|
||||
filt_inscrit, filt_sequence
|
||||
]}
|
||||
|
||||
|
||||
|
||||
|
||||
x = MYSY_GV.dbname['emargement'].delete_many(local_myquery)
|
||||
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - INFO : "+str(x.deleted_count)+" Documents supprimés de la collection : emargement : session = "+str(session_id) )
|
||||
|
||||
|
||||
# Verification qu'il y a bien des séquences de formation pour cette session
|
||||
session_sequence_count = MYSY_GV.dbname['session_formation_sequence'].count_documents(
|
||||
{"$and":[ {'session_id': str(session_id),
|
||||
'locked': '0',
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(
|
||||
partner_recid)},
|
||||
filt_sequence_for_sequence_collection]}
|
||||
)
|
||||
|
||||
if( session_sequence_count <= 0 ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - Cette session de formation n'a aucune séquence valide ")
|
||||
return False, " Cette session de formation n'a aucune séquence valide "
|
||||
|
||||
|
||||
tab_groupe_inscription = []
|
||||
tab_groupe_inscription_code = []
|
||||
for session_sequence_data in MYSY_GV.dbname['session_formation_sequence'].find(
|
||||
{"$and": [{'session_id': str(session_id),
|
||||
'locked': '0',
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(
|
||||
partner_recid)},
|
||||
filt_sequence_for_sequence_collection]}
|
||||
):
|
||||
|
||||
if("tab_grp_apprenant_ids" in session_sequence_data.keys()):
|
||||
for local_tab_grp_apprenant_ids in session_sequence_data['tab_grp_apprenant_ids']:
|
||||
tab_groupe_inscription.append(str(local_tab_grp_apprenant_ids['_id']))
|
||||
tab_groupe_inscription_code.append(str(local_tab_grp_apprenant_ids['code']))
|
||||
|
||||
|
||||
print(" QRYY == ", {'partner_owner_recid':str(partner_recid),'groupe_inscription_id':{'$in':tab_groupe_inscription}})
|
||||
|
||||
for inscrit in MYSY_GV.dbname['groupe_inscription_membre'].find({'partner_owner_recid':str(partner_recid),
|
||||
'groupe_inscription_id':{'$in':tab_groupe_inscription}}):
|
||||
"""
|
||||
Recuperation de liste des groupe d'étudiants
|
||||
"""
|
||||
|
||||
#print("#### Liste Date = "+str(liste_date))
|
||||
coll_emargement = MYSY_GV.dbname['emargement']
|
||||
|
||||
#Recuperation de la liste des participants dont l'inscription est validée
|
||||
|
||||
for tmp_val in MYSY_GV.dbname['inscription'].find( {"$and":[ {'session_id':str(session_id),
|
||||
'class_internal_url':str(class_internal_url),
|
||||
'status':'1',
|
||||
'partner_owner_recid':str(partner_recid)}, {'_id':ObjectId(inscrit['inscription_id']) }
|
||||
]} ):
|
||||
|
||||
my_local_data = {}
|
||||
my_local_data['email'] = tmp_val['email']
|
||||
my_local_data['nom'] = tmp_val['nom']
|
||||
my_local_data['prenom'] = tmp_val['prenom']
|
||||
my_local_data['session_id'] = tmp_val['session_id']
|
||||
my_local_data['class_internal_url'] = tmp_val['class_internal_url']
|
||||
my_local_data['update_date'] = str(datetime.now())
|
||||
|
||||
# Recuperation de liste des sequences
|
||||
for session_sequence in MYSY_GV.dbname['session_formation_sequence'].find({"$and":[{'session_id':str(session_id),
|
||||
'locked':'0',
|
||||
'valide':'1',
|
||||
'partner_owner_recid':str(partner_recid)}, filt_sequence_for_sequence_collection]} ):
|
||||
query_key = {}
|
||||
query_key['email'] = tmp_val['email']
|
||||
query_key['session_id'] = tmp_val['session_id']
|
||||
query_key['class_internal_url'] = tmp_val['class_internal_url']
|
||||
query_key['session_formation_sequence_id'] = str(session_sequence['_id'])
|
||||
|
||||
query_key['date'] = str(session_sequence['sequence_start'])[0:10]
|
||||
query_key['sequence_start'] = str(session_sequence['sequence_start'])
|
||||
query_key['sequence_end'] = str(session_sequence['sequence_end'])
|
||||
|
||||
new_my_local_data = {}
|
||||
new_my_local_data['session_formation_sequence_id'] = str(session_sequence['_id'])
|
||||
new_my_local_data['inscription_id'] = str(tmp_val['_id'])
|
||||
new_my_local_data['email'] = tmp_val['email']
|
||||
new_my_local_data['nom'] = tmp_val['nom']
|
||||
new_my_local_data['prenom'] = tmp_val['prenom']
|
||||
new_my_local_data['session_id'] = tmp_val['session_id']
|
||||
new_my_local_data['class_internal_url'] = tmp_val['class_internal_url']
|
||||
new_my_local_data['update_date'] = str(datetime.now())
|
||||
query_key['date'] = str(session_sequence['sequence_start'])[0:10]
|
||||
new_my_local_data['is_present'] = False
|
||||
new_my_local_data['matin'] = False
|
||||
new_my_local_data['apresmidi'] = False
|
||||
new_my_local_data['sequence_title'] = str(session_sequence['sequence_title'])
|
||||
|
||||
|
||||
|
||||
if( "volume_theorique" in session_sequence.keys() and session_sequence['volume_theorique']):
|
||||
new_my_local_data['time_in_hour'] = str(session_sequence['volume_theorique'])
|
||||
else:
|
||||
if( "time_in_hour" in session_sequence.keys() ):
|
||||
new_my_local_data['time_in_hour'] = session_sequence['time_in_hour']
|
||||
else:
|
||||
delta_time = datetime.strptime(str(session_sequence['sequence_end']), '%d/%m/%Y %H:%M') - datetime.strptime(str(session_sequence['sequence_start']),'%d/%m/%Y %H:%M')
|
||||
|
||||
delta_time_converted_in_hour = round(float(delta_time.total_seconds() / 3600), 2)
|
||||
new_my_local_data['time_in_hour'] = str(delta_time_converted_in_hour)
|
||||
|
||||
new_my_local_data['statut'] = "0"
|
||||
new_my_local_data['date_envoi'] = ""
|
||||
|
||||
new_my_local_data['update_date'] = str(datetime.now())
|
||||
new_my_local_data['update_by'] = str(my_partner['recid'])
|
||||
new_my_local_data['valide'] = "1"
|
||||
new_my_local_data['locked'] = "0"
|
||||
|
||||
new_my_local_data['partner_owner_recid'] = str(str(partner_recid))
|
||||
|
||||
#print("### emargement insertion de : "+str(new_my_local_data))
|
||||
|
||||
local_ret_val = coll_emargement.find_one_and_update(
|
||||
query_key,
|
||||
{"$set": new_my_local_data},
|
||||
upsert=True,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
|
||||
|
||||
|
||||
return True, " Le tableau d'émargement a été correctement initialisé "
|
||||
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))
|
||||
return False, "Impossible initialiser de créer le tableau d'émargement "
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction récupérer la liste d'emargement
|
||||
|
|
@ -583,6 +894,10 @@ def GetTableauEmargement(diction):
|
|||
if ("date_envoi" not in retval.keys()):
|
||||
user['date_envoi'] = ""
|
||||
|
||||
if ("sequence_title" not in retval.keys()):
|
||||
user['sequence_title'] = ""
|
||||
|
||||
|
||||
if ("date_emargement" not in retval.keys()):
|
||||
user['date_emargement'] = ""
|
||||
|
||||
|
|
|
|||
15
main.py
15
main.py
|
|
@ -2339,6 +2339,21 @@ def CreateTableauEmargement_From_Sequence():
|
|||
|
||||
|
||||
|
||||
"""
|
||||
Cette API Crée la liste d'emargement en partant des sequences déjà crée
|
||||
pour la formation Initiale
|
||||
"""
|
||||
@app.route('/myclass/api/CreateTableauEmargement_From_Sequence_FI/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def CreateTableauEmargement_From_Sequence_FI():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### CreateTableauEmargement_From_Sequence_FI : payload = ",str(payload))
|
||||
localStatus, message= emargement.CreateTableauEmargement_From_Sequence_FI(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API de recuperation du tableau d'emargement d'un session de formation
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -541,6 +541,10 @@ def Get_Given_Sequence_Planning_Model_With_Option(diction):
|
|||
new_planning_line_node = {}
|
||||
new_planning_line_node = planning_line
|
||||
|
||||
if ("obligatoire" not in planning_line.keys()):
|
||||
new_planning_line_node['obligatoire'] = "0"
|
||||
|
||||
|
||||
ue_titre = ""
|
||||
ue_code = ""
|
||||
if ("ue_id" not in planning_line.keys()):
|
||||
|
|
|
|||
Loading…
Reference in New Issue