05/12/2023 - 21h

master
cherif 2023-12-05 21:47:26 +01:00
parent 6cf91d8f9e
commit 6d88c835e4
4 changed files with 2351 additions and 60 deletions

View File

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="01/12/2023 - 23h"> <list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="04/12/2023 - 21h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dashbord_queries/session_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/session_tbd_qries.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" 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$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partner_document_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_document_mgt.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -77,13 +75,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1680804787304</updated> <updated>1680804787304</updated>
</task> </task>
<task id="LOCAL-00112" summary="26/09/23 - 19h">
<created>1695748133845</created>
<option name="number" value="00112" />
<option name="presentableId" value="LOCAL-00112" />
<option name="project" value="LOCAL" />
<updated>1695748133845</updated>
</task>
<task id="LOCAL-00113" summary="26/09/23 - 23h"> <task id="LOCAL-00113" summary="26/09/23 - 23h">
<created>1695761971078</created> <created>1695761971078</created>
<option name="number" value="00113" /> <option name="number" value="00113" />
@ -420,7 +411,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1701470779882</updated> <updated>1701470779882</updated>
</task> </task>
<option name="localTasksCounter" value="161" /> <task id="LOCAL-00161" summary="04/12/2023 - 21h">
<created>1701722884012</created>
<option name="number" value="00161" />
<option name="presentableId" value="LOCAL-00161" />
<option name="project" value="LOCAL" />
<updated>1701722884013</updated>
</task>
<option name="localTasksCounter" value="162" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
@ -435,7 +433,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="22/10/2023 - 22h" />
<MESSAGE value="23/10/2023 - 13h" /> <MESSAGE value="23/10/2023 - 13h" />
<MESSAGE value="23/10/2023 - 16h" /> <MESSAGE value="23/10/2023 - 16h" />
<MESSAGE value="30/10/23 - 16h" /> <MESSAGE value="30/10/23 - 16h" />
@ -460,6 +457,7 @@
<MESSAGE value="24/11/2023 - 18h30" /> <MESSAGE value="24/11/2023 - 18h30" />
<MESSAGE value="30/11/2023 - 21h" /> <MESSAGE value="30/11/2023 - 21h" />
<MESSAGE value="01/12/2023 - 23h" /> <MESSAGE value="01/12/2023 - 23h" />
<option name="LAST_COMMIT_MESSAGE" value="01/12/2023 - 23h" /> <MESSAGE value="04/12/2023 - 21h" />
<option name="LAST_COMMIT_MESSAGE" value="04/12/2023 - 21h" />
</component> </component>
</project> </project>

View File

@ -6,7 +6,7 @@ from email import encoders
from email.mime.base import MIMEBase from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText from email.mime.text import MIMEText
import ast
import pymongo import pymongo
from pymongo import MongoClient from pymongo import MongoClient
import json import json
@ -5967,7 +5967,7 @@ On accepte plusieurs vesions du meme doc
""" """
def Get_List_Conventions_Stagiaire(diction): def Get_List_Conventions_Stagiaire(diction):
try: try:
field_list_obligatoire = [ 'token', 'inscription_id', ] field_list_obligatoire = [ 'token' ]
for val in field_list_obligatoire: for val in field_list_obligatoire:
if val not in diction: if val not in diction:
@ -5986,19 +5986,6 @@ def Get_List_Conventions_Stagiaire(diction):
if (local_status is not True): if (local_status is not True):
return local_status, my_partner return local_status, my_partner
# Verifier que le stagiaire est bien inscrit. Le statut de l'inscription doit etre "1"
is_inscription_valide = MYSY_GV.dbname['inscription'].count_documents({'_id':ObjectId(str(diction['inscription_id'])),
'status':'1',
'partner_owner_recid':str(my_partner['recid'])})
if( is_inscription_valide != 1 ):
mycommon.myprint(
str(inspect.stack()[0][
3]) + " L'identifiant de l'inscription est invalide ")
return False, " L'identifiant de l'inscription est invalide "
RetObject = [] RetObject = []
val_tmp = 0 val_tmp = 0
@ -6124,15 +6111,7 @@ def Sent_Convention_Stagiaire_By_Email(diction):
return False, " Aucune adresse email n'a été fourni. " return False, " Aucune adresse email n'a été fourni. "
# Verifier que le 'courrier_template_id' est valide # Verifier que le 'courrier_template_id' est valide
# Ici le template doit etre un PDF # Ici le template doit etre un email
qry = {'_id':ObjectId(str(diction['courrier_template_id'])),
'valide':'1',
'locked':'0',
'type_doc':'email',
'partner_owner_recid': str(my_partner['recid'])}
print( " ### qry = ", qry)
is_courrier_template_id_valide = MYSY_GV.dbname['courrier_template'].count_documents({'_id':ObjectId(str(diction['courrier_template_id'])), is_courrier_template_id_valide = MYSY_GV.dbname['courrier_template'].count_documents({'_id':ObjectId(str(diction['courrier_template_id'])),
'valide':'1', 'valide':'1',
'type_doc': 'email', 'type_doc': 'email',
@ -6173,29 +6152,73 @@ def Sent_Convention_Stagiaire_By_Email(diction):
# Creation du dictionnaire d'information à utiliser pour la creation du doc # Creation du dictionnaire d'information à utiliser pour la creation du doc
convention_dictionnary_data = {} convention_dictionnary_data = {}
"""
Recuperartion des champs du stagiaire
"""
stagiaire_liste_champ = ['email', 'nom', 'prenom', 'telephone', 'client_rattachement_id', 'employeur',
'modefinancement', 'tuteur1_adresse', 'tuteur1_cp', 'tuteur1_email', 'tuteur1_nom',
'tuteur1_pays', 'tuteur1_telephone', 'tuteur1_ville', 'tuteur1_prenom',
'tuteur2_adresse', 'tuteur2_cp', 'tuteur2_email', 'tuteur2_nom', 'tuteur2_pays',
'tuteur2_prenom',
'tuteur2_telephone', 'tuteur2_ville']
for champ in stagiaire_liste_champ:
if( champ in inscription_data ):
new_champ_name = "stagiaire_"+str(champ)
new_field = {new_champ_name: str(inscription_data[champ])}
convention_dictionnary_data.update(new_field)
else:
new_champ_name = "stagiaire_" + str(champ)
new_field = {new_champ_name: ""}
convention_dictionnary_data.update(new_field)
"""
Recuperartion des champs de la session
"""
session_liste_champ = ['code_session', 'class_internal_url', 'date_debut', 'session_etape', 'date_fin', 'distantiel', 'presentiel', 'session_ondemande', 'nb_participant',
'prix_session', 'titre', 'location_type', 'is_bpf', 'formateur_id', 'adresse', 'code_postal', 'ville', 'pays', 'date_debut_inscription', 'date_fin_inscription']
for champ in session_liste_champ:
if (champ in session_data):
new_champ_name = "session_" + str(champ)
new_field = {new_champ_name: str(session_data[champ])}
convention_dictionnary_data.update(new_field)
else:
new_champ_name = "session_" + str(champ)
new_field = {new_champ_name: ""}
convention_dictionnary_data.update(new_field)
"""
Recuperartion des champs de la formation
"""
myclass_liste_champ = ['certif', 'cpf', 'metier', 'objectif', 'title']
for champ in myclass_liste_champ:
if (champ in class_data):
new_champ_name = "formation_" + str(champ)
new_field = {new_champ_name: str(class_data[champ])}
convention_dictionnary_data.update(new_field)
else:
new_champ_name = "formation_" + str(champ)
new_field = {new_champ_name: ""}
convention_dictionnary_data.update(new_field)
## Creation du PDF ## Creation du PDF
body = {
"params": convention_dictionnary_data,
}
## Creation du PDF
contenu_doc_Template = jinja2.Template(str(courrier_template_data['contenu_doc'])) contenu_doc_Template = jinja2.Template(str(courrier_template_data['contenu_doc']))
sourceHtml = contenu_doc_Template.render(params=convention_dictionnary_data) sourceHtml = contenu_doc_Template.render(params=body["params"])
"""
Corps du mail qui accompagne le pdf
"""
corp_mail = '''
<!DOCTYPE html>
<html>
<body>
<h3> Attestation de {nom} {prenom} </h3>
Bonjour, <br/>
Merci de trouver votre attestation de la formation {maformation} en pièce jointe
<br/>
</body>
</html>'''
html_mime = MIMEText(sourceHtml, 'html') html_mime = MIMEText(sourceHtml, 'html')
# Creation de l'email à enoyer # Creation de l'email à enoyer
@ -6258,7 +6281,9 @@ def Sent_Convention_Stagiaire_By_Email(diction):
msg['From'] = partner_SMTP_COUNT_From_User msg['From'] = partner_SMTP_COUNT_From_User
msg['Bcc'] = 'contact@mysy-training.com' msg['Bcc'] = 'contact@mysy-training.com'
msg['Subject'] = courrier_template_data['sujet'] msg['Subject'] = courrier_template_data['sujet']
msg['to'] = "billardman01@hotmail.com" #msg['to'] = "billardman01@hotmail.com"
toaddrs = ", ".join(tab_emails_destinataire)
msg['to'] = str(toaddrs)
smtpserver.ehlo() smtpserver.ehlo()
smtpserver.starttls() smtpserver.starttls()
@ -6269,7 +6294,9 @@ def Sent_Convention_Stagiaire_By_Email(diction):
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
msg['Bcc'] = 'contact@mysy-training.com' msg['Bcc'] = 'contact@mysy-training.com'
msg['Subject'] = courrier_template_data['sujet'] msg['Subject'] = courrier_template_data['sujet']
msg['to'] = "billardman01@hotmail.com" #msg['to'] = "billardman01@hotmail.com"
toaddrs = ", ".join(tab_emails_destinataire)
msg['to'] = str(toaddrs)
smtpserver.ehlo() smtpserver.ehlo()
smtpserver.starttls() smtpserver.starttls()
@ -6286,10 +6313,117 @@ def Sent_Convention_Stagiaire_By_Email(diction):
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
return False, " Impossible d'envoyer la convention par email " return False, " Impossible d'envoyer la convention par email "
"""
Cette fonction envoie les convention en masse
Dans cette fonction, les adresse emails de destination sont recuperé dans la fonction.
Ce n'est l'utilisateur qui envoie le fonction
"""
def Sent_Convention_Stagiaire_By_Email_mass(diction):
try:
field_list_obligatoire = ['token', 'tab_inscription_id', 'courrier_template_id']
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, " La valeur '" + val + "' n'est pas presente dans liste"
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
# Verifier que le 'courrier_template_id' est valide
# Ici le template doit etre un email
is_courrier_template_id_valide = MYSY_GV.dbname['courrier_template'].count_documents(
{'_id': ObjectId(str(diction['courrier_template_id'])),
'valide': '1',
'type_doc': 'email',
'locked': '0',
'partner_owner_recid': str(my_partner['recid'])}
)
if (is_courrier_template_id_valide != 1):
mycommon.myprint(str(inspect.stack()[0][3]) + " L'identifiant du modèle de courrier est invalide ")
return False, " L'identifiant du modèle de courrier est invalide "
tab_new_diction = []
tab_inscription_id = str(diction['tab_inscription_id']).split(",")
for inscription_id in tab_inscription_id:
# Verifier que le stagiaire est bien inscrit. Le statut de l'inscription doit etre "1"
is_inscription_valide = MYSY_GV.dbname['inscription'].count_documents(
{'_id': ObjectId(str(inscription_id)),
'status': '1',
'partner_owner_recid': str(my_partner['recid'])})
if (is_inscription_valide != 1):
mycommon.myprint(
str(inspect.stack()[0][
3]) + " L'identifiant de l'inscription est invalide ")
return False, " L'identifiant de l'inscription est invalide "
# Récuperation des emails de communication de cette inscription
local_status, local_list_mail = Get_Stagiaire_Communication_List_Email({'token':diction['token'], 'inscription_id':str(inscription_id)})
if( local_status is False ):
return local_status, local_list_mail
tab_liste_mail = []
liste_mail_string = ""
for email in local_list_mail:
email_JSON = ast.literal_eval(email)
if( 'email' in email_JSON.keys() ):
tab_liste_mail.append(email_JSON['email'])
liste_mail_string = ', '.join(tab_liste_mail)
new_node = {}
new_node['token'] = str(diction['token'])
new_node['inscription_id'] = str(inscription_id)
new_node['courrier_template_id'] = str(diction['courrier_template_id'])
new_node['email_production'] = str(liste_mail_string)
new_node['email_test'] = ""
tab_new_diction.append(new_node)
nb_convocation_send = 0
warning_msg = " WARNING : Convocation(s) envoyée(s) avec les erreurs suivantes : \n : "
is_warning_msg = False
for new_diction in tab_new_diction:
print(" #### new_diction = ", new_diction)
local_status, local_retval = Sent_Convention_Stagiaire_By_Email(new_diction)
if( local_status is False):
warning_msg = warning_msg + " Impossible d'envoyer les convocation à l'apprenant avec ayant la liste de communication : "+str(new_diction['email_production']) +" \n "
is_warning_msg = True
else:
nb_convocation_send = nb_convocation_send + 1
if( is_warning_msg ):
return True, str(warning_msg)
else:
return True, str(nb_convocation_send)+" convocation(s) envoyée(s) "
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
return False, " Impossible d'envoyer la convention par email "
""" """
Impression de la convetion en mode PDF Impression de la convocation en mode PDF
""" """
def Download_Convention_Stagiaire_PDF(diction): def Download_Convention_Stagiaire_PDF(diction):
@ -6370,10 +6504,71 @@ def Download_Convention_Stagiaire_PDF(diction):
# Creation du dictionnaire d'information à utiliser pour la creation du doc # Creation du dictionnaire d'information à utiliser pour la creation du doc
convention_dictionnary_data = {} convention_dictionnary_data = {}
"""
Recuperartion des champs du stagiaire
"""
stagiaire_liste_champ = ['email', 'nom', 'prenom', 'telephone', 'client_rattachement_id', 'employeur',
'modefinancement', 'tuteur1_adresse', 'tuteur1_cp', 'tuteur1_email', 'tuteur1_nom',
'tuteur1_pays', 'tuteur1_telephone', 'tuteur1_ville', 'tuteur1_prenom',
'tuteur2_adresse', 'tuteur2_cp', 'tuteur2_email', 'tuteur2_nom', 'tuteur2_pays',
'tuteur2_prenom',
'tuteur2_telephone', 'tuteur2_ville']
for champ in stagiaire_liste_champ:
if (champ in inscription_data):
new_champ_name = "stagiaire_" + str(champ)
new_field = {new_champ_name: str(inscription_data[champ])}
convention_dictionnary_data.update(new_field)
else:
new_champ_name = "stagiaire_" + str(champ)
new_field = {new_champ_name: ""}
convention_dictionnary_data.update(new_field)
"""
Recuperartion des champs de la session
"""
session_liste_champ = ['code_session', 'class_internal_url', 'date_debut', 'session_etape', 'date_fin',
'distantiel', 'presentiel', 'session_ondemande', 'nb_participant',
'prix_session', 'titre', 'location_type', 'is_bpf', 'formateur_id', 'adresse',
'code_postal', 'ville', 'pays', 'date_debut_inscription', 'date_fin_inscription']
for champ in session_liste_champ:
if (champ in session_data):
new_champ_name = "session_" + str(champ)
new_field = {new_champ_name: str(session_data[champ])}
convention_dictionnary_data.update(new_field)
else:
new_champ_name = "session_" + str(champ)
new_field = {new_champ_name: ""}
convention_dictionnary_data.update(new_field)
"""
Recuperartion des champs de la formation
"""
myclass_liste_champ = ['certif', 'cpf', 'metier', 'objectif', 'title']
for champ in myclass_liste_champ:
if (champ in class_data):
new_champ_name = "formation_" + str(champ)
new_field = {new_champ_name: str(class_data[champ])}
convention_dictionnary_data.update(new_field)
else:
new_champ_name = "formation_" + str(champ)
new_field = {new_champ_name: ""}
convention_dictionnary_data.update(new_field)
print(" ### convention_dictionnary_data = ", convention_dictionnary_data)
body = {
"params": convention_dictionnary_data,
}
## Creation du PDF ## Creation du PDF
contenu_doc_Template = jinja2.Template(str(courrier_template_data['contenu_doc'])) contenu_doc_Template = jinja2.Template(str(courrier_template_data['contenu_doc']))
sourceHtml = contenu_doc_Template.render(params=convention_dictionnary_data) sourceHtml = contenu_doc_Template.render(params=body["params"])
todays_date = str(date.today().strftime("%d/%m/%Y")) todays_date = str(date.today().strftime("%d/%m/%Y"))
ts = datetime.now().timestamp() ts = datetime.now().timestamp()
@ -6406,3 +6601,72 @@ def Download_Convention_Stagiaire_PDF(diction):
return False, " Impossible de générer le fichier PDF (2) " return False, " Impossible de générer le fichier PDF (2) "
"""
Cette fonction retourne la liste des adresses emails de communication
d'un apprenant.
Cela peut inclure les 2 tuteurs ou pas selon les parametrage
"""
def Get_Stagiaire_Communication_List_Email(diction):
try:
field_list_obligatoire = ['token', 'inscription_id', ]
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, " La valeur '" + val + "' n'est pas presente dans liste"
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
# Verifier que le stagiaire est bien inscrit. Le statut de l'inscription doit etre "1"
is_inscription_valide = MYSY_GV.dbname['inscription'].count_documents(
{'_id': ObjectId(str(diction['inscription_id'])),
'status': '1',
'partner_owner_recid': str(my_partner['recid'])})
if (is_inscription_valide != 1):
mycommon.myprint(
str(inspect.stack()[0][
3]) + " L'identifiant de l'inscription est invalide ")
return False, " L'identifiant de l'inscription est invalide "
is_inscription_data = MYSY_GV.dbname['inscription'].find_one(
{'_id': ObjectId(str(diction['inscription_id'])),
'status': '1',
'partner_owner_recid': str(my_partner['recid'])})
RetObject = []
val_tmp = 0
if( "email" in is_inscription_data.keys()):
node = {"email":str(is_inscription_data['email'])}
RetObject.append(mycommon.JSONEncoder().encode(node))
if( "tuteur1_include_com" in is_inscription_data.keys() and str(is_inscription_data['tuteur1_include_com']) == "1"
and "tuteur1_email" in is_inscription_data.keys() and is_inscription_data['tuteur1_email']):
node = {"email": str(is_inscription_data['tuteur1_email'])}
RetObject.append(mycommon.JSONEncoder().encode(node))
if ("tuteur2_include_com" in is_inscription_data.keys() and str(
is_inscription_data['tuteur2_include_com']) == "1"
and "tuteur2_email" in is_inscription_data.keys() and is_inscription_data['tuteur2_email']):
node = {"email": str(is_inscription_data['tuteur2_email'])}
RetObject.append(mycommon.JSONEncoder().encode(node))
return True, RetObject
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
return False, " Impossible de récupérer la liste des emails de communication "

File diff suppressed because it is too large Load Diff

25
main.py
View File

@ -4014,6 +4014,18 @@ def Sent_Convention_Stagiaire_By_Email():
status, retval = inscription.Sent_Convention_Stagiaire_By_Email(payload) status, retval = inscription.Sent_Convention_Stagiaire_By_Email(payload)
return jsonify(status=status, message=retval) return jsonify(status=status, message=retval)
"""
API : Traitement en masse qui permet d'envoyer de le convention du stagiaire par email
"""
@app.route('/myclass/api/Sent_Convention_Stagiaire_By_Email_mass/', methods=['POST','GET'])
@crossdomain(origin='*')
def Sent_Convention_Stagiaire_By_Email_mass():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Sent_Convention_Stagiaire_By_Email_mass payload = ",payload)
status, retval = inscription.Sent_Convention_Stagiaire_By_Email_mass(payload)
return jsonify(status=status, message=retval)
""" """
API qui permet de telecharger la convention en mode PDF API qui permet de telecharger la convention en mode PDF
@ -4037,6 +4049,19 @@ def Download_Convention_Stagiaire_PDF(token, inscription_id, courrier_template_i
return False return False
"""
API qui retourne la liste des adresse email eligibles à la communication
d'un apprenant
(potentiellement inclus les mails des tuteurs si paramettres ok
"""
@app.route('/myclass/api/Get_Stagiaire_Communication_List_Email/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Stagiaire_Communication_List_Email():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Stagiaire_Communication_List_Email payload = ",payload)
status, retval = inscription.Get_Stagiaire_Communication_List_Email(payload)
return jsonify(status=status, message=retval)
""" """