parent
2ed6d967fb
commit
a0bf6933c4
|
|
@ -4,12 +4,14 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="27/05/2026 - 22h00">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="28/05/2026 - 22h00">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/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$/jury_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/jury_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/note_evaluation_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/note_evaluation_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/unite_enseignement_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/unite_enseignement_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -453,7 +455,7 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1747251650255</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="592" />
|
||||
<option name="localTasksCounter" value="593" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
|
@ -495,7 +497,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="26/04/26 - 19h" />
|
||||
<MESSAGE value="27/04/26 - 19h" />
|
||||
<MESSAGE value="28/04/26 - 19h" />
|
||||
<MESSAGE value="29/04/26 - 21h" />
|
||||
|
|
@ -520,6 +521,7 @@
|
|||
<MESSAGE value="26/05/2026 - 18h00" />
|
||||
<MESSAGE value="27/05/2026 - 18h00" />
|
||||
<MESSAGE value="27/05/2026 - 22h00" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="27/05/2026 - 22h00" />
|
||||
<MESSAGE value="28/05/2026 - 22h00" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="28/05/2026 - 22h00" />
|
||||
</component>
|
||||
</project>
|
||||
4676
Log/log_file.log
4676
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
|
@ -1289,8 +1289,8 @@ def Get_List_Evaluation_UE_Note_Classement_With_Filter(diction):
|
|||
user['ue_id_code'] = ue_id_code
|
||||
|
||||
class_id_external_code = ""
|
||||
if ("class_id" in retval.keys()):
|
||||
class_id_data = MYSY_GV.dbname['myclass'].find_one({'_id': ObjectId(str(retval['ue_id'])),
|
||||
if ("class_id" in retval.keys() and retval['class_id']):
|
||||
class_id_data = MYSY_GV.dbname['myclass'].find_one({'_id': ObjectId(str(retval['class_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'},
|
||||
|
|
@ -3647,7 +3647,8 @@ def Create_work_evaluation_participant_note(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['partner_owner_recid', 'semestre', 'diplome_id', 'tab_domaine_competence_ids', 'inscrit_id', 'class_id', 'session_id',
|
||||
field_list = ['partner_owner_recid', 'semestre', 'diplome_id', 'tab_domaine_competence_ids', 'inscrit_id',
|
||||
'class_id', 'session_id',
|
||||
'rattrapage', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
|
|
@ -3662,10 +3663,12 @@ def Create_work_evaluation_participant_note(diction):
|
|||
filt_diplome_id = {'tab_diplome_ids': str(diction['diplome_id']) }
|
||||
|
||||
|
||||
|
||||
tab_domaine_competence_ids = []
|
||||
tab_domaine_competence_ids_work = str(diction['tab_domaine_competence_ids']).strip().split(",")
|
||||
for tmp in tab_domaine_competence_ids_work:
|
||||
tab_domaine_competence_ids.append(str(tmp))
|
||||
if( "tab_domaine_competence_ids" in diction.keys() and diction['tab_domaine_competence_ids']):
|
||||
tab_domaine_competence_ids_work = str(diction['tab_domaine_competence_ids']).strip().split(",")
|
||||
for tmp in tab_domaine_competence_ids_work:
|
||||
tab_domaine_competence_ids.append(str(tmp))
|
||||
|
||||
filt_domaine_competence_id = {}
|
||||
if ("tab_domaine_competence_ids" in diction.keys() and diction['tab_domaine_competence_ids']):
|
||||
|
|
@ -3679,6 +3682,10 @@ def Create_work_evaluation_participant_note(diction):
|
|||
if ("session_id" in diction.keys() and diction['session_id']):
|
||||
filt_session_id = {'session_id': str(diction['session_id'])}
|
||||
|
||||
filt_semestre = {}
|
||||
if ("semestre" in diction.keys() and diction['semestre']):
|
||||
filt_semestre = {'semestre': str(diction['semestre'])}
|
||||
|
||||
filt_rattrapage = {}
|
||||
if ("rattrapage" in diction.keys() and diction['rattrapage'] == "1"):
|
||||
filt_rattrapage = {'rattrapage': '1'}
|
||||
|
|
@ -3692,7 +3699,8 @@ def Create_work_evaluation_participant_note(diction):
|
|||
[ {"partner_owner_recid": str(diction["partner_owner_recid"]),
|
||||
"valide": "1",
|
||||
"locked": "0"},
|
||||
filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id, filt_rattrapage]
|
||||
filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id,
|
||||
filt_rattrapage, filt_semestre]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3704,7 +3712,8 @@ def Create_work_evaluation_participant_note(diction):
|
|||
[ {"partner_owner_recid": str(diction["partner_owner_recid"]),
|
||||
"valide": "1",
|
||||
"locked": "0"},
|
||||
filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id, filt_rattrapage]
|
||||
filt_diplome_id, filt_domaine_competence_id, filt_class_id, filt_session_id,
|
||||
filt_rattrapage, filt_semestre]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -3752,6 +3761,7 @@ def Create_work_evaluation_participant_note(diction):
|
|||
"domaine_competence_id": "$domaine_competence_id",
|
||||
"session_id": "$session_id",
|
||||
"responsable_id": "$responsable_id",
|
||||
"semestre": "$semestre",
|
||||
|
||||
"tab_diplome_ids": "$tab_diplome_ids",
|
||||
"rattrapage": "$rattrapage",
|
||||
|
|
@ -3847,7 +3857,7 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction):
|
|||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'session_id', 'semestre', 'diplome_id', 'tab_domaine_competence_ids',]
|
||||
field_list_obligatoire = ['token', 'session_id', 'diplome_id', 'semestre', ]
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
|
|
@ -3920,8 +3930,12 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction):
|
|||
work_collection_diction['class_id'] = str(is_session_valide_data['class_id'])
|
||||
work_collection_diction['session_id'] = str(is_session_valide_data['_id'])
|
||||
work_collection_diction['semestre'] = str(diction['semestre'])
|
||||
work_collection_diction['diplome_id'] = str(diction['diplome_id'])
|
||||
work_collection_diction['tab_domaine_competence_ids'] = str(diction['tab_domaine_competence_ids'])
|
||||
|
||||
if( "diplome_id" in diction.keys() and diction['diplome_id']):
|
||||
work_collection_diction['diplome_id'] = str(diction['diplome_id'])
|
||||
|
||||
if ("tab_domaine_competence_ids" in diction.keys() and diction['tab_domaine_competence_ids']):
|
||||
work_collection_diction['tab_domaine_competence_ids'] = str(diction['tab_domaine_competence_ids'])
|
||||
|
||||
if ("rattrapage" in diction.keys() and diction['rattrapage'] == "1"):
|
||||
work_collection_diction['rattrapage'] = '1'
|
||||
|
|
@ -3935,6 +3949,32 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction):
|
|||
|
||||
print(" ### code action = ", str(code_action))
|
||||
|
||||
print(" ### tab_domaine_competence_ids = ", str(tab_domaine_competence_ids))
|
||||
|
||||
"""
|
||||
Si on ne fourni pas de domaine de compétence, on va aller chercher tous les domaines de compétence
|
||||
associé à la promotion
|
||||
"""
|
||||
default_tab_domaine_competence_ids = []
|
||||
|
||||
|
||||
if ("tab_domaine_competence_ids" not in diction.keys() ):
|
||||
if ("list_unite_enseignement" in is_session_valide_data.keys() and is_session_valide_data[
|
||||
'list_unite_enseignement']):
|
||||
for session_ue_data in is_session_valide_data['list_unite_enseignement']:
|
||||
|
||||
if ("domaine_competence_id" in session_ue_data.keys() and session_ue_data[
|
||||
'domaine_competence_id'] not in default_tab_domaine_competence_ids):
|
||||
default_tab_domaine_competence_ids.append(session_ue_data['domaine_competence_id'])
|
||||
|
||||
print(" €€€ default_tab_domaine_competence_ids = ", default_tab_domaine_competence_ids)
|
||||
|
||||
|
||||
tab_domaine_competence_ids = default_tab_domaine_competence_ids
|
||||
|
||||
|
||||
|
||||
|
||||
for domaine_competence_id in tab_domaine_competence_ids:
|
||||
tab_inscrit_id = []
|
||||
for inscrit in MYSY_GV.dbname['inscription'].find({'valide': '1', 'status': '1',
|
||||
|
|
@ -4309,6 +4349,9 @@ def Calcul_Moyen_evaluation_participant_note_BC_UE(diction):
|
|||
local_node_moyenne_par_promo_diplome_bc_ue_semestre['locked'] = "0"
|
||||
local_node_moyenne_par_promo_diplome_bc_ue_semestre['calculation_date'] = str(datetime.now())
|
||||
|
||||
local_node_moyenne_par_promo_diplome_bc_ue_semestre['jury_note'] = str(moyenne_avant_coef)
|
||||
local_node_moyenne_par_promo_diplome_bc_ue_semestre['jury_observation'] = ""
|
||||
local_node_moyenne_par_promo_diplome_bc_ue_semestre['jury_validation'] = str(is_eu_validated)
|
||||
|
||||
|
||||
data_key = {}
|
||||
|
|
@ -4457,7 +4500,7 @@ def Get_List_Evaluation_by_ue_bc_diplome_session_semestre_With_Filter(diction):
|
|||
|
||||
|
||||
ue_id_code = ""
|
||||
if( "ue_id" in retval.keys() ):
|
||||
if( "ue_id" in retval.keys() and retval['ue_id']):
|
||||
ue_id_data = MYSY_GV.dbname['unite_enseignement'].find_one({'_id':ObjectId(str(retval['ue_id'])),
|
||||
'partner_owner_recid':my_partner['recid'],
|
||||
'valide':'1',
|
||||
|
|
@ -4469,8 +4512,8 @@ def Get_List_Evaluation_by_ue_bc_diplome_session_semestre_With_Filter(diction):
|
|||
user['ue_id_code'] = ue_id_code
|
||||
|
||||
class_id_external_code = ""
|
||||
if ("class_id" in retval.keys()):
|
||||
class_id_data = MYSY_GV.dbname['myclass'].find_one({'_id': ObjectId(str(retval['ue_id'])),
|
||||
if ("class_id" in retval.keys() and retval['class_id']):
|
||||
class_id_data = MYSY_GV.dbname['myclass'].find_one({'_id': ObjectId(str(retval['class_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'},
|
||||
|
|
@ -4483,7 +4526,7 @@ def Get_List_Evaluation_by_ue_bc_diplome_session_semestre_With_Filter(diction):
|
|||
inscription_id_nom = ""
|
||||
inscription_id_prenom = ""
|
||||
inscription_id_mail = ""
|
||||
if ("inscrit_id" in retval.keys()):
|
||||
if ("inscrit_id" in retval.keys() and retval['inscrit_id']):
|
||||
inscription_id_data = MYSY_GV.dbname['inscription'].find_one({'_id': ObjectId(str(retval['inscrit_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',},
|
||||
|
|
@ -4499,6 +4542,289 @@ def Get_List_Evaluation_by_ue_bc_diplome_session_semestre_With_Filter(diction):
|
|||
inscription_id_prenom = inscription_id_data['prenom']
|
||||
|
||||
|
||||
user['inscription_id_mail'] = inscription_id_mail
|
||||
user['inscription_id_nom'] = inscription_id_nom
|
||||
user['inscription_id_prenom'] = inscription_id_prenom
|
||||
|
||||
|
||||
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 des évaluations "
|
||||
|
||||
|
||||
"""
|
||||
Update work_calcul_moyenne_by_ue_bc_diplome_session_semestre
|
||||
"""
|
||||
def Update_work_calcul_moyenne_by_ue_bc_diplome_session_semestre(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'tab_ids', 'jury_observation', 'jury_note', 'jury_validation',
|
||||
'validation_note']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'tab_ids', ]
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans la liste des arguments ")
|
||||
return False, " 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
|
||||
|
||||
tab_ids = []
|
||||
tab_ids_ObjectId = []
|
||||
|
||||
if ("tab_ids" in diction.keys()):
|
||||
if diction['tab_ids']:
|
||||
tab_ids = diction['tab_ids']
|
||||
|
||||
tab_ids_splited = str(tab_ids).split(",")
|
||||
for work_tab_id in tab_ids_splited:
|
||||
if (work_tab_id):
|
||||
tab_ids_ObjectId.append(ObjectId(str(work_tab_id)))
|
||||
|
||||
update_data = {}
|
||||
update_data['update_date'] = str(datetime.now())
|
||||
update_data['update_by'] = str(my_partner['_id'])
|
||||
|
||||
if("jury_observation" in diction.keys()):
|
||||
update_data['jury_observation'] = str(diction['jury_observation'])
|
||||
|
||||
if ("jury_note" in diction.keys()):
|
||||
update_data['jury_note'] = str(diction['jury_note'])
|
||||
|
||||
if ("jury_validation" in diction.keys()):
|
||||
update_data['jury_validation'] = str(diction['jury_validation'])
|
||||
|
||||
if ("validation_note" in diction.keys()):
|
||||
update_data['validation_note'] = str(diction['validation_note'])
|
||||
|
||||
|
||||
MYSY_GV.dbname['work_calcul_moyenne_by_ue_bc_diplome_session_semestre'].update_many({'_id': {'$in': tab_ids_ObjectId},
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(my_partner['recid']),
|
||||
},
|
||||
{'$set': update_data}
|
||||
)
|
||||
|
||||
return True, " La mise à jour a été correctement faite"
|
||||
|
||||
|
||||
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 faire la mise à jour"
|
||||
|
||||
|
||||
"""
|
||||
Recuperation les notes detaillées suite au calcul par UE (UE)
|
||||
"""
|
||||
def Get_List_Detailled_Note_After_UE_Calculation_With_Filter(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token','class_external_code', 'tab_ue_id', 'tab_session_id', 'tab_inscrit_id',
|
||||
'jury_apprenant_agenda_id', 'tab_domaine_competence_id', 'tab_diplome_id', 'rattrapage',
|
||||
'semestre']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé ")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', ]
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans la liste des arguments ")
|
||||
return False, " 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
|
||||
|
||||
filt_session_id = {}
|
||||
if( "tab_session_id" in diction.keys() ):
|
||||
tab_session_id = str(diction['tab_session_id']).split(",")
|
||||
if(len(tab_session_id) > 0 ):
|
||||
filt_session_id = {'session_id':{'$in': tab_session_id }}
|
||||
|
||||
|
||||
filt_ue_id = {}
|
||||
if ("tab_ue_id" in diction.keys()):
|
||||
tab_ue_id = str(diction['tab_ue_id']).split(",")
|
||||
if (len(tab_ue_id) > 0):
|
||||
filt_ue_id = {'class_eu_id': {'$in': tab_ue_id}}
|
||||
|
||||
filt_tab_diplome_id = {}
|
||||
if ("tab_diplome_id" in diction.keys()):
|
||||
tab_diplome_id = str(diction['tab_diplome_id']).split(",")
|
||||
if (len(tab_diplome_id) > 0):
|
||||
filt_tab_diplome_id = {'tab_diplome_ids': {'$in': tab_diplome_id}}
|
||||
|
||||
|
||||
filt_tab_domaine_competence_id = {}
|
||||
if ("tab_domaine_competence_id" in diction.keys()):
|
||||
tab_domaine_competence_id = str(diction['tab_domaine_competence_id']).split(",")
|
||||
if (len(tab_domaine_competence_id) > 0):
|
||||
filt_tab_domaine_competence_id = {'domaine_competence_id': {'$in': tab_domaine_competence_id}}
|
||||
|
||||
filt_rattrapage = {'rattrapage': {"$ne":"1"} }
|
||||
if ("rattrapage" in diction.keys() and diction['rattrapage'] == "1"):
|
||||
filt_rattrapage = {'rattrapage': "1"}
|
||||
|
||||
|
||||
filt_inscrit_id = {}
|
||||
if ("tab_inscrit_id" in diction.keys()):
|
||||
tab_inscrit_id = str(diction['tab_inscrit_id']).split(",")
|
||||
if (len(tab_inscrit_id) > 0):
|
||||
filt_inscrit_id = {'inscription_id': {'$in': tab_inscrit_id}}
|
||||
|
||||
filt_semestre = {}
|
||||
if ("semestre" in diction.keys()):
|
||||
filt_semestre = {'semestre': str(diction['semestre'])}
|
||||
|
||||
"""
|
||||
Clés de mise à jour
|
||||
"""
|
||||
data_cle = {}
|
||||
data_cle['partner_owner_recid'] = str(my_partner['recid'])
|
||||
data_cle['valide'] = "1"
|
||||
data_cle['locked'] = "0"
|
||||
|
||||
query = {"$and": [filt_session_id, filt_ue_id, data_cle, filt_inscrit_id, filt_rattrapage, filt_tab_domaine_competence_id,
|
||||
filt_tab_diplome_id, filt_semestre]}
|
||||
|
||||
print(" ### Get_List_Detailled_Note_After_UE_Calculation_With_Filter query = ", query)
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 0
|
||||
|
||||
for retval in MYSY_GV.dbname['work_evaluation_participant_note'].find(query).sort([("ue_id", pymongo.DESCENDING),("inscription_id", pymongo.DESCENDING),
|
||||
("type_eval_id", pymongo.DESCENDING), ]):
|
||||
user = retval
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
class_eu_code = ""
|
||||
if( "class_eu_id" in retval.keys() and retval['class_eu_id']):
|
||||
ue_id_data = MYSY_GV.dbname['unite_enseignement'].find_one({'_id':ObjectId(str(retval['class_eu_id'])),
|
||||
'partner_owner_recid':my_partner['recid'],
|
||||
'valide':'1',
|
||||
'locked':'0'},
|
||||
{'code':1})
|
||||
if( ue_id_data and "code" in ue_id_data.keys() ):
|
||||
class_eu_code = ue_id_data['code']
|
||||
|
||||
user['class_eu_code'] = class_eu_code
|
||||
|
||||
domaine_competence_id_code = ""
|
||||
if ("domaine_competence_id" in retval.keys() and retval['domaine_competence_id']):
|
||||
domaine_competence_id_data = MYSY_GV.dbname['domaine_competence_pedagogique'].find_one({'_id': ObjectId(str(retval['domaine_competence_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'},
|
||||
{'code': 1})
|
||||
if (domaine_competence_id_data and "code" in domaine_competence_id_data.keys()):
|
||||
domaine_competence_id_code = domaine_competence_id_data['code']
|
||||
|
||||
user['domaine_competence_id_code'] = domaine_competence_id_code
|
||||
|
||||
tab_diplome_ids_code = ""
|
||||
if ("tab_diplome_ids" in retval.keys() and retval['tab_diplome_ids'][0]):
|
||||
tab_diplome_ids_code_data = MYSY_GV.dbname['diplome'].find_one(
|
||||
{'_id': ObjectId(str(retval['tab_diplome_ids'][0])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'},
|
||||
{'code': 1})
|
||||
if (tab_diplome_ids_code_data and "code" in tab_diplome_ids_code_data.keys()):
|
||||
tab_diplome_ids_code = tab_diplome_ids_code_data['code']
|
||||
|
||||
user['diplome_id_code'] = tab_diplome_ids_code
|
||||
|
||||
|
||||
|
||||
class_id_external_code = ""
|
||||
if ("class_id" in retval.keys() and retval['class_id']):
|
||||
class_id_data = MYSY_GV.dbname['myclass'].find_one({'_id': ObjectId(str(retval['class_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'locked': '0'},
|
||||
{'external_code': 1})
|
||||
if (class_id_data and "external_code" in class_id_data.keys()):
|
||||
class_id_external_code = class_id_data['external_code']
|
||||
|
||||
user['class_id_external_code'] = class_id_external_code
|
||||
|
||||
inscription_id_nom = ""
|
||||
inscription_id_prenom = ""
|
||||
inscription_id_mail = ""
|
||||
if ("inscription_id" in retval.keys()):
|
||||
inscription_id_data = MYSY_GV.dbname['inscription'].find_one({'_id': ObjectId(str(retval['inscription_id'])),
|
||||
'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',},
|
||||
{'email': 1, 'nom':1, 'prenom':1})
|
||||
|
||||
if (inscription_id_data and "email" in inscription_id_data.keys()):
|
||||
inscription_id_mail = inscription_id_data['email']
|
||||
|
||||
if (inscription_id_data and "nom" in inscription_id_data.keys()):
|
||||
inscription_id_nom = inscription_id_data['nom']
|
||||
|
||||
if (inscription_id_data and "prenom" in inscription_id_data.keys()):
|
||||
inscription_id_prenom = inscription_id_data['prenom']
|
||||
|
||||
|
||||
user['inscription_id_mail'] = inscription_id_mail
|
||||
user['inscription_id_nom'] = inscription_id_nom
|
||||
user['inscription_id_prenom'] = inscription_id_prenom
|
||||
|
|
@ -4513,4 +4839,5 @@ def Get_List_Evaluation_by_ue_bc_diplome_session_semestre_With_Filter(diction):
|
|||
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 évaluations "
|
||||
return False, " Impossible de récupérer la liste des détaillée des notes "
|
||||
|
||||
|
|
|
|||
|
|
@ -6999,7 +6999,7 @@ def Add_Update_Inscrit_Jury_Promo_Decision(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'jury_id', 'tab_inscriptions_ids', 'jury_observation', 'jury_note', 'jury_validation']
|
||||
field_list = ['token', 'jury_id', 'tab_inscriptions_ids', 'jury_observation', 'jury_note', 'jury_validation',]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -7140,7 +7140,7 @@ def Add_Update_Candidat_Jury_Admission_Decision(diction):
|
|||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
tab_ids = ""
|
||||
|
||||
tab_ids = []
|
||||
tab_ids_ObjectId = []
|
||||
|
||||
|
|
|
|||
26
main.py
26
main.py
|
|
@ -18180,6 +18180,32 @@ def Get_List_Evaluation_by_ue_bc_diplome_session_semestre_With_Filter():
|
|||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API de mettre à jour la table de notes calculées Bloc Compétence / UE / Diplome avec des valeurs comme :
|
||||
'jury_observation', 'jury_note', 'jury_validation', 'validation_note'
|
||||
"""
|
||||
@app.route('/myclass/api/Update_work_calcul_moyenne_by_ue_bc_diplome_session_semestre', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Update_work_calcul_moyenne_by_ue_bc_diplome_session_semestre():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary(request.form.to_dict())
|
||||
print(" ### Update_work_calcul_moyenne_by_ue_bc_diplome_session_semestre : payload = ",payload)
|
||||
localStatus, message= base_class_calcul_note.Update_work_calcul_moyenne_by_ue_bc_diplome_session_semestre(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
"""
|
||||
API pour recupérer la liste detaillé des notes après calcul des moyennes par UE
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_Detailled_Note_After_UE_Calculation_With_Filter', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_Detailled_Note_After_UE_Calculation_With_Filter():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary(request.form.to_dict())
|
||||
print(" ### Get_List_Detailled_Note_After_UE_Calculation_With_Filter : payload = ",payload)
|
||||
localStatus, message= base_class_calcul_note.Get_List_Detailled_Note_After_UE_Calculation_With_Filter(payload)
|
||||
return jsonify(status=localStatus, message=message )
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ def Add_Evaluation_Planification(diction):
|
|||
'class_id', 'class_eu_id', 'type_eval_id',
|
||||
'eval_date_heure_debut', 'eval_date_heure_fin', 'statut', 'adress', 'cp', 'ville',
|
||||
'pays', 'responsable_id', 'session_id', 'mode_animation', 'rattrapage',
|
||||
'tab_diplome_ids', 'domaine_competence_id']
|
||||
'tab_diplome_ids', 'domaine_competence_id', 'semestre']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -358,7 +358,7 @@ def Update_Evaluation_Planification(diction):
|
|||
'class_id', 'class_eu_id', 'type_eval_id',
|
||||
'eval_date_heure_debut', 'eval_date_heure_fin', 'statut', 'site_id', 'adress', 'cp', 'ville',
|
||||
'pays', 'responsable_id', 'session_id', 'mode_animation', 'rattrapage',
|
||||
'tab_diplome_ids', 'domaine_competence_id', ]
|
||||
'tab_diplome_ids', 'domaine_competence_id', 'semestre']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -543,7 +543,22 @@ def Update_Evaluation_Planification(diction):
|
|||
Aller recuperer les criteres de notation : max_note et type_note
|
||||
class_unite_enseignement_type_evaluation
|
||||
"""
|
||||
|
||||
|
||||
for local_diplome in tab_diplome_ids:
|
||||
"""print("QRYY check on class_unite_enseignement_type_evaluation = ", {'class_id': str(diction['class_id']),
|
||||
'type_evaluation_id': str(
|
||||
diction['type_eval_id']),
|
||||
'class_ue_id': str(
|
||||
diction['class_eu_id']),
|
||||
'partner_owner_recid':
|
||||
my_partner[
|
||||
'recid'],
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'diplome_id': local_diplome
|
||||
})"""
|
||||
|
||||
notation_critere_is_valide = MYSY_GV.dbname['class_unite_enseignement_type_evaluation'].count_documents(
|
||||
{'class_id': str(diction['class_id']),
|
||||
'type_evaluation_id': str(diction['type_eval_id']),
|
||||
|
|
|
|||
|
|
@ -839,7 +839,9 @@ def Get_List_Unite_Enseignement_Of_Given_Class(diction):
|
|||
|
||||
#print(" #### Get_List_Unite_Enseignement_Of_Given_Class qry = ", qry)
|
||||
|
||||
for New_retVal in MYSY_GV.dbname['myclass'].find(qry).sort([("_id", pymongo.DESCENDING), ]):
|
||||
for New_retVal in MYSY_GV.dbname['myclass'].find(qry, {'list_unite_enseignement.description':0,
|
||||
'list_unite_enseignement.methode_evaluation':0,
|
||||
'list_unite_enseignement.methode_pedagogique':0, }).sort([("_id", pymongo.DESCENDING), ]):
|
||||
if( "list_unite_enseignement" in New_retVal.keys() ):
|
||||
for local_val in New_retVal['list_unite_enseignement'] :
|
||||
|
||||
|
|
@ -855,6 +857,8 @@ def Get_List_Unite_Enseignement_Of_Given_Class(diction):
|
|||
user = local_val
|
||||
|
||||
|
||||
|
||||
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
|
|
@ -955,11 +959,21 @@ def Get_List_Unite_Enseignement_Of_Given_Class(diction):
|
|||
user['diplome_id'] = str(diplome_id)
|
||||
user['diplome_code'] = str(diplome_code)
|
||||
|
||||
if ("description" in user):
|
||||
del user["description"]
|
||||
|
||||
if ("methode_evaluation" in user):
|
||||
del user["methode_evaluation"]
|
||||
|
||||
if ("methode_pedagogique" in user):
|
||||
del user["methode_pedagogique"]
|
||||
|
||||
#print(" #### user = ", user)
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
#print(" #### RetObject = ", RetObject)
|
||||
|
||||
return True, RetObject
|
||||
|
||||
except Exception as e:
|
||||
|
|
@ -1154,6 +1168,15 @@ def Get_List_Unite_Enseignement_Of_Given_Class_From_Session_Id(diction):
|
|||
user['diplome_id'] = str(diplome_id)
|
||||
user['diplome_code'] = str(diplome_code)
|
||||
|
||||
if ("description" in user):
|
||||
del user["description"]
|
||||
|
||||
if ("methode_evaluation" in user):
|
||||
del user["methode_evaluation"]
|
||||
|
||||
if ("methode_pedagogique" in user):
|
||||
del user["methode_pedagogique"]
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue