parent
116c95aa55
commit
04e1238455
|
@ -3,8 +3,11 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="2d3/05/2025 - 12hsdf">
|
||||
<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$/apprenant_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/apprenant_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/base_class_calcul_note.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_class_calcul_note.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/email_inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_inscription_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
|
@ -80,7 +80,7 @@ def AddStagiairetoClass(diction):
|
|||
'tuteur2_nom', 'tuteur2_prenom', 'tuteur2_email', 'tuteur2_telephone', 'tuteur2_adresse',
|
||||
'tuteur2_cp', 'tuteur2_ville', 'tuteur2_pays', 'tuteur2_include_com','date_naissance',
|
||||
'financeur_rattachement_id', 'tuteur1_civilite', 'tuteur2_civilite', 'quotation_id',
|
||||
'facture_client_rattachement_id'
|
||||
'facture_client_rattachement_id', 'tab_ue_ids'
|
||||
]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
|
@ -457,8 +457,7 @@ def AddStagiairetoClass(diction):
|
|||
else:
|
||||
mydata['opco'] = ""
|
||||
|
||||
|
||||
|
||||
mydata['class_id'] = str(is_myclass_valide_data['_id'])
|
||||
mydata['date_update'] = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
|
||||
mydata['date_creation'] = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
|
||||
mydata['update_by'] = str(connected_user_id)
|
||||
|
@ -568,9 +567,10 @@ def AddStagiairetoClass(diction):
|
|||
qui permet de créer les contenus des collection 'inscription_liste_ue' et peut etre 'inscription_liste_ue_type_eval'
|
||||
|
||||
Il s'agit du remplissage par defaut ou tout est actif
|
||||
|
||||
"""
|
||||
|
||||
if ("formation_initiale" in my_partner.keys() and my_partner['formation_initiale'] == "1"):
|
||||
if ("tab_ue_ids" not in diction.keys() and "formation_initiale" in my_partner.keys() and my_partner['formation_initiale'] == "1" ):
|
||||
local_diction = {}
|
||||
local_diction['token'] = diction['token']
|
||||
local_diction['inscription_id'] = str(inserted_id)
|
||||
|
@ -585,6 +585,24 @@ def AddStagiairetoClass(diction):
|
|||
local_inscription_liste_ue_status, local_inscription_liste_ue_retval)
|
||||
|
||||
|
||||
elif ("tab_ue_ids" in diction.keys() and "formation_initiale" in my_partner.keys() and my_partner['formation_initiale'] == "1" ):
|
||||
# Ici l'utilisateur a fourni un list d'UE ou il faut inscrire l'apprenant.
|
||||
# Ceci s'applique lorsque par exemple un apprenant d'inscrit à 1 ou 2 UE sur une formation
|
||||
local_diction = {}
|
||||
local_diction['token'] = diction['token']
|
||||
local_diction['inscription_id'] = str(inserted_id)
|
||||
local_diction['class_id'] = str(is_myclass_valide_data['_id'])
|
||||
local_diction['tab_ue_ids'] = str(diction['tab_ue_ids'])
|
||||
|
||||
print(" ### Init_AcceptAttendeeInscription_For_Initial_Formation 22 local_diction = ",local_diction )
|
||||
|
||||
local_inscription_liste_ue_status, local_inscription_liste_ue_retval = Init_AcceptAttendeeInscription_For_Initial_Formation(
|
||||
local_diction)
|
||||
|
||||
print(" local_inscription_liste_ue_status, local_inscription_liste_ue_retval = ",
|
||||
local_inscription_liste_ue_status, local_inscription_liste_ue_retval)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
update du 25/08/23
|
||||
|
@ -676,7 +694,8 @@ def AddStagiairetoClass(diction):
|
|||
new_apprenant_diction['_id'] = str(is_apprenant_existe['_id'])
|
||||
|
||||
local_apprenant_id = str(is_apprenant_existe['_id'])
|
||||
|
||||
if( "tab_ue_ids" in new_apprenant_diction.keys()):
|
||||
del new_apprenant_diction['tab_ue_ids']
|
||||
|
||||
local_status, local_retval = apprenant_mgt.Update_Apprenant(new_apprenant_diction)
|
||||
if (local_status is False):
|
||||
|
@ -687,12 +706,11 @@ def AddStagiairetoClass(diction):
|
|||
new_apprenant_diction = diction
|
||||
champ_to_delete = [ 'class_internal_url', 'session_id', 'inscription_validation_date', 'apprenant_id', 'status',
|
||||
'modefinancement', 'type_apprenant', 'financeur_rattachement_id',
|
||||
'quotation_id', 'facture_client_rattachement_id']
|
||||
'quotation_id', 'facture_client_rattachement_id', 'tab_ue_ids']
|
||||
for val in champ_to_delete:
|
||||
if( val in new_apprenant_diction.keys()):
|
||||
del new_apprenant_diction[str(val)]
|
||||
|
||||
|
||||
local_status, local_retval = apprenant_mgt.Add_Apprenant(new_apprenant_diction)
|
||||
if (local_status is False):
|
||||
return local_status, local_retval
|
||||
|
@ -738,7 +756,7 @@ def AddStagiairetoClass(diction):
|
|||
local_diction['email'] = str(diction['email'])
|
||||
local_diction['inscription_id'] = str(inserted_id)
|
||||
|
||||
print(" ### -- local_diction = ", local_diction)
|
||||
#print(" ### -- local_diction = ", local_diction)
|
||||
|
||||
local_status, local_retval = AcceptAttendeeInscription(local_diction)
|
||||
if (local_status is False):
|
||||
|
@ -750,7 +768,7 @@ def AddStagiairetoClass(diction):
|
|||
seulement dans le cas de la preinscription, car le log de la validation de l'inscription
|
||||
est porté par la fonction 'acceptinscription..."
|
||||
"""
|
||||
if( diction['status'] == "0"):
|
||||
if( new_status == "0"):
|
||||
|
||||
# pour la collection 'inscription'
|
||||
now = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S"))
|
||||
|
@ -1305,7 +1323,7 @@ def UpdateStagiairetoClass(diction):
|
|||
local_diction['email'] = str(diction['email'])
|
||||
local_diction['inscription_id'] = str(diction['_id'])
|
||||
|
||||
print(" ### -- local_diction = ", local_diction)
|
||||
#print(" ### -- local_diction = ", local_diction)
|
||||
|
||||
|
||||
local_status, local_retval = AcceptAttendeeInscription(local_diction)
|
||||
|
@ -5891,7 +5909,7 @@ def Init_AcceptAttendeeInscription_For_Initial_Formation(diction):
|
|||
"""
|
||||
Verification de la liste des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'inscription_id', 'class_id']
|
||||
field_list_obligatoire = ['token', 'inscription_id', 'class_id', 'tab_ue_ids']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
|
@ -5958,6 +5976,17 @@ def Init_AcceptAttendeeInscription_For_Initial_Formation(diction):
|
|||
{"partner_owner_recid": str(my_partner['recid']),
|
||||
'class_id': str(diction['class_id']), 'inscription_id': str(diction['inscription_id']), })
|
||||
|
||||
my_ue_ids = ""
|
||||
tab_ue_ids = []
|
||||
if ("tab_ue_ids" in diction.keys()):
|
||||
if diction['tab_ue_ids']:
|
||||
my_ue_ids = diction['tab_ue_ids']
|
||||
tab_ue_ids_work = str(my_ue_ids).split(",")
|
||||
|
||||
for tmp in tab_ue_ids_work:
|
||||
if (tmp):
|
||||
tab_ue_ids.append(tmp)
|
||||
|
||||
"""
|
||||
Recuperer les UE de la formation
|
||||
"""
|
||||
|
@ -5966,6 +5995,7 @@ def Init_AcceptAttendeeInscription_For_Initial_Formation(diction):
|
|||
qry = {"partner_owner_recid": str(my_partner['recid']), 'valide': '1', 'locked': '0',
|
||||
'_id': ObjectId(str(diction['class_id']))}
|
||||
|
||||
|
||||
"""
|
||||
Remplissage de la collection : inscription_liste_ue
|
||||
"""
|
||||
|
@ -5973,39 +6003,71 @@ def Init_AcceptAttendeeInscription_For_Initial_Formation(diction):
|
|||
if( "list_unite_enseignement" in New_retVal.keys() ):
|
||||
for local_val in New_retVal['list_unite_enseignement'] :
|
||||
|
||||
tab_class_ue_id.append(str(local_val['_id']))
|
||||
if( "tab_ue_ids" not in diction.keys() ):
|
||||
tab_class_ue_id.append(str(local_val['_id']))
|
||||
|
||||
new_data = {}
|
||||
new_data['inscription_id'] = str(diction['inscription_id'])
|
||||
new_data['class_id'] = str(diction['class_id'])
|
||||
new_data['class_eu_id'] = str(local_val['_id'])
|
||||
new_data['date_update'] = str(datetime.now())
|
||||
new_data['update_by'] = str(my_partner['_id'])
|
||||
new_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
new_data['valide'] = "1"
|
||||
new_data['locked'] = "0"
|
||||
new_data = {}
|
||||
new_data['inscription_id'] = str(diction['inscription_id'])
|
||||
new_data['class_id'] = str(diction['class_id'])
|
||||
new_data['class_eu_id'] = str(local_val['_id'])
|
||||
new_data['date_update'] = str(datetime.now())
|
||||
new_data['update_by'] = str(my_partner['_id'])
|
||||
new_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
new_data['valide'] = "1"
|
||||
new_data['locked'] = "0"
|
||||
|
||||
|
||||
|
||||
key_data = {}
|
||||
key_data['inscription_id'] = str(diction['inscription_id'])
|
||||
key_data['class_id'] = str(diction['class_id'])
|
||||
key_data['class_eu_id'] = str(local_val['_id'])
|
||||
key_data['valide'] = "1"
|
||||
key_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
key_data = {}
|
||||
key_data['inscription_id'] = str(diction['inscription_id'])
|
||||
key_data['class_id'] = str(diction['class_id'])
|
||||
key_data['class_eu_id'] = str(local_val['_id'])
|
||||
key_data['valide'] = "1"
|
||||
key_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
result = MYSY_GV.dbname['inscription_liste_ue'].find_one_and_update(
|
||||
key_data,
|
||||
{"$set": new_data},
|
||||
upsert=True,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
if ("_id" not in result.keys()):
|
||||
mycommon.myprint(
|
||||
" Impossible de valider l'inscription pour la formation initiale (2) ")
|
||||
return False, "Impossible de valider l'inscription pour la formation initiale (2) "
|
||||
|
||||
result = MYSY_GV.dbname['inscription_liste_ue'].find_one_and_update(
|
||||
key_data,
|
||||
{"$set": new_data},
|
||||
upsert=True,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
if ("_id" not in result.keys()):
|
||||
mycommon.myprint(
|
||||
" Impossible de valider l'inscription pour la formation initiale (2) ")
|
||||
return False, "Impossible de valider l'inscription pour la formation initiale (2) "
|
||||
|
||||
elif ("tab_ue_ids" in diction.keys() and str(local_val['_id']) in tab_ue_ids ):
|
||||
print(" ### traitement inscription PARTIEL UEEE ", str(local_val['_id']))
|
||||
|
||||
tab_class_ue_id.append(str(local_val['_id']))
|
||||
|
||||
new_data = {}
|
||||
new_data['inscription_id'] = str(diction['inscription_id'])
|
||||
new_data['class_id'] = str(diction['class_id'])
|
||||
new_data['class_eu_id'] = str(local_val['_id'])
|
||||
new_data['date_update'] = str(datetime.now())
|
||||
new_data['update_by'] = str(my_partner['_id'])
|
||||
new_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
new_data['valide'] = "1"
|
||||
new_data['locked'] = "0"
|
||||
|
||||
key_data = {}
|
||||
key_data['inscription_id'] = str(diction['inscription_id'])
|
||||
key_data['class_id'] = str(diction['class_id'])
|
||||
key_data['class_eu_id'] = str(local_val['_id'])
|
||||
key_data['valide'] = "1"
|
||||
key_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
result = MYSY_GV.dbname['inscription_liste_ue'].find_one_and_update(
|
||||
key_data,
|
||||
{"$set": new_data},
|
||||
upsert=True,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
if ("_id" not in result.keys()):
|
||||
mycommon.myprint(
|
||||
" Impossible de valider l'inscription pour la formation initiale (2) ")
|
||||
return False, "Impossible de valider l'inscription pour la formation initiale (2) "
|
||||
|
||||
|
||||
"""
|
||||
|
@ -6775,12 +6837,18 @@ def AcceptAttendeeInscription(diction):
|
|||
|
||||
new_apprenant_diction['_id'] = str(is_apprenant_existe['_id'])
|
||||
local_apprenant_id = str(is_apprenant_existe['_id'])
|
||||
|
||||
if ("tab_ue_ids" in new_apprenant_diction.keys()):
|
||||
del new_apprenant_diction['tab_ue_ids']
|
||||
|
||||
local_status, local_retval = apprenant_mgt.Update_Apprenant(new_apprenant_diction)
|
||||
if (local_status is False):
|
||||
return local_status, local_retval
|
||||
|
||||
else:
|
||||
# Il faut créer un dossier apprenant
|
||||
if ("tab_ue_ids" in new_apprenant_diction.keys()):
|
||||
del new_apprenant_diction['tab_ue_ids']
|
||||
|
||||
local_status, local_retval = apprenant_mgt.Add_Apprenant(new_apprenant_diction)
|
||||
if( local_status is False):
|
||||
|
|
2147
Log/log_file.log
2147
Log/log_file.log
File diff suppressed because it is too large
Load Diff
123
apprenant_mgt.py
123
apprenant_mgt.py
|
@ -232,7 +232,7 @@ def Update_Apprenant(diction):
|
|||
'tuteur1_cp', 'tuteur1_ville', 'tuteur1_pays', 'tuteur1_include_com',
|
||||
'tuteur2_nom', 'tuteur2_prenom', 'tuteur2_email', 'tuteur2_telephone', 'tuteur2_adresse',
|
||||
'tuteur2_cp', 'tuteur2_ville', 'tuteur2_pays', 'tuteur2_include_com', 'civilite', 'date_naissance',
|
||||
'tuteur1_civilite', 'tuteur2_civilite'
|
||||
'tuteur1_civilite', 'tuteur2_civilite',
|
||||
]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
|
@ -854,7 +854,7 @@ def Apprenant_Inscrire_Session(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', '_id', 'session_id', 'type_apprenant' , 'modefinancement', 'client_rattachement_id']
|
||||
field_list = ['token', '_id', 'session_id', 'type_apprenant' , 'modefinancement', 'client_rattachement_id', 'tab_ue_ids']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -947,6 +947,16 @@ def Apprenant_Inscrire_Session(diction):
|
|||
'valide': '1',
|
||||
})
|
||||
|
||||
local_class_id = ""
|
||||
if( "class_id" not in session_data.keys() ):
|
||||
class_data = MYSY_GV.dbname['myclass'].find_one({'internal_url':str(session_data['class_internal_url']),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'partner_owner_recid':str(my_partner['recid'])})
|
||||
|
||||
if(class_data and '_id' in class_data.keys() ):
|
||||
local_class_id = str(class_data['_id'])
|
||||
|
||||
|
||||
new_data = {}
|
||||
new_data['token'] = diction['token']
|
||||
|
@ -958,25 +968,78 @@ def Apprenant_Inscrire_Session(diction):
|
|||
new_data['modefinancement'] = str(diction['modefinancement'])
|
||||
new_data['client_rattachement_id'] = client_rattachement_id
|
||||
|
||||
|
||||
new_data['apprenant_id'] = str(apprenant_data['_id'])
|
||||
new_data['session_id'] = str(session_data['_id'])
|
||||
new_data['class_internal_url'] = session_data['class_internal_url']
|
||||
new_data['status'] = "1"
|
||||
new_data['type_apprenant'] = str(type_apprenant)
|
||||
new_data['tab_ue_ids'] = str(diction['tab_ue_ids'])
|
||||
|
||||
|
||||
|
||||
new_data['inscription_validation_date'] = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S"))
|
||||
#new_data['date_update'] = str(datetime.now())
|
||||
#new_data['update_by'] = str(my_partner['_id'])
|
||||
#new_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
|
||||
print('### Inscription_mgt.AddStagiairetoClass new_data = ', new_data)
|
||||
|
||||
local_status, local_retval = Inscription_mgt.AddStagiairetoClass(new_data)
|
||||
if( local_status is False ):
|
||||
return local_status, local_retval
|
||||
|
||||
"""
|
||||
Vu que la fonction "AddStagiairetoClass" ne retroune pas l'_id, on va aller le recherche
|
||||
"" "
|
||||
qry = {'apprenant_id':str(str(apprenant_data['_id'])),
|
||||
'session_id':str(session_data['_id']),
|
||||
'class_id':str(local_class_id),
|
||||
'email':apprenant_data['email']
|
||||
}
|
||||
new_inscrit_data = MYSY_GV.dbname['inscription'].find_one(qry)
|
||||
|
||||
"" "
|
||||
Verfier si 'tab_ue_ids' contient des valeurs, si oui alors il faut inscrire les ue dans la collection inscription_liste_ue
|
||||
"" "
|
||||
my_ue_ids = ""
|
||||
tab_ue_ids = []
|
||||
if ("tab_ue_ids" in diction.keys()):
|
||||
if diction['tab_ue_ids']:
|
||||
my_ue_ids = diction['tab_ue_ids']
|
||||
tab_ue_ids_work = str(my_ue_ids).split(",")
|
||||
|
||||
for tmp in tab_ue_ids_work:
|
||||
if (tmp):
|
||||
tab_ue_ids.append(tmp)
|
||||
|
||||
for ue in tab_ue_ids:
|
||||
new_data = {}
|
||||
new_data['inscription_id'] = str(new_inscrit_data['_id'])
|
||||
new_data['class_id'] = str(local_class_id)
|
||||
new_data['class_eu_id'] = str(ue)
|
||||
new_data['date_update'] = str(datetime.now())
|
||||
new_data['update_by'] = str(my_partner['_id'])
|
||||
new_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
new_data['valide'] = "1"
|
||||
new_data['locked'] = "0"
|
||||
|
||||
key_data = {}
|
||||
key_data['inscription_id'] = str(new_inscrit_data['_id'])
|
||||
key_data['class_id'] = str(local_class_id)
|
||||
key_data['class_eu_id'] = str(ue)
|
||||
key_data['valide'] = "1"
|
||||
key_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
result = MYSY_GV.dbname['inscription_liste_ue'].find_one_and_update(
|
||||
key_data,
|
||||
{"$set": new_data},
|
||||
upsert=True,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
if ("_id" not in result.keys()):
|
||||
mycommon.myprint(
|
||||
" Impossible de valider l'inscription pour la formation initiale (2) ")
|
||||
return False, "Impossible de valider l'inscription pour la formation initiale (2) "
|
||||
"""
|
||||
|
||||
|
||||
## Add to log history
|
||||
now = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S"))
|
||||
history_event_dict = {}
|
||||
|
@ -1001,6 +1064,10 @@ def Apprenant_Inscrire_Session(diction):
|
|||
|
||||
"""
|
||||
Inscrire une liste d'apprenant à une session de formation
|
||||
|
||||
Si une unité d'enseignement est fourni, alors l'incription
|
||||
concernant uniquement cette ue (collection : inscription_liste_ue)
|
||||
|
||||
"""
|
||||
def Apprenant_Inscrire_Session_List(diction):
|
||||
try:
|
||||
|
@ -1009,7 +1076,8 @@ def Apprenant_Inscrire_Session_List(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'list_apprenant_id', 'session_id', 'type_apprenant' , 'modefinancement', 'client_rattachement_id']
|
||||
field_list = ['token', 'list_apprenant_id', 'session_id', 'type_apprenant' , 'modefinancement',
|
||||
'client_rattachement_id', 'tab_ue_ids']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -1043,6 +1111,31 @@ def Apprenant_Inscrire_Session_List(diction):
|
|||
return local_status, my_partner
|
||||
|
||||
|
||||
"""
|
||||
S'il y a des ue, verifier la validité des ue
|
||||
"""
|
||||
my_ue_ids = ""
|
||||
tab_ue_ids = []
|
||||
if ("tab_ue_ids" in diction.keys()):
|
||||
if diction['tab_ue_ids']:
|
||||
my_ue_ids = diction['tab_ue_ids']
|
||||
tab_ue_ids_work = str(my_ue_ids).split(",")
|
||||
|
||||
for tmp in tab_ue_ids_work:
|
||||
if( tmp ):
|
||||
tab_ue_ids.append(tmp)
|
||||
|
||||
for val in tab_ue_ids :
|
||||
is_eu_count = MYSY_GV.dbname['unite_enseignement'].count_documents({'_id':ObjectId(str(val)),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'partner_owner_recid':str(my_partner['recid'])})
|
||||
|
||||
if( is_eu_count != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'unité d'enseignement "+str(val)+" est invalide ")
|
||||
return False, " L'unité d'enseignement "+str(val)+" est invalide "
|
||||
|
||||
|
||||
|
||||
# Verifier que le type d'apprenant est bien valide
|
||||
|
@ -1086,12 +1179,20 @@ def Apprenant_Inscrire_Session_List(diction):
|
|||
|
||||
|
||||
list_apprenant_id = []
|
||||
list_apprenant_id_work = []
|
||||
if ("list_apprenant_id" in diction.keys()):
|
||||
if diction['list_apprenant_id']:
|
||||
list_apprenant_id = str(diction['list_apprenant_id']).replace(",", ";").split(";")
|
||||
list_apprenant_id_work = str(diction['list_apprenant_id']).replace(",", ";").split(";")
|
||||
|
||||
for tmp in list_apprenant_id_work :
|
||||
if( tmp):
|
||||
list_apprenant_id.append(tmp)
|
||||
|
||||
is_blocking_message = False
|
||||
blocking_message = "Erreur : "
|
||||
|
||||
|
||||
|
||||
for apprenant_id in list_apprenant_id :
|
||||
# Verifier que l'apprenant existe
|
||||
is_apprenant_exist = MYSY_GV.dbname['apprenant'].count_documents({'_id':ObjectId(str(apprenant_id)),
|
||||
|
@ -1125,6 +1226,8 @@ def Apprenant_Inscrire_Session_List(diction):
|
|||
is_warning_message = False
|
||||
warning_message = "Warning : "
|
||||
# field_list = ['token', '_id', 'session_id', 'type_apprenant' , 'modefinancement']
|
||||
#print(" ### list_apprenant_id = ", list_apprenant_id)
|
||||
|
||||
for apprenant_id in list_apprenant_id:
|
||||
|
||||
# Recuperer les données de l'apprenant
|
||||
|
@ -1141,7 +1244,9 @@ def Apprenant_Inscrire_Session_List(diction):
|
|||
local_diction['type_apprenant'] = diction['type_apprenant']
|
||||
local_diction['modefinancement'] = diction['modefinancement']
|
||||
local_diction['client_rattachement_id'] = client_rattachement_id
|
||||
local_diction['tab_ue_ids'] = str(diction['tab_ue_ids'])
|
||||
|
||||
print(" ### local_diction = ", local_diction)
|
||||
local_status, local_retval = Apprenant_Inscrire_Session(local_diction)
|
||||
|
||||
if( local_status is False ):
|
||||
|
|
|
@ -291,7 +291,6 @@ def run_ue_pre_calcul_moyenne_somme(diction):
|
|||
qry_key['type_eval'] = note_finale['type_eval']
|
||||
qry_key['ue_id'] = note_finale['ue_id']
|
||||
|
||||
|
||||
new_data = note_finale
|
||||
new_data['date_update'] = str(datetime.now())
|
||||
new_data['update_by'] = str(my_partner['_id'])
|
||||
|
@ -323,7 +322,7 @@ def run_ue_pre_calcul_moyenne_somme(diction):
|
|||
|
||||
print(" ### local_diction = ", local_diction)
|
||||
|
||||
local_status, local_retval = Cacul_UE_Note_Finale_For_calcul_mode_1(local_diction)
|
||||
#local_status, local_retval = Cacul_UE_Note_Finale_For_calcul_mode_1(local_diction)
|
||||
|
||||
|
||||
return True, tab_note_final
|
||||
|
|
|
@ -165,7 +165,7 @@ def incription_training_confirmation_mail(diction):
|
|||
"email": str(diction['email'])},
|
||||
}
|
||||
|
||||
print(" ### BODY DATA = ", body)
|
||||
#print(" ### BODY DATA = ", body)
|
||||
|
||||
sourceHtml = template.render(params=body["params"])
|
||||
|
||||
|
|
Loading…
Reference in New Issue