parent
5c3ce1ec80
commit
638b9d8fc3
|
@ -1,12 +1,12 @@
|
|||
<?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="03/05/2025 - 20h">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="05/05/2025 - 20h">
|
||||
<change afterPath="$PROJECT_DIR$/jury_mgt.py" afterDir="false" />
|
||||
<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$/base_class_calcul_note.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_class_calcul_note.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/equipe_team_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/equipe_team_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/unite_enseignement_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/unite_enseignement_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
|
@ -85,13 +85,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00404" summary="05/10/2024 - 18h30">
|
||||
<created>1728145402808</created>
|
||||
<option name="number" value="00404" />
|
||||
<option name="presentableId" value="LOCAL-00404" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1728145402808</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00405" summary="07/10/2024 - 20h30">
|
||||
<created>1728325045729</created>
|
||||
<option name="number" value="00405" />
|
||||
|
@ -428,7 +421,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1746294987208</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="453" />
|
||||
<task id="LOCAL-00453" summary="05/05/2025 - 20h">
|
||||
<created>1746464819661</created>
|
||||
<option name="number" value="00453" />
|
||||
<option name="presentableId" value="LOCAL-00453" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1746464819662</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="454" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -470,7 +470,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="31/12/2024 - 12h30" />
|
||||
<MESSAGE value="03/01/2025 - 17h30" />
|
||||
<MESSAGE value="04/01/2025 - 14h48" />
|
||||
<MESSAGE value="16/01/2025 - 16h30" />
|
||||
|
@ -495,6 +494,7 @@
|
|||
<MESSAGE value="30/04/2025 - 15h" />
|
||||
<MESSAGE value="02/05/2025 - 20h" />
|
||||
<MESSAGE value="03/05/2025 - 20h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="03/05/2025 - 20h" />
|
||||
<MESSAGE value="05/05/2025 - 20h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="05/05/2025 - 20h" />
|
||||
</component>
|
||||
</project>
|
1842
Log/log_file.log
1842
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -947,9 +947,9 @@ def Get_List_Evaluation_Final_Note_Classement_Detail_With_Filter(diction):
|
|||
|
||||
|
||||
"""
|
||||
Recuperation des notes finales avec le classement
|
||||
Recuperation des notes et le classement par unité d'enseignement (UE)
|
||||
"""
|
||||
def Get_List_Evaluation_Final_Note_Classement_With_Filter(diction):
|
||||
def Get_List_Evaluation_UE_Note_Classement_With_Filter(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
|
@ -1082,6 +1082,78 @@ def Get_List_Evaluation_Final_Note_Classement_With_Filter(diction):
|
|||
|
||||
|
||||
|
||||
"""
|
||||
Recuperation des notes et le classement par Inscription (donc le classement et moyenne definitive)
|
||||
"""
|
||||
def Get_List_Evaluation_Inscriptio_Note_Classement_With_Filter(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token','session_id']
|
||||
|
||||
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'existe pas")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token','session_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, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
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
|
||||
|
||||
|
||||
"""
|
||||
Clés de mise à jour
|
||||
"""
|
||||
data_cle = {}
|
||||
data_cle['partner_owner_recid'] = str(my_partner['recid'])
|
||||
data_cle['valide'] = "1"
|
||||
data_cle['session_id'] = str(diction['session_id'])
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 0
|
||||
|
||||
for retval in MYSY_GV.dbname['inscription'].find(data_cle).sort([("rang", pymongo.ASCENDING),("note_finale", pymongo.DESCENDING),
|
||||
("nom", pymongo.DESCENDING), ]):
|
||||
user = retval
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
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 les classement pour la collection 'inscription' "
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction va calculer moyenne par session (formation)
|
||||
|
||||
|
@ -1215,6 +1287,8 @@ def Cacul_Session_Note_Finale_For_calcul_mode_1(diction):
|
|||
session_somme_note_with_coef = 0
|
||||
session_moyenne_note_with_coef = 0
|
||||
|
||||
session_somme_credit_acquis = 0
|
||||
|
||||
for class_ue in tab_class_ue :
|
||||
for tmps_data in MYSY_GV.dbname['session_formation_final_note_classement'].find({'partner_owner_recid':str(my_partner['recid']),
|
||||
'ue_id':str(class_ue['_id']),
|
||||
|
@ -1233,6 +1307,14 @@ def Cacul_Session_Note_Finale_For_calcul_mode_1(diction):
|
|||
ue_note_with_coef = round( (float(tmps_data['note_finale'])*float(coefficient)), 2)
|
||||
session_somme_note_with_coef = round( (session_somme_note_with_coef + ue_note_with_coef), 2)
|
||||
|
||||
"""
|
||||
Si l'UE est validée, alors on attribut le credit comme validé
|
||||
"""
|
||||
if ("ue_validation" in tmps_data.keys() and str(tmps_data['ue_validation']) == "1" ):
|
||||
if( "credit" in tmps_data.keys() and tmps_data['credit']):
|
||||
session_somme_credit_acquis = round( (float(session_somme_credit_acquis) + float(tmps_data['credit'])), 2)
|
||||
|
||||
print(" ### session_somme_credit_acquis total = ", session_somme_credit_acquis)
|
||||
print(" ### nb_coef total = ", nb_coef)
|
||||
print(" ### session_somme_note_with_coef = ", session_somme_note_with_coef)
|
||||
session_moyenne_note_with_coef = round( (float(session_somme_note_with_coef) / float(nb_coef)), 2)
|
||||
|
@ -1248,7 +1330,8 @@ def Cacul_Session_Note_Finale_For_calcul_mode_1(diction):
|
|||
'locked': '0'
|
||||
|
||||
},
|
||||
{"$set": {'note_finale': str(session_moyenne_note_with_coef)}},
|
||||
{"$set": {'note_finale': str(session_moyenne_note_with_coef),
|
||||
'credit_acquis':str(session_somme_credit_acquis)}},
|
||||
return_document=ReturnDocument.AFTER,
|
||||
upsert=False,
|
||||
)
|
||||
|
@ -1434,6 +1517,12 @@ def Calcul_Note_Classement_Session(diction):
|
|||
'valide': '1',
|
||||
'partner_owner_recid': str(my_partner['recid'])})
|
||||
|
||||
tab_inscrit_id = []
|
||||
for inscrit in MYSY_GV.dbname['inscription'].find({'valide':'1',
|
||||
'partner_owner_recid':str(my_partner['recid']),
|
||||
'session_id':str(is_session_valide_data['_id'])}):
|
||||
tab_inscrit_id.append(str(inscrit['_id']))
|
||||
|
||||
print(" ### str(is_session_valide_data['class_internal_url']) = ", str(is_session_valide_data['class_internal_url']))
|
||||
|
||||
is_class_data = MYSY_GV.dbname['myclass'].find_one({'internal_url':str(is_session_valide_data['class_internal_url']),
|
||||
|
@ -1441,6 +1530,105 @@ def Calcul_Note_Classement_Session(diction):
|
|||
'partner_owner_recid':str(my_partner['recid'])})
|
||||
|
||||
|
||||
"""
|
||||
Preparation des calculs
|
||||
"""
|
||||
|
||||
# On recupere la liste des ue_id de la formation
|
||||
tab_ue_id = []
|
||||
for class_class_ue_data in is_class_data['list_unite_enseignement'] :
|
||||
tab_ue_id.append( str(class_class_ue_data['_id']))
|
||||
|
||||
|
||||
local_diction = {}
|
||||
local_diction['token'] = str(diction['token'])
|
||||
local_diction['class_id'] = str(is_class_data['_id'])
|
||||
local_diction['session_id'] = str(diction['session_id'])
|
||||
|
||||
|
||||
list_inscrit_id = ",".join(tab_ue_id)
|
||||
local_diction['tab_ue_ids'] = str(list_inscrit_id)
|
||||
|
||||
list_inscrit_id = ",".join(tab_inscrit_id)
|
||||
local_diction['tab_inscriptions_ids'] = str(list_inscrit_id)
|
||||
|
||||
print('### local_diction 01010 =', local_diction)
|
||||
|
||||
local_status, local_retval = run_ue_pre_calcul_moyenne_somme(local_diction)
|
||||
|
||||
if( local_status is False ):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Impossible d'initialiser les calculs (fonction :run_ue_pre_calcul_moyenne_somme ) ")
|
||||
return False, " Impossible d'initialiser les calculs ",
|
||||
|
||||
|
||||
"""
|
||||
Pour Chaque UE de l'enseignement aller chercher le 'note_ue_calculation_rule_id', puis la formule de calcul associée
|
||||
"""
|
||||
for class_class_ue_data in is_class_data['list_unite_enseignement'] :
|
||||
|
||||
unite_enseignement_data = MYSY_GV.dbname['unite_enseignement'].find_one(
|
||||
{'_id': ObjectId(str(class_class_ue_data['_id'])),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
})
|
||||
|
||||
|
||||
note_ue_calculation_rule_id = ""
|
||||
if( "note_ue_calculation_rule_id" in unite_enseignement_data.keys() and unite_enseignement_data['note_ue_calculation_rule_id']):
|
||||
|
||||
note_ue_calculation_rule_id = unite_enseignement_data['note_ue_calculation_rule_id']
|
||||
|
||||
if( note_ue_calculation_rule_id == ""):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'unité d'enseignement "+str(unite_enseignement_data['code'])+" n'a pas de règle de calcul de la note")
|
||||
return False, " L'unité d'enseignement "+str(unite_enseignement_data['code'])+" n'a pas de règle de calcul de la note"
|
||||
|
||||
base_calcul_note_class_and_ue_data = MYSY_GV.dbname['base_calcul_note_class_and_ue'].find_one({'_id':ObjectId(str(unite_enseignement_data['note_ue_calculation_rule_id'])),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'related_collection':'unite_enseignement'})
|
||||
|
||||
ue_calcul_fonction_name = ""
|
||||
if ("fonction_name" in base_calcul_note_class_and_ue_data.keys() and base_calcul_note_class_and_ue_data['fonction_name']):
|
||||
ue_calcul_fonction_name = base_calcul_note_class_and_ue_data['fonction_name']
|
||||
|
||||
if (ue_calcul_fonction_name == ""):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'unité d'enseignement " + str(
|
||||
unite_enseignement_data['code']) + " n'a pas de règle de calcul de la note (2) ")
|
||||
return False, " L'unité d'enseignement " + str(
|
||||
unite_enseignement_data['code']) + " n'a pas de règle de calcul de la note (2) "
|
||||
|
||||
print(" ### Pour l'UE : ",str(unite_enseignement_data['code']),
|
||||
" Coef : ", class_class_ue_data['coefficient'],
|
||||
" seuil validation : ", class_class_ue_data['seuil_validation'])
|
||||
|
||||
print(" ### la formule de calcul est : ", base_calcul_note_class_and_ue_data['fonction_name'])
|
||||
|
||||
#field_list = ['token', 'class_id', 'session_id', 'ue_id', 'tab_inscriptions_ids',]
|
||||
local_node = {}
|
||||
local_node['token'] = str(diction['token'])
|
||||
local_node['class_id'] = str(is_class_data['_id'])
|
||||
local_node['session_id'] = str(diction['session_id'])
|
||||
local_node['ue_id'] = str(unite_enseignement_data['_id'])
|
||||
|
||||
list_inscrit_id = ",".join(tab_inscrit_id)
|
||||
local_node['tab_inscriptions_ids'] = str(list_inscrit_id)
|
||||
|
||||
|
||||
possibles = globals().copy()
|
||||
possibles.update(locals())
|
||||
cron_function = possibles.get(base_calcul_note_class_and_ue_data['fonction_name'])
|
||||
|
||||
if not cron_function:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Fonction '" + str(base_calcul_note_class_and_ue_data['fonction_name']) + "' est introuvable")
|
||||
|
||||
print(" Exécution de la fonction : UE de Session = ", base_calcul_note_class_and_ue_data['fonction_name'])
|
||||
local_status, local_retval = cron_function(local_node)
|
||||
|
||||
|
||||
class_function_note_calcul_rule = ""
|
||||
class_note_calcul_data = None
|
||||
if( is_class_data and "note_finale_calculation_rule_id" in is_class_data.keys() and is_class_data['note_finale_calculation_rule_id'] ):
|
||||
|
@ -1454,7 +1642,7 @@ def Calcul_Note_Classement_Session(diction):
|
|||
|
||||
if ("fonction_name" in class_note_calcul_data.keys() and class_note_calcul_data['fonction_name']):
|
||||
|
||||
print(" Traitement fonction = ", class_note_calcul_data['fonction_name'])
|
||||
print(" Traitement fonction niveau SESSION = ", class_note_calcul_data['fonction_name'])
|
||||
|
||||
possibles = globals().copy()
|
||||
possibles.update(locals())
|
||||
|
@ -1464,18 +1652,27 @@ def Calcul_Note_Classement_Session(diction):
|
|||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Fonction '" + str(class_note_calcul_data['job_name']) + "' est introuvable")
|
||||
|
||||
#field_list = ['token', 'class_id', 'session_id', 'tab_inscriptions_ids', ]
|
||||
|
||||
local_con_status, local_con_retval = cron_function()
|
||||
local_node = {}
|
||||
local_node['token'] = str(diction['token'])
|
||||
local_node['class_id'] = str(is_class_data['_id'])
|
||||
local_node['session_id'] = str(diction['session_id'])
|
||||
|
||||
list_inscrit_id = ",".join(tab_inscrit_id)
|
||||
local_node['tab_inscriptions_ids'] = str(list_inscrit_id)
|
||||
|
||||
local_con_status, local_con_retval = cron_function(local_node)
|
||||
|
||||
|
||||
print(" ### class_note_calcul_data = ", class_note_calcul_data)
|
||||
RetObject = []
|
||||
|
||||
|
||||
return True, "OK"
|
||||
return True, "Le calcul des notes est Ok"
|
||||
|
||||
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 base_calcul_note_class_and_ue "
|
||||
return False, " Impossible de lancer le calcul des notes "
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ def Add_Update_Equipe_Team_Membres(diction):
|
|||
Cette fonction permet de supprimer des membres d'une équipe
|
||||
"""
|
||||
|
||||
def Delete_Groupe_Equipe_Team_Membre(diction):
|
||||
def Delete_Equipe_Team_Membre(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
|
@ -534,7 +534,6 @@ def Delete_Groupe_Equipe_Team_Membre(diction):
|
|||
"""
|
||||
Mise à jour d'une équipe
|
||||
"""
|
||||
|
||||
def Update_Equipe_Team(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
@ -720,7 +719,7 @@ def Update_Equipe_Team(diction):
|
|||
mycommon.myprint(
|
||||
" WARNING : Impossible de logguer l'historique pour l'évènement : " + str(history_event_dict))
|
||||
|
||||
return True, " L'équipe de formation a été correctement mise à jour"
|
||||
return True, " L'équipe a été correctement mise à jour"
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
|
|
File diff suppressed because it is too large
Load Diff
144
main.py
144
main.py
|
@ -97,6 +97,7 @@ import model_planning_sequence_mgt as model_planning_sequence_mgt
|
|||
import base_partner_catalog_config as base_partner_catalog_config
|
||||
import equipe_team_mgt as equipe_team_mgt
|
||||
import base_class_calcul_note as base_class_calcul_note
|
||||
import jury_mgt as jury_mgt
|
||||
|
||||
import base_document_automatic_setup as base_document_automatic_setup
|
||||
|
||||
|
@ -12143,13 +12144,13 @@ def Get_Given_Equipe_Team_With_Members():
|
|||
"""
|
||||
API pour ajouter / mettre à jour les membres d'une équipe
|
||||
"""
|
||||
@app.route('/myclass/api/Delete_Groupe_Equipe_Team_Membre/', methods=['POST','GET'])
|
||||
@app.route('/myclass/api/Delete_Equipe_Team_Membre/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Delete_Groupe_Equipe_Team_Membre():
|
||||
def Delete_Equipe_Team_Membre():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Delete_Groupe_Equipe_Team_Membre : payload = ",payload)
|
||||
localStatus, message= equipe_team_mgt.Delete_Groupe_Equipe_Team_Membre(payload)
|
||||
print(" ### Delete_Equipe_Team_Membre : payload = ",payload)
|
||||
localStatus, message= equipe_team_mgt.Delete_Equipe_Team_Membre(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
@ -12200,13 +12201,13 @@ def Get_List_Evaluation_Final_Note_Classement_Detail_With_Filter():
|
|||
"""
|
||||
API qui retourne la note finale et le classement sur une session de formation
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_Evaluation_Final_Note_Classement_With_Filter', methods=['POST','GET'])
|
||||
@app.route('/myclass/api/Get_List_Evaluation_UE_Note_Classement_With_Filter', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_Evaluation_Final_Note_Classement_With_Filter():
|
||||
def Get_List_Evaluation_UE_Note_Classement_With_Filter():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary(request.form.to_dict())
|
||||
print(" ### Get_List_Evaluation_Final_Note_Classement_With_Filter : payload = ",payload)
|
||||
localStatus, message= base_class_calcul_note.Get_List_Evaluation_Final_Note_Classement_With_Filter(payload)
|
||||
print(" ### Get_List_Evaluation_UE_Note_Classement_With_Filter : payload = ",payload)
|
||||
localStatus, message= base_class_calcul_note.Get_List_Evaluation_UE_Note_Classement_With_Filter(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
@ -12266,6 +12267,133 @@ def Calcul_Note_Classement_Session():
|
|||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API qui prend une session de formation et retour la liste des inscrit classée selon le rang et la moyenne
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_Evaluation_Inscriptio_Note_Classement_With_Filter', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_Evaluation_Inscriptio_Note_Classement_With_Filter():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary(request.form.to_dict())
|
||||
print(" ### Get_List_Evaluation_Inscriptio_Note_Classement_With_Filter : payload = ",payload)
|
||||
localStatus, message= base_class_calcul_note.Get_List_Evaluation_Inscriptio_Note_Classement_With_Filter(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API pour ajouter un Jury
|
||||
"""
|
||||
@app.route('/myclass/api/Add_Jury/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Add_Jury():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Add_Jury : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Add_Jury(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API pour mettre à jour un Jury
|
||||
"""
|
||||
@app.route('/myclass/api/Update_Jury/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Update_Jury():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Update_Jury : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Update_Jury(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API pour mettre supprimer un Jury
|
||||
"""
|
||||
@app.route('/myclass/api/Delete_Jury/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Delete_Jury():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Delete_Jury : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Delete_Jury(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API pour recuperer la liste des Jurys d'un partenaire
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_Jury/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_Jury():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_List_Jury : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Get_List_Jury(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API pour recuperer la liste des Jurys d'un partenaire
|
||||
avec des filtres sur :
|
||||
|
||||
- code
|
||||
- description
|
||||
- membre (nom ou prenom ) equipe
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_jury_With_Filter/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_jury_With_Filter():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_List_jury_With_Filter : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Get_List_jury_With_Filter(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API pour recuperer les données d'une Jury d'un partenaire,
|
||||
y compris les membres
|
||||
"""
|
||||
@app.route('/myclass/api/Get_Given_Jury_With_Members/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_Given_Jury_With_Members():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_Given_Jury_With_Members : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Get_Given_Jury_With_Members(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API pour ajouter / mettre à jour les membres d'un Jury
|
||||
"""
|
||||
@app.route('/myclass/api/Add_Update_Jury_Membres/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Add_Update_Jury_Membres():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Add_Update_Jury_Membres : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Add_Update_Jury_Membres(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API pour supprimer les membres d'une Jury
|
||||
"""
|
||||
@app.route('/myclass/api/Delete_Jury_Membre/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Add_Update_Jury_Team_Membres():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Delete_Jury_Membre : payload = ",payload)
|
||||
localStatus, message= jury_mgt.Delete_Jury_Membre(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(" debut api")
|
||||
context = SSL.Context(SSL.SSLv23_METHOD)
|
||||
|
|
|
@ -181,6 +181,9 @@ def Update_Unite_Enseignement(diction):
|
|||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
print(" ### diction = ", diction)
|
||||
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue