parent
6fd0e1ba69
commit
f2692f1da6
|
|
@ -4,14 +4,12 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="08/03/26 - 20h">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="10/03/26 - 20h">
|
||||
<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$/Session_Formation_Sequence.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation_Sequence.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ent_student_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/ent_student_common.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/note_evaluation_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/note_evaluation_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -455,7 +453,7 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1747251650255</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="547" />
|
||||
<option name="localTasksCounter" value="548" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
|
@ -497,7 +495,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="02/01/26 - 13h" />
|
||||
<MESSAGE value="02/01/26 - 21h" />
|
||||
<MESSAGE value="04/01/26 - 21h30" />
|
||||
<MESSAGE value="09/01/26 - 20h30" />
|
||||
|
|
@ -522,6 +519,7 @@
|
|||
<MESSAGE value="01/03/26 - 13h30" />
|
||||
<MESSAGE value="07/03/26 - 16h" />
|
||||
<MESSAGE value="08/03/26 - 20h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="08/03/26 - 20h" />
|
||||
<MESSAGE value="10/03/26 - 20h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="10/03/26 - 20h" />
|
||||
</component>
|
||||
</project>
|
||||
7343
Log/log_file.log
7343
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
|
@ -1824,6 +1824,30 @@ def Get_Session_Sequence_List(diction):
|
|||
user['grp_apprenant_color'] = grp_apprenant_color
|
||||
user['grp_apprenant_code'] = grp_apprenant_code
|
||||
|
||||
liste_groupe_code = ""
|
||||
"""
|
||||
Recuperer la couleur du groupe
|
||||
"""
|
||||
if ("tab_grp_apprenant_ids" in user.keys() and user['tab_grp_apprenant_ids']):
|
||||
for local_grp_apprenant in user['tab_grp_apprenant_ids'] :
|
||||
groupe_data = MYSY_GV.dbname['groupe_inscription'].find_one(
|
||||
{'_id': ObjectId(str(local_grp_apprenant['_id'])),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'partner_owner_recid': str(my_partner['recid'])},
|
||||
{'code': 1, 'color': 1})
|
||||
|
||||
if (groupe_data and "color" in groupe_data.keys() and groupe_data['color']):
|
||||
grp_apprenant_color = groupe_data['color']
|
||||
|
||||
if (groupe_data and "code" in groupe_data.keys() and groupe_data['code']):
|
||||
liste_groupe_code = str(groupe_data['code'])+", "+str(liste_groupe_code)
|
||||
grp_apprenant_code = groupe_data['code']
|
||||
|
||||
user['grp_apprenant_color'] = grp_apprenant_color
|
||||
user['grp_apprenant_code'] = grp_apprenant_code
|
||||
user['liste_groupe_code'] = liste_groupe_code
|
||||
|
||||
if ("mode_animation" not in user.keys()):
|
||||
user['mode_animation'] = "0"
|
||||
|
||||
|
|
@ -4534,7 +4558,7 @@ def Get_Session_Sequence_List_With_Filter(diction):
|
|||
|
||||
filt_grp_apprenant_id = {}
|
||||
if( "grp_apprenant_id" in diction.keys() and diction['grp_apprenant_id']):
|
||||
filt_grp_apprenant_id = {'tab_grp_apprenant_ids._id': str(diction['grp_apprenant_id'])}
|
||||
filt_grp_apprenant_id = {'tab_grp_apprenant_ids._id': ObjectId(str(diction['grp_apprenant_id']))}
|
||||
|
||||
filt_unite_enseignement_planif_id = {}
|
||||
if ("unite_enseignement_planif_id" in diction.keys() and diction['unite_enseignement_planif_id']):
|
||||
|
|
@ -4545,6 +4569,7 @@ def Get_Session_Sequence_List_With_Filter(diction):
|
|||
filt_grp_apprenant_id, filt_unite_enseignement_planif_id
|
||||
]}
|
||||
|
||||
#print(" ## QRY local_myquery = ", local_myquery)
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 0
|
||||
|
|
@ -4588,6 +4613,30 @@ def Get_Session_Sequence_List_With_Filter(diction):
|
|||
user['grp_apprenant_color'] = grp_apprenant_color
|
||||
user['grp_apprenant_code'] = grp_apprenant_code
|
||||
|
||||
liste_groupe_code = ""
|
||||
"""
|
||||
Recuperer la couleur du groupe
|
||||
"""
|
||||
if ("tab_grp_apprenant_ids" in user.keys() and user['tab_grp_apprenant_ids']):
|
||||
for local_grp_apprenant in user['tab_grp_apprenant_ids']:
|
||||
groupe_data = MYSY_GV.dbname['groupe_inscription'].find_one(
|
||||
{'_id': ObjectId(str(local_grp_apprenant['_id'])),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'partner_owner_recid': str(my_partner['recid'])},
|
||||
{'code': 1, 'color': 1})
|
||||
|
||||
if (groupe_data and "color" in groupe_data.keys() and groupe_data['color']):
|
||||
grp_apprenant_color = groupe_data['color']
|
||||
|
||||
if (groupe_data and "code" in groupe_data.keys() and groupe_data['code']):
|
||||
liste_groupe_code = str(groupe_data['code']) + ", " + str(liste_groupe_code)
|
||||
grp_apprenant_code = groupe_data['code']
|
||||
|
||||
user['grp_apprenant_color'] = grp_apprenant_color
|
||||
user['grp_apprenant_code'] = grp_apprenant_code
|
||||
user['liste_groupe_code'] = liste_groupe_code
|
||||
|
||||
if ("mode_animation" not in user.keys()):
|
||||
user['mode_animation'] = "0"
|
||||
|
||||
|
|
|
|||
|
|
@ -569,6 +569,10 @@ def get_Ent_Student_Given_Class_From_Class_Id(diction):
|
|||
|
||||
"""
|
||||
Recuperer la liste des sequence d'une formation
|
||||
A cela on va associer le planing personnel de l'etudiant pour recuperer par exemple :
|
||||
- ses evaluation
|
||||
- ses convocations
|
||||
Ceci si et seulement si l'inscription_id est fournie
|
||||
"""
|
||||
def Get_Ent_Student_Session_Sequence_List(diction):
|
||||
try:
|
||||
|
|
@ -577,7 +581,7 @@ def Get_Ent_Student_Session_Sequence_List(diction):
|
|||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'session_id', 'apprenant_id']
|
||||
field_list = ['token', 'session_id', 'apprenant_id', 'inscription_id']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
|
@ -634,6 +638,19 @@ def Get_Ent_Student_Session_Sequence_List(diction):
|
|||
'valide': '1',
|
||||
'locked': '0'})
|
||||
|
||||
if ("inscription_id" in diction.keys() and diction['inscription_id'] and
|
||||
"session_id" in diction.keys() and diction['session_id']):
|
||||
is_valide_inscription_count = MYSY_GV.dbname['inscription'].count_documents({'session_id':str(diction['session_id']),
|
||||
'_id':ObjectId(str(diction['inscription_id'])),
|
||||
'valide':'1'})
|
||||
|
||||
if( is_valide_inscription_count != 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 = []
|
||||
val_tmp = 0
|
||||
|
|
@ -684,9 +701,66 @@ def Get_Ent_Student_Session_Sequence_List(diction):
|
|||
user['unite_enseignement_planif_id'] = ""
|
||||
|
||||
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
if ("inscription_id" in diction.keys() and diction['inscription_id'] and
|
||||
"session_id" in diction.keys() and diction['session_id']):
|
||||
inscription_data = MYSY_GV.dbname['inscription'].find_one({'session_id':str(diction['session_id']),
|
||||
'_id':ObjectId(str(diction['inscription_id'])),
|
||||
'valide':'1'})
|
||||
|
||||
for New_retVal in MYSY_GV.dbname['agenda'].find({'partner_owner_recid': str(apprenant_data['partner_owner_recid']),
|
||||
'valide': '1', 'locked': '0', 'related_collection':'inscription',
|
||||
'related_collection_recid':diction['inscription_id']}):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
nb_sequence = nb_sequence + 1
|
||||
|
||||
if ("event_start" not in New_retVal.keys()):
|
||||
user['sequence_start'] = ""
|
||||
else:
|
||||
user['sequence_start'] = New_retVal['event_start']
|
||||
|
||||
if ("event_end" not in New_retVal.keys()):
|
||||
user['sequence_end'] = ""
|
||||
else:
|
||||
user['sequence_end'] = New_retVal['event_end']
|
||||
|
||||
if ("event_title" not in New_retVal.keys()):
|
||||
user['sequence_title'] = ""
|
||||
else:
|
||||
user['sequence_title'] = New_retVal['event_title']
|
||||
|
||||
if ("event_type" not in New_retVal.keys()):
|
||||
user['type'] = ""
|
||||
else:
|
||||
user['type'] = New_retVal['event_type']
|
||||
|
||||
if ("color" not in New_retVal.keys()):
|
||||
user['color'] = ""
|
||||
else:
|
||||
user['color'] = New_retVal['color']
|
||||
|
||||
if ("color" not in New_retVal.keys()):
|
||||
user['grp_apprenant_color'] = ""
|
||||
else:
|
||||
user['grp_apprenant_color'] = New_retVal['color']
|
||||
|
||||
|
||||
if ("mode_animation" not in New_retVal.keys()):
|
||||
user['mode_animation'] = "0"
|
||||
|
||||
if ("ue_id" not in New_retVal.keys()):
|
||||
user['ue_id'] = ""
|
||||
|
||||
if ("unite_enseignement_planif_id" not in New_retVal.keys()):
|
||||
user['unite_enseignement_planif_id'] = ""
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
return True, RetObject
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -303,6 +303,8 @@ Mettre à jour une évaluation planifiée
|
|||
on va recuper et stocker 2 info :
|
||||
- le max de la note
|
||||
- le type notation (numerique ou alpha numerique)
|
||||
|
||||
En suite il faire les update dans les agenda pour les inscrits
|
||||
"""
|
||||
def Update_Evaluation_Planification(diction):
|
||||
try:
|
||||
|
|
@ -541,6 +543,28 @@ def Update_Evaluation_Planification(diction):
|
|||
" Impossible de mettre à jour l'évaluation (2) ")
|
||||
return False, " Impossible de mettre à jour l'évaluation (2) "
|
||||
|
||||
|
||||
"""
|
||||
Update agenda pour les inscrit
|
||||
"""
|
||||
query_update_agenda_key = {'partner_owner_recid': str(my_partner['recid']),
|
||||
'related_collection': 'inscription',
|
||||
'session_id': diction['session_id'],
|
||||
'note_evaluation':str(local_evaluation_id)
|
||||
}
|
||||
|
||||
agenda_new_data = {}
|
||||
agenda_new_data['event_title'] = "Eval : " + str(result['code'])+" - "+str(result['titre'])
|
||||
agenda_new_data['event_start'] = str(result['eval_date_heure_debut'])
|
||||
agenda_new_data['event_end'] = str(result['eval_date_heure_fin'])
|
||||
agenda_new_data['mode_animation'] = str(result['mode_animation'])
|
||||
agenda_new_data['comment'] = "Eval : " + str(result['code']) + " - " + str(result['titre'])
|
||||
|
||||
agenda_new_data['update_date'] = str(datetime.now())
|
||||
agenda_new_data['update_by'] = str(my_partner['_id'])
|
||||
|
||||
MYSY_GV.dbname['agenda'].update_many(query_update_agenda_key, {'$set':agenda_new_data})
|
||||
|
||||
"""
|
||||
# Ajout de l'evenement dans l'historique
|
||||
"""
|
||||
|
|
@ -1076,7 +1100,8 @@ def Get_Given_Evaluation_Planification(diction):
|
|||
Supprimer une evaluation planifiée
|
||||
|
||||
Regle :
|
||||
Un évaluation n'est supprimable que s'il n'y pas d'incrit dans la collection "note_evaluation_participant"
|
||||
- Un évaluation n'est supprimable que s'il n'y pas d'incrit dans la collection "note_evaluation_participant"
|
||||
- supprimer les entrées agenda associées
|
||||
"""
|
||||
def Delete_Evaluation_Planification(diction):
|
||||
try:
|
||||
|
|
@ -1164,6 +1189,13 @@ def Delete_Evaluation_Planification(diction):
|
|||
'locked': '0'
|
||||
} )
|
||||
|
||||
# Suppression coté agenda
|
||||
query_delete_agenda = {'partner_owner_recid': str(my_partner['recid']),
|
||||
'related_collection': 'inscription',
|
||||
"note_evaluation": str(diction['evaluation_id']),
|
||||
}
|
||||
MYSY_GV.dbname['agenda'].delete_many(query_delete_agenda)
|
||||
|
||||
"""
|
||||
# Ajout de l'evenement dans l'historique
|
||||
"""
|
||||
|
|
@ -1192,7 +1224,9 @@ def Delete_Evaluation_Planification(diction):
|
|||
return False, " Impossible de supprimer l'évaluation "
|
||||
|
||||
"""
|
||||
Inscrire des participants ou groupe de participants a un évaluation
|
||||
Inscrire des participants ou groupe de participants a un évaluation.
|
||||
13/03/2026 - Il faudra rajouter cette évaluation dans l'agenda
|
||||
de l'apprenant couleur : à definir
|
||||
"""
|
||||
|
||||
def Record_Participant_To_Evaluation(diction):
|
||||
|
|
@ -1249,6 +1283,12 @@ def Record_Participant_To_Evaluation(diction):
|
|||
str(inspect.stack()[0][3]) + " L'identifiant de l'évaluation n'est pas valide ")
|
||||
return False, " L'identifiant de l'évaluation n'est pas valide "
|
||||
|
||||
evaluation_data = MYSY_GV.dbname['note_evaluation'].find_one(
|
||||
{"_id": ObjectId(str(diction['evaluation_id'])),
|
||||
'valide': '1',
|
||||
'locked': '0',
|
||||
'partner_owner_recid': str(my_partner['recid'])})
|
||||
|
||||
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"
|
||||
|
|
@ -1311,11 +1351,53 @@ def Record_Participant_To_Evaluation(diction):
|
|||
upsert=True,
|
||||
)
|
||||
|
||||
#print(" ## ret_val = ", ret_val)
|
||||
|
||||
if (ret_val is None):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " WARNING : Impossible d'inscrire la participant : " + str(inscription_id))
|
||||
is_warning = "1"
|
||||
warning_msg = warning_msg + "\n Impossible d'inscrire la participant " + str(inscription_id)
|
||||
|
||||
else:
|
||||
my_even_data = {}
|
||||
my_even_data['related_collection'] = "inscription"
|
||||
my_even_data['related_collection_recid'] =str(inscription_id)
|
||||
my_even_data['event_title'] = "Eval : " + str(evaluation_data['code'])+" - "+str(evaluation_data['titre'])
|
||||
my_even_data['event_start'] = str(evaluation_data['eval_date_heure_debut'])
|
||||
my_even_data['event_end'] = str(evaluation_data['eval_date_heure_fin'])
|
||||
my_even_data['ue_id'] = str(evaluation_data['class_eu_id'])
|
||||
my_even_data['session_id'] = str(evaluation_data['session_id'])
|
||||
my_even_data['note_evaluation'] = str(evaluation_data['_id'])
|
||||
my_even_data['comment'] = "Eval : " + str(evaluation_data['code'])+" - "+str(evaluation_data['titre'])
|
||||
|
||||
my_even_data['mode_animation'] = str(evaluation_data['mode_animation'])
|
||||
my_even_data['event_type'] = "eval"
|
||||
my_even_data['color'] = "#eb911e"
|
||||
|
||||
my_even_data['valide'] = "1"
|
||||
my_even_data['locked'] = "0"
|
||||
my_even_data['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
|
||||
my_even_data['update_date'] = str(datetime.now())
|
||||
my_even_data['update_by'] = str(my_partner['_id'])
|
||||
|
||||
my_even_key = {}
|
||||
my_even_key['related_collection'] = "inscription"
|
||||
my_even_key['related_collection_recid'] = str(inscription_id)
|
||||
my_even_key['session_id'] = str(evaluation_data['session_id'])
|
||||
my_even_key['note_evaluation'] = str(evaluation_data['_id'])
|
||||
my_even_key['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
#print(" ## my_even_data = ", my_even_data)
|
||||
update_agenda = MYSY_GV.dbname['agenda'].find_one_and_update(
|
||||
my_even_key,
|
||||
{"$set": my_even_data},
|
||||
return_document=ReturnDocument.AFTER,
|
||||
upsert=True,
|
||||
)
|
||||
|
||||
|
||||
#warning_msg = ""
|
||||
#is_warning = ""
|
||||
for group_inscription_id in tab_group_inscription_id:
|
||||
|
|
@ -1417,6 +1499,8 @@ def Delete_Participant_From_Evaluation(diction):
|
|||
|
||||
tab_id_to_delete = []
|
||||
|
||||
tab_inscition_id_for_agenda = []
|
||||
|
||||
tab_inscription_id = str(diction['tab_inscription_id']).split(",")
|
||||
for inscription_id in tab_inscription_id:
|
||||
if( inscription_id ):
|
||||
|
|
@ -1433,6 +1517,7 @@ def Delete_Participant_From_Evaluation(diction):
|
|||
return False, " L'identifiant de l'inscription " + str(inscription_id) + " est invalide "
|
||||
|
||||
tab_id_to_delete.append(ObjectId(str(inscription_id)))
|
||||
tab_inscition_id_for_agenda.append(str(inscription_id))
|
||||
|
||||
|
||||
warning_msg = ""
|
||||
|
|
@ -1444,11 +1529,20 @@ def Delete_Participant_From_Evaluation(diction):
|
|||
"_id": {"$in": tab_id_to_delete},
|
||||
}
|
||||
|
||||
print(" ### qry_delete_inscription = ", qry_delete_inscription )
|
||||
#print(" ### qry_delete_inscription = ", qry_delete_inscription )
|
||||
|
||||
MYSY_GV.dbname['note_evaluation_participant'].delete_many(qry_delete_inscription)
|
||||
|
||||
|
||||
"""
|
||||
Après suppression coté agenda
|
||||
"""
|
||||
query_delete_agenda = {'partner_owner_recid': str(my_partner['recid']),
|
||||
'related_collection':'inscription',
|
||||
'note_evaluation':str(diction['evaluation_id']),
|
||||
"related_collection_recid": {"$in": tab_inscition_id_for_agenda},
|
||||
}
|
||||
MYSY_GV.dbname['agenda'].delete_many(query_delete_agenda)
|
||||
|
||||
return True, " La suppression a été correctement faite"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue