04/01/2023 - 20h00
parent
4e5fb5e8ce
commit
2617995c0f
|
@ -1,10 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="27/12/2022 - 11h00">
|
||||
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="27/12/2022 - 16h00">
|
||||
<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$/data_indexees.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data_indexees.csv" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partners.py" beforeDir="false" afterPath="$PROJECT_DIR$/partners.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -204,7 +210,8 @@
|
|||
<MESSAGE value="20/12/22 - 15h30" />
|
||||
<MESSAGE value="24/12/2022 - 15h00" />
|
||||
<MESSAGE value="27/12/2022 - 11h00" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="27/12/2022 - 11h00" />
|
||||
<MESSAGE value="27/12/2022 - 16h00" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="27/12/2022 - 16h00" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
|
|
|
@ -892,6 +892,17 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
str(inspect.stack()[0][3])+" : entete du fichier csv. '" + val + "' n'est pas acceptée")
|
||||
return False, " Entete du fichier csv. '" + val + "' n'est pas acceptée"
|
||||
|
||||
# Verification des champs obligatoires dans le fichier
|
||||
field_list_obligatoire_file = ['prenom', 'nom', 'email', 'modefinancement', 'status', 'prix']
|
||||
|
||||
for val in field_list_obligatoire_file:
|
||||
if val not in df.columns:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " : Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire")
|
||||
return False, " Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire "
|
||||
|
||||
|
||||
# Recuperation des info de la session.
|
||||
session_data = MYSY_GV.dbname['session_formation'].find_one({'formation_session_id':str(session_id)})
|
||||
if( session_data is None ):
|
||||
|
@ -1060,7 +1071,7 @@ def PrintAttendeeDetail_perSession(diction):
|
|||
tab_presences.append(local_tmp)
|
||||
|
||||
|
||||
print(" ### tab_presences =",tab_presences)
|
||||
#print(" ### tab_presences =",tab_presences)
|
||||
|
||||
templateLoader = jinja2.FileSystemLoader(searchpath="./")
|
||||
templateEnv = jinja2.Environment(loader=templateLoader)
|
||||
|
@ -1326,6 +1337,18 @@ def SendAttendeeCertification(diction):
|
|||
mycommon.myprint(str(inspect.stack()[0][3]) + " impossible de trouver le modele d'attestation")
|
||||
return False, " impossible de trouver le modele d'attestation"
|
||||
|
||||
date_fin_session = str(session_formation['date_fin'] )[0:10]
|
||||
local_status = mycommon.CheckisDate(date_fin_session)
|
||||
if( local_status is False ):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " La date de fin de session de formation est incorrecte.")
|
||||
return False, " La date de fin de session de formation est incorrecte."
|
||||
|
||||
mytoday = datetime.today().strftime("%d/%m/%Y")
|
||||
|
||||
if (datetime.strptime(str(date_fin_session).strip(), '%d/%m/%Y') > datetime.strptime(str(mytoday).strip(), '%d/%m/%Y')):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " Vous ne pouvez pas delivrer de certificat avant la date de fin de la session de formation ")
|
||||
return False, " Vous ne pouvez pas delivrer de certificat avant la date de fin de la session de formation "
|
||||
|
||||
attestation_certificat = MYSY_GV.dbname['attestation_certificat'].find_one({'nom': str(session_formation['attestation_certif']),
|
||||
'valide': "1"})
|
||||
|
||||
|
@ -1501,3 +1524,76 @@ def PrintAttendeeCertification(diction):
|
|||
return False, " Impossible d'envoyer l'attestation"
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction recuperer la liste des evaluations d'une session de formation
|
||||
"""
|
||||
def GetListEvaluation_Session(diction):
|
||||
try:
|
||||
field_list_obligatoire = ['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 liste ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
my_token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
# Recuperation du recid du partenaire
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(str(my_token))
|
||||
if partner_recid is False:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer la liste des evaluations")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
# Recuperation des infos de la formation
|
||||
for local_Insc_retval in MYSY_GV.dbname['inscription'].find({'session_id': str(diction['session_id'])}):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
user['session_id'] = local_Insc_retval['session_id']
|
||||
user['email'] = local_Insc_retval['email']
|
||||
user['nom'] = local_Insc_retval['nom']
|
||||
user['prenom'] = local_Insc_retval['prenom']
|
||||
|
||||
|
||||
if ("eval_date" in diction.keys()):
|
||||
if diction['eval_date']:
|
||||
user['eval_date'] = local_Insc_retval['eval_date']
|
||||
|
||||
if ("eval_date" in diction.keys()):
|
||||
if diction['eval_date']:
|
||||
user['eval_date'] = local_Insc_retval['eval_date']
|
||||
|
||||
if ("eval_eval" in diction.keys()):
|
||||
if diction['eval_eval']:
|
||||
user['eval_eval'] = local_Insc_retval['eval_eval']
|
||||
else:
|
||||
user['eval_eval'] = "Aucune Evalution"
|
||||
|
||||
if ("eval_note" in diction.keys()):
|
||||
if diction['eval_note']:
|
||||
user['eval_note'] = local_Insc_retval['eval_note']
|
||||
else:
|
||||
user['eval_note'] = "Aucune Note"
|
||||
|
||||
|
||||
if ("eval_pedagogie" in diction.keys()):
|
||||
if diction['eval_pedagogie']:
|
||||
user['eval_pedagogie'] = local_Insc_retval['eval_pedagogie']
|
||||
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
return True, RetObject
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
print(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de recuperer la liste des evaluations"
|
7868
Log/log_file.log
7868
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -39,7 +39,7 @@ def Add_Update_SessionFormation(diction):
|
|||
# field_list.
|
||||
'''
|
||||
field_list = ['token', 'date_debut', 'date_fin', 'nb_participant', 'formation_session_id', 'adresse',
|
||||
'code_postal', 'ville', 'formateur',
|
||||
'code_postal', 'ville', 'formateur', 'code_session',
|
||||
'class_internal_url', 'session_status', 'date_debut_inscription', 'date_fin_inscription', 'attestation_certif']
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -51,7 +51,7 @@ def Add_Update_SessionFormation(diction):
|
|||
"""
|
||||
Verification de la liste des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'formation_session_id', 'class_internal_url',]
|
||||
field_list_obligatoire = ['token', 'formation_session_id', 'class_internal_url','code_session']
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
|
@ -67,11 +67,17 @@ def Add_Update_SessionFormation(diction):
|
|||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
code_session = ""
|
||||
if ("code_session" in diction.keys()):
|
||||
if diction['code_session']:
|
||||
mydata['code_session'] = diction['code_session']
|
||||
query_key['code_session'] = diction['code_session']
|
||||
|
||||
|
||||
class_internal_url = ""
|
||||
if ("class_internal_url" in diction.keys()):
|
||||
if diction['class_internal_url']:
|
||||
mydata['class_internal_url'] = diction['class_internal_url']
|
||||
query_key['class_internal_url'] = diction['class_internal_url']
|
||||
class_internal_url = diction['class_internal_url']
|
||||
|
||||
|
||||
|
@ -84,7 +90,7 @@ def Add_Update_SessionFormation(diction):
|
|||
if ("formation_session_id" in diction.keys()):
|
||||
if diction['formation_session_id']:
|
||||
mydata['formation_session_id'] = diction['formation_session_id']
|
||||
query_key['formation_session_id'] = diction['formation_session_id']
|
||||
|
||||
session_id = diction['formation_session_id']
|
||||
|
||||
|
||||
|
@ -92,10 +98,12 @@ def Add_Update_SessionFormation(diction):
|
|||
if diction['date_debut']:
|
||||
mydata['date_debut'] = diction['date_debut']
|
||||
|
||||
|
||||
if ("date_fin" in diction.keys()):
|
||||
if diction['date_fin']:
|
||||
mydata['date_fin'] = diction['date_fin']
|
||||
|
||||
|
||||
if ("nb_participant" in diction.keys()):
|
||||
if diction['nb_participant']:
|
||||
mydata['nb_participant'] = diction['nb_participant']
|
||||
|
@ -104,16 +112,20 @@ def Add_Update_SessionFormation(diction):
|
|||
if diction['adresse']:
|
||||
mydata['adresse'] = diction['adresse']
|
||||
|
||||
|
||||
if ("code_postal" in diction.keys()):
|
||||
if diction['code_postal']:
|
||||
## Verifier si le CP n'est composé que de "0", au quel cas il s'agit d'une formation en ligne.
|
||||
local_cp = str(diction['code_postal']).replace("0","").strip()
|
||||
print(" #### local_cp = "+str(local_cp))
|
||||
|
||||
if( local_cp == ""):
|
||||
mydata['code_postal'] = "0"
|
||||
|
||||
else:
|
||||
mydata['code_postal'] = diction['code_postal']
|
||||
|
||||
|
||||
|
||||
if ("ville" in diction.keys()):
|
||||
if diction['ville']:
|
||||
mydata['ville'] = diction['ville']
|
||||
|
@ -144,6 +156,8 @@ def Add_Update_SessionFormation(diction):
|
|||
mydata['valide'] = "1"
|
||||
|
||||
|
||||
|
||||
print(" ### query_key = ", query_key)
|
||||
coll_name = MYSY_GV.dbname['session_formation']
|
||||
ret_val = coll_name.find_one_and_update(
|
||||
query_key,
|
||||
|
@ -154,8 +168,8 @@ def Add_Update_SessionFormation(diction):
|
|||
|
||||
if (ret_val['_id'] is False):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " : Impossible d'ajouter le mode de payement")
|
||||
return False, "Impossible d'ajouter le mode de payement"
|
||||
str(inspect.stack()[0][3]) + " Impossible d'ajouter/mettre à jour la session '"+str(diction['code_session'])+"' ")
|
||||
return False, "Impossible d'ajouter/mettre à jour la session '"+str(diction['code_session'])+"' "
|
||||
|
||||
|
||||
|
||||
|
@ -278,6 +292,7 @@ def GetActiveSessionFormation_List(diction):
|
|||
myquery['session_status'] = "true"
|
||||
RetObject = []
|
||||
|
||||
print(" ### myquery = ", myquery)
|
||||
for retval in coll_session.find(myquery):
|
||||
|
||||
local_tmp = retval
|
||||
|
@ -298,7 +313,7 @@ def GetActiveSessionFormation_List(diction):
|
|||
|
||||
|
||||
|
||||
#print("####RetObject = "+str(RetObject))
|
||||
print("####RetObject = "+str(RetObject))
|
||||
return True, RetObject
|
||||
|
||||
|
||||
|
@ -430,7 +445,8 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
# Verification que les noms des colonne sont bien corrects"
|
||||
'''
|
||||
field_list = ['date_debut', 'date_fin', 'nb_participant', 'adresse', 'code_postal', 'ville',
|
||||
'session_status', 'date_debut_inscription', 'date_fin_inscription', 'attestation', 'formateur']
|
||||
'session_status', 'date_debut_inscription', 'date_fin_inscription', 'attestation', 'formateur',
|
||||
'code_session']
|
||||
|
||||
# Controle du nombre de lignes dans le fichier.
|
||||
total_rows = len(df)
|
||||
|
@ -447,6 +463,17 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
str(inspect.stack()[0][3]) + " : entete du fichier csv. '" + val + "' n'est pas acceptée")
|
||||
return False, " Entete du fichier csv. '" + val + "' n'est pas acceptée"
|
||||
|
||||
|
||||
# Verification des champs obligatoires dans le fichier
|
||||
field_list_obligatoire_file = ['date_debut', 'date_fin', 'session_status', 'code_session']
|
||||
|
||||
for val in field_list_obligatoire_file:
|
||||
if val not in df.columns:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " : Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire")
|
||||
return False, " Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire "
|
||||
|
||||
|
||||
# Recuperation des info de la formation.
|
||||
formation_data = MYSY_GV.dbname['myclass'].find_one({'internal_url': str(class_internal_url)})
|
||||
if (formation_data is None):
|
||||
|
@ -461,7 +488,26 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
|
||||
mydata['date_debut'] = str(df['date_debut'].values[n]).strip().split(" ")[0]
|
||||
local_status = mycommon.CheckisDate(mydata['date_debut'])
|
||||
if(local_status is False ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer/mettre à jour la session de formation à ligne "+str(n)+"."
|
||||
"La date debut n'est pas au format jj/mm/aaaa ")
|
||||
|
||||
return False, " - Impossible de créer/mettre à jour la session de formation à ligne "+str(n)+". La date debut n'est pas au format jj/mm/aaaa "
|
||||
|
||||
mydata['date_fin'] = str(df['date_fin'].values[n]).strip().split(" ")[0]
|
||||
local_status = mycommon.CheckisDate(mydata['date_fin'])
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer/mettre à jour la session de formation à ligne " + str(n) + "."
|
||||
"La date date_fin n'est pas au format jj/mm/aaaa ")
|
||||
|
||||
return False, " - Impossible de créer/mettre à jour la session de formation à ligne " + str(
|
||||
n) + ". La date fin n'est pas au format jj/mm/aaaa "
|
||||
|
||||
|
||||
## Verification de la cohérence des dates. Date_du doit <= Date_au
|
||||
if (datetime.strptime(str(mydata['date_debut']).strip(), '%d/%m/%Y') > datetime.strptime(
|
||||
|
@ -475,14 +521,11 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
" est posterieure à la date de fin " + str(mydata['date_fin']) + " pour la ligne "+str(n)+" "
|
||||
|
||||
|
||||
|
||||
|
||||
local_nb_participants = "0"
|
||||
if ("nb_participant" in df.keys()):
|
||||
if (str(df['nb_participant'].values[n])):
|
||||
local_nb_participants = str(df['nb_participant'].values[n]).strip()
|
||||
|
||||
|
||||
local_status, new_participants = mycommon.IsInt(local_nb_participants)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
|
@ -491,12 +534,20 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
mydata['nb_participant'] = str(new_participants)
|
||||
|
||||
local_code_session = ""
|
||||
if ("code_session" in df.keys()):
|
||||
if (str(df['code_session'].values[n])):
|
||||
local_code_session = str(df['code_session'].values[n]).strip()
|
||||
mydata['code_session'] = local_code_session
|
||||
|
||||
local_adresse = ""
|
||||
if ("adresse" in df.keys()):
|
||||
if (str(df['adresse'].values[n])):
|
||||
local_adresse = str(df['adresse'].values[n]).strip()
|
||||
mydata['adresse'] = local_adresse
|
||||
|
||||
|
||||
|
||||
local_code_postal = ""
|
||||
if ("code_postal" in df.keys()):
|
||||
if (str(df['code_postal'].values[n])):
|
||||
|
@ -540,7 +591,27 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
|
||||
mydata['date_debut_inscription'] = str(df['date_debut_inscription'].values[n]).strip().split(" ")[0]
|
||||
local_status = mycommon.CheckisDate(mydata['date_debut_inscription'])
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer/mettre à jour la session de formation à ligne " + str(n) + "."
|
||||
"La date_debut_inscription n'est pas au format jj/mm/aaaa ")
|
||||
|
||||
return False, " - Impossible de créer/mettre à jour la session de formation à ligne " + str(
|
||||
n) + ". La date_debut_inscription n'est pas au format jj/mm/aaaa "
|
||||
|
||||
|
||||
mydata['date_fin_inscription'] = str(df['date_fin_inscription'].values[n]).strip().split(" ")[0]
|
||||
local_status = mycommon.CheckisDate(mydata['date_fin_inscription'])
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer/mettre à jour la session de formation à ligne " + str(n) + "."
|
||||
"La date_fin_inscription n'est pas au format jj/mm/aaaa ")
|
||||
|
||||
return False, " - Impossible de créer/mettre à jour la session de formation à ligne " + str(
|
||||
n) + ". La date_fin_inscription n'est pas au format jj/mm/aaaa "
|
||||
|
||||
## Verification de la cohérence des dates. Date_du doit <= Date_au
|
||||
if (datetime.strptime(str(mydata['date_debut_inscription']).strip(), '%d/%m/%Y') > datetime.strptime(
|
||||
|
@ -567,13 +638,8 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
diction_for_session_id['adresse'] = str(mydata['adresse'])
|
||||
|
||||
|
||||
print(" ### diction_for_session_id ", diction_for_session_id)
|
||||
|
||||
local_status, local_session_id = mycommon.CreateTrainingSession_id(diction_for_session_id)
|
||||
if( local_status is False):
|
||||
return False, local_session_id
|
||||
|
||||
mydata['formation_session_id'] = str(local_session_id)
|
||||
mydata['formation_session_id'] = str(mydata['code_session'])
|
||||
|
||||
clean_dict = {k: mydata[k] for k in mydata if (str(mydata[k]) != "nan")}
|
||||
|
||||
|
|
|
@ -2496,11 +2496,11 @@ def add_class_mass(file=None, Folder=None, diction=None):
|
|||
3]) + " - Absence de 'external_code' pour la formation à la ligne "+str(n))
|
||||
return False, " Absence de 'external_code' pour la formation à la ligne "+str(n)
|
||||
|
||||
if ("title" not in df.keys()):
|
||||
if ("titre" not in df.keys()):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][
|
||||
3]) + " - Absence de 'title' pour la formation à la ligne "+str(n))
|
||||
return False, " Absence de 'title' pour la formation à la ligne "+str(n)
|
||||
3]) + " - Absence de 'titre' pour la formation à la ligne "+str(n))
|
||||
return False, " Absence de 'titre' pour la formation à la ligne "+str(n)
|
||||
|
||||
|
||||
if ("domaine" not in df.keys()):
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
,index,mots,occurence,moyenne,id_formation,source_field
|
||||
0,0,intelligence,1,0.17,test_0002,title
|
||||
1,1,professionnel,1,0.17,test_0002,title
|
||||
2,2,entretien,1,0.17,test_0002,title
|
||||
3,3,emotionnelle,1,0.17,test_0002,title
|
||||
4,4,developper,1,0.17,test_0002,title
|
||||
5,5,preparer,1,0.17,test_0002,title
|
||||
0,0,stres,1,0.5,CODE_10009,title
|
||||
1,1,gestion,1,0.5,CODE_10009,title
|
||||
|
|
|
|
@ -1,7 +1,3 @@
|
|||
mots occurence moyenne id_formation source_field
|
||||
0 intelligence 1 0.17 test_0002 title
|
||||
1 professionnel 1 0.17 test_0002 title
|
||||
2 entretien 1 0.17 test_0002 title
|
||||
3 emotionnelle 1 0.17 test_0002 title
|
||||
4 developper 1 0.17 test_0002 title
|
||||
5 preparer 1 0.17 test_0002 title
|
||||
Empty DataFrame
|
||||
Columns: [mots, occurence, moyenne, id_formation, source_field]
|
||||
Index: []
|
16
main.py
16
main.py
|
@ -2250,6 +2250,22 @@ def PrintAttendeeCertification(token, session_id, attendee_email):
|
|||
else:
|
||||
return False
|
||||
|
||||
|
||||
"""
|
||||
Cette API retourne la liste des evalutions d'une session de formation
|
||||
"""
|
||||
@app.route('/myclass/api/GetListEvaluation_Session/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def GetListEvaluation_Session():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = request.form.to_dict()
|
||||
print(" ### GetListEvaluation_Session : payload = ",payload)
|
||||
localStatus, message= inscription.GetListEvaluation_Session(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(" debut api")
|
||||
context = SSL.Context(SSL.SSLv23_METHOD)
|
||||
|
|
|
@ -161,7 +161,7 @@ def add_partner_account(diction):
|
|||
|
||||
mydata['active'] = '0'
|
||||
mydata['locked'] = '0'
|
||||
mydata['ispending'] = "1"
|
||||
mydata['ispending'] = "0"
|
||||
|
||||
print(str(datetime.now()) + " webservice : diction = "+str(mydata))
|
||||
coll_name = MYSY_GV.dbname['partnair_account']
|
||||
|
@ -877,7 +877,7 @@ def get_partner_account(diction):
|
|||
tmp = coll_token.find({ 'token': str(token_value), 'valide': '1'})
|
||||
partnere_recid = tmp[0]['recid']
|
||||
|
||||
print(" parters RECID = "+str(partnere_recid))
|
||||
print(" #### parters RECID = "+str(partnere_recid))
|
||||
|
||||
is_first_connexion = True
|
||||
|
||||
|
@ -1190,7 +1190,7 @@ def UpgradetoPro(diction):
|
|||
'''
|
||||
mydata = {}
|
||||
mydata['migrated'] = "1"
|
||||
mydata['ispending'] = "1"
|
||||
mydata['ispending'] = "0"
|
||||
mydata['migrated_date'] = str(datetime.now())
|
||||
mydata['migrated_mail_account'] = new_diction['email']
|
||||
ret_val = coll_user_account.find_one_and_update(
|
||||
|
|
Loading…
Reference in New Issue