20/05/2026 - 20h30

Signed-off-by: Cherif <cbalde@mysy-training.com>
master_Elyos_FI
Cherif 2026-05-20 19:39:35 +02:00
parent c88ab333c5
commit a204a601b1
8 changed files with 2179 additions and 22 deletions

View File

@ -4,13 +4,15 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="19/05/2026 - 20h30">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="20/05/2026 - 12h30">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Diplome_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Diplome_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.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$/domaine_competence_pedagogique.py" beforeDir="false" afterPath="$PROJECT_DIR$/domaine_competence_pedagogique.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$/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$/bloc_competence.py" beforeDir="false" afterPath="$PROJECT_DIR$/bloc_competence.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$/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" />
@ -454,7 +456,7 @@
<option name="project" value="LOCAL" />
<updated>1747251650255</updated>
</task>
<option name="localTasksCounter" value="584" />
<option name="localTasksCounter" value="585" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -496,7 +498,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="10/04/2026 - 18h" />
<MESSAGE value="17/04/2026 -19h" />
<MESSAGE value="18/04/2026 -19h" />
<MESSAGE value="19/04/2026 - 20h30" />
@ -521,6 +522,7 @@
<MESSAGE value="15/05/2026 - 17h30" />
<MESSAGE value="16/05/2026 - 13h30" />
<MESSAGE value="19/05/2026 - 20h30" />
<option name="LAST_COMMIT_MESSAGE" value="19/05/2026 - 20h30" />
<MESSAGE value="20/05/2026 - 12h30" />
<option name="LAST_COMMIT_MESSAGE" value="20/05/2026 - 12h30" />
</component>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -18169,6 +18169,7 @@ def Add_Update_UE_To_Session(diction):
Verifier que l'UE est bien paramettrée sur la formation
"""
is_ue_in_class_count = MYSY_GV.dbname['myclass'].count_documents({'list_unite_enseignement._id':str(diction['ue_id']),
'list_unite_enseignement.diplome_id': str(local_diplome_id),
'_id': ObjectId(str(session_data['class_id'])),
'partner_owner_recid': my_partner[
'recid'],
@ -18181,6 +18182,29 @@ def Add_Update_UE_To_Session(diction):
str(inspect.stack()[0][3]) + " La configuration de l'UE sur la formation est invalide ")
return False, " La configuration de l'UE sur la formation est invalide "
local_couleur = "#3573CB"
for is_ue_in_class_data in MYSY_GV.dbname['myclass'].find(
{'list_unite_enseignement._id': str(diction['ue_id']),
'list_unite_enseignement.diplome_id': str(local_diplome_id),
'_id': ObjectId(str(session_data['class_id'])),
'partner_owner_recid': my_partner[
'recid'],
'valide': '1',
'locked': '0',
}, {'list_unite_enseignement':1}):
if( "list_unite_enseignement" in is_ue_in_class_data.keys() ):
for local_data in is_ue_in_class_data['list_unite_enseignement']:
if( local_data['diplome_id'] == str(local_diplome_id) and local_data['_id'] == str(diction['ue_id']) ):
if( "domaine_competence_id" in local_data.keys() and local_data['domaine_competence_id']):
domaine_competence_data = MYSY_GV.dbname['domaine_competence_pedagogique'].find_one({'_id':ObjectId(str(local_data['domaine_competence_id'])),
'partner_owner_recid':str(my_partner['recid'])}, {'couleur':1})
if( domaine_competence_data and 'couleur' in domaine_competence_data.keys() ):
local_couleur = domaine_competence_data['couleur']
#local_couleur = is_ue_in_class_data['list_unite_enseignement']['couleur']
"""
@ -18219,6 +18243,7 @@ def Add_Update_UE_To_Session(diction):
{
'list_unite_enseignement.$[xxx].diplome_id': local_diplome_id,
'list_unite_enseignement.$[xxx].formateur_id': local_formateur_id,
'list_unite_enseignement.$[xxx].couleur': local_couleur,
'list_unite_enseignement.$[xxx].date_update': str(now),
'list_unite_enseignement.$[xxx].update_by': str(
my_partner['_id']),
@ -18260,6 +18285,7 @@ def Add_Update_UE_To_Session(diction):
new_data['locked'] = "0"
new_data['formateur_id'] = local_formateur_id
new_data['diplome_id'] = local_diplome_id
new_data['couleur'] = local_couleur
new_data['_id'] = str(diction['ue_id'])
insert = MYSY_GV.dbname['session_formation'].update_one({'_id': ObjectId(str(diction['session_id'])),

View File

@ -1993,7 +1993,8 @@ def Get_Session_Sequence_List(diction):
Important : ca permet de gerer les eventuelle suppression d'UE dans d'une session
"""
is_valide_UE_in_Session_count = MYSY_GV.dbname['session_formation'].count_documents({'list_unite_enseignement._id':str(user['ue_id']),
'_id':ObjectId(str(user['ue_id']))})
'_id':ObjectId(str(diction['session_id']))})
if(is_valide_UE_in_Session_count > 0 ):
@ -2006,7 +2007,7 @@ def Get_Session_Sequence_List(diction):
if (eu_id_data and "code" in eu_id_data.keys()):
ue_code = eu_id_data['code']
if (eu_id_data and "eu_id" in eu_id_data.keys()):
if (eu_id_data and "_id" in eu_id_data.keys()):
eu_id = str(eu_id_data['_id'])
else:

View File

@ -402,7 +402,8 @@ def Get_Given_bloc_competence(diction):
for domaine_compet in New_retVal['tab_domaine_competence']:
domaine_compet_data = MYSY_GV.dbname['domaine_competence_pedagogique'].find_one(
{'_id': ObjectId(str(domaine_compet['_id'])), 'valide': '1'},
{'_id': 1, 'code': 1, 'description': 1, })
{'_id': 1, 'code': 1, 'description': 1, 'couleur':1 , })
if ("rang" in domaine_compet.keys()):
domaine_compet_data['rang'] = str(domaine_compet['rang'])
@ -414,15 +415,20 @@ def Get_Given_bloc_competence(diction):
else:
domaine_compet_data['obligatoire'] = "0"
if ("couleur" in domaine_compet_data.keys()):
domaine_compet_data['couleur'] = str(domaine_compet_data['couleur'])
else:
domaine_compet_data['couleur'] = "#3573CB"
tab_domaine_competence_with_code.append(domaine_compet_data)
ss = sorted(tab_domaine_competence_with_code, key=itemgetter('rang'))
user['tab_domaine_competence_with_code'] = tab_domaine_competence_with_code
tab_ue_competence_with_code = []
cpt_local_tab_ue_competence = 0
if ("tab_ue" in New_retVal.keys()):
@ -462,6 +468,11 @@ def Get_Given_bloc_competence(diction):
local_node['creation_date'] = str(ue_competence['creation_date'])
if ("couleur" in ue_competence.keys()):
local_node['couleur'] = str(ue_competence['couleur'])
else:
local_node['couleur'] = "#3573CB"
#---
if ("coefficient" in ue_competence.keys()):
local_node['coefficient'] = str(ue_competence['coefficient'])
@ -488,8 +499,6 @@ def Get_Given_bloc_competence(diction):
else:
local_node['credit'] = ""
local_diplome_id = ""
local_diplome_code = ""
if( "diplome_id" in ue_competence.keys() and ue_competence['diplome_id']):
@ -520,6 +529,8 @@ def Get_Given_bloc_competence(diction):
{'_id': ObjectId(str(ue_competence['ue_id'])),
'partner_owner_recid': str(my_partner['recid'])})
local_node = {}
local_node['id'] = str(cpt_local_tab_ue_competence)
cpt_local_tab_ue_competence = cpt_local_tab_ue_competence + 1
@ -529,6 +540,12 @@ def Get_Given_bloc_competence(diction):
local_node['ue_code'] = str(local_ue_data['code'])
local_node['ue_titre'] = str(local_ue_data['titre'])
if ("couleur" in local_domaine_competence_data.keys()):
local_node['couleur'] = str(local_domaine_competence_data['couleur'])
else:
local_node['couleur'] = "#3573CB"
local_node['competence_id'] = ""
local_node['competence_code'] = ""
local_node['competence_description'] = ""
@ -537,6 +554,11 @@ def Get_Given_bloc_competence(diction):
local_node['domaine_competence_code'] = str(local_domaine_competence_data['code'])
local_node['domaine_competence_description'] = str(local_domaine_competence_data['description'])
if( "couleur" in local_domaine_competence_data.keys() ):
local_node['domaine_competence_couleur'] = str(local_domaine_competence_data['couleur'])
else:
local_node['domaine_competence_couleur'] = "#3573CB"
local_node['type_association'] = str(ue_competence['type_association'])
local_node['creation_date'] = str(ue_competence['creation_date'])
@ -594,7 +616,7 @@ def Get_Given_bloc_competence(diction):
user['id'] = str(val_tmp)
val_tmp = val_tmp + 1
#print("user = ", user)
RetObject.append(mycommon.JSONEncoder().encode(user))
@ -1177,6 +1199,18 @@ def Add_Update_tab_UE_And_Competence_To_Bloc_Competence(diction):
return False, " L'identifiant du domaine de compétence pédagogique " + str(
diction['domaine_competence_id']) + " est invalide "
domaine_competence_pedagogique_data = MYSY_GV.dbname['domaine_competence_pedagogique'].find_one(
{'_id': ObjectId(str(diction['domaine_competence_id'])),
'valide': '1',
'locked': '0',
'partner_owner_recid': str(
my_partner['recid'])}, {'couleur':1})
bc_couleur = "#3573CB"
if( domaine_competence_pedagogique_data and 'couleur' in domaine_competence_pedagogique_data.keys() ):
bc_couleur = domaine_competence_pedagogique_data['couleur']
tab_ue = []
tab_ue.append(str(diction['ue_id']))
@ -1223,6 +1257,7 @@ def Add_Update_tab_UE_And_Competence_To_Bloc_Competence(diction):
new_data['type_association'] = str(diction['type_association'])
new_data['competence_id'] = ""
new_data['domaine_competence_id'] = str(diction['domaine_competence_id'])
new_data['couleur'] = str(bc_couleur)
if( "semestre" in diction.keys() ):
new_data['semestre'] = diction['semestre']
@ -1408,7 +1443,7 @@ def Add_Update_tab_Domaine_Competence_To_Bloc_Competence(diction):
"""
Verification des input acceptés
"""
field_list = ['token', 'bloc_competence_id', 'domaine_competence_id', 'rang', ]
field_list = ['token', 'bloc_competence_id', 'domaine_competence_id', 'rang', 'couleur']
incom_keys = diction.keys()
for val in incom_keys:
@ -1480,6 +1515,9 @@ def Add_Update_tab_Domaine_Competence_To_Bloc_Competence(diction):
3]) + " L'identifiant du bloc de compétence "+str(diction['bloc_competence_id'])+" est invalide ")
return False, " L'identifiant du bloc de compétence "+str(diction['bloc_competence_id'])+" est invalide "
local_couleur = "#3573CB"
if ("couleur" in diction.keys()):
diction['couleur'] = diction['couleur']
tab_domaine_competence = []
tab_domaine_competence.append(str(diction['domaine_competence_id']))
@ -1507,7 +1545,7 @@ def Add_Update_tab_Domaine_Competence_To_Bloc_Competence(diction):
{'$set':
{
'tab_domaine_competence.$[xxx].rang': str( diction['rang']),
'tab_domaine_competence.$[xxx].couleur': str(local_couleur),
'tab_domaine_competence.$[xxx].update_date': str( datetime.now()),
'tab_domaine_competence.$[xxx].update_by': str(my_partner['_id']),
}
@ -1528,6 +1566,9 @@ def Add_Update_tab_Domaine_Competence_To_Bloc_Competence(diction):
new_data['creation_by'] = str(my_partner['_id'])
new_data['creation_date'] = str(datetime.now())
new_data['locked'] = "0"
new_data['couleur'] = str(local_couleur)

View File

@ -8754,8 +8754,6 @@ def Update_Class_UE_From_Ref_pedago(diction):
return False, " L'identifiant de la formation est invalide "
ref_pedago_data = MYSY_GV.dbname['bloc_competence'].find_one(
{'_id': ObjectId(str(diction['ref_pedo_id'])),
'partner_owner_recid': str(my_partner['recid'])})
@ -8825,6 +8823,11 @@ def Update_Class_UE_From_Ref_pedago(diction):
else:
new_data['diplome_id'] = ""
if ("couleur" in local_ue.keys()):
new_data['couleur'] = str(local_ue['couleur'])
else:
new_data['couleur'] = "#3573CB"
new_data['_id'] = str(local_ue['ue_id'])

View File

@ -11299,6 +11299,9 @@ def Get_List_Unite_Enseignement_Of_Given_Session_Id():
"""
API permet de recupérer les données d'une UE dans une formation données
c'est a dire les detail : credit, is_noted, etc

View File

@ -1267,7 +1267,6 @@ def Get_List_Unite_Enseignement_Of_Given_Session_Id(diction):
"""
Cette fonction permet de recupérer les données d'une UE dans une formation données
c'est a dire les detail : credit, is_noted, etc