02/08/2024 - 12h

master
cherif 2024-08-02 12:08:19 +02:00
parent d69fce6a88
commit aa98cff87d
4 changed files with 1625 additions and 12 deletions

View File

@ -1,12 +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="31/07/2024 - 17h30"> <list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="01/08/2024 - 17h30">
<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$/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$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_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$/email_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_mgt.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/unite_enseignement_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/unite_enseignement_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" />
@ -461,7 +460,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="ss" />
<MESSAGE value="21/06/24 - 22h30" /> <MESSAGE value="21/06/24 - 22h30" />
<MESSAGE value="22/06/24 - 17h30" /> <MESSAGE value="22/06/24 - 17h30" />
<MESSAGE value="qsds" /> <MESSAGE value="qsds" />
@ -486,6 +484,7 @@
<MESSAGE value="29/07/2024 - 21h" /> <MESSAGE value="29/07/2024 - 21h" />
<MESSAGE value="30/07/2024 - 12h" /> <MESSAGE value="30/07/2024 - 12h" />
<MESSAGE value="31/07/2024 - 17h30" /> <MESSAGE value="31/07/2024 - 17h30" />
<option name="LAST_COMMIT_MESSAGE" value="31/07/2024 - 17h30" /> <MESSAGE value="01/08/2024 - 17h30" />
<option name="LAST_COMMIT_MESSAGE" value="01/08/2024 - 17h30" />
</component> </component>
</project> </project>

File diff suppressed because it is too large Load Diff

View File

@ -874,6 +874,41 @@ def Get_Given_SessionFormation_From_Id(diction):
user['formateur_nom_prenom'] = formateur_nom_prenom user['formateur_nom_prenom'] = formateur_nom_prenom
"""
Regarder si cette inscription a des inscriptions (validées) d'entreprise
"""
tmp_count = MYSY_GV.dbname['inscription'].count_documents({'partner_owner_recid': str(my_partner['recid']),
'valide': '1',
'status': '1',
'session_id': str(diction['session_id']),
'client_rattachement_id': {'$exists': True,
'$ne': ""}})
user['nb_valide_inscription_entreprise'] = str(tmp_count)
"""
Regarder si cette inscriptiona des inscriptions (validées) d'individuelle
"""
tmp_count = MYSY_GV.dbname['inscription'].count_documents({'$or': [
{'partner_owner_recid': str(my_partner['recid']),
'valide': '1',
'status': '1',
'session_id': str(diction['session_id']),
'client_rattachement_id': {'$exists': False}}
,
{'partner_owner_recid': str(my_partner['recid']),
'valide': '1',
'status': '1',
'session_id': str(diction['session_id']),
'client_rattachement_id': ""}
]}
)
user['nb_valide_inscription_individuelle'] = str(tmp_count)
#print(" ### user = ", user) #print(" ### user = ", user)
RetObject.append(mycommon.JSONEncoder().encode(user)) RetObject.append(mycommon.JSONEncoder().encode(user))

View File

@ -63,7 +63,7 @@ def Add_Unite_Enseignement(diction):
Verification des input acceptés Verification des input acceptés
""" """
field_list = ['token', 'code', 'titre', 'description', 'objectif', 'prerequis', 'programme', 'methode_pedagogique', 'methode_evaluation', field_list = ['token', 'code', 'titre', 'description', 'objectif', 'prerequis', 'programme', 'methode_pedagogique', 'methode_evaluation',
'support', 'duration', 'duration_unite' ] 'support', 'duration', 'duration_unite', 'domain_id', 'bloc' ]
incom_keys = diction.keys() incom_keys = diction.keys()
for val in incom_keys: for val in incom_keys:
@ -175,7 +175,8 @@ def Update_Unite_Enseignement(diction):
""" """
field_list = ['token', '_id', 'code', 'titre', 'description', 'objectif', 'prerequis', 'programme', field_list = ['token', '_id', 'code', 'titre', 'description', 'objectif', 'prerequis', 'programme',
'methode_pedagogique', 'methode_evaluation', 'support', 'duration', 'duration_unite'] 'methode_pedagogique', 'methode_evaluation', 'support', 'duration', 'duration_unite',
'domain_id', 'bloc']
incom_keys = diction.keys() incom_keys = diction.keys()
for val in incom_keys: for val in incom_keys:
@ -342,10 +343,17 @@ def Get_List_Unite_Enseignement_no_filter(diction):
else: else:
user['duration_concat'] = str(New_retVal['duration']) + " ?" user['duration_concat'] = str(New_retVal['duration']) + " ?"
if( "domain_id" not in user.keys() ):
user['domain_id'] = ""
if ("bloc" not in user.keys()):
user['bloc'] = ""
RetObject.append(mycommon.JSONEncoder().encode(user)) RetObject.append(mycommon.JSONEncoder().encode(user))
#print(" #### RetObject = ", RetObject) print(" #### RetObject = ", RetObject)
return True, RetObject return True, RetObject
except Exception as e: except Exception as e:
@ -434,6 +442,11 @@ def Get_List_Unite_Enseignement_with_filter(diction):
else: else:
user['duration_concat'] = str(New_retVal['duration']) + " ?" user['duration_concat'] = str(New_retVal['duration']) + " ?"
if ("domain_id" not in user.keys()):
user['domain_id'] = ""
if ("bloc" not in user.keys()):
user['bloc'] = ""
RetObject.append(mycommon.JSONEncoder().encode(user)) RetObject.append(mycommon.JSONEncoder().encode(user))
@ -669,7 +682,7 @@ def Get_List_Unite_Enseignement_Of_Given_Class(diction):
'internal_url': str(diction['class_internal_url'])} 'internal_url': str(diction['class_internal_url'])}
print(" #### Get_List_Unite_Enseignement_Of_Given_Class qry = ", qry) #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).sort([("_id", pymongo.DESCENDING), ]):
if( "list_unite_enseignement" in New_retVal.keys() ): if( "list_unite_enseignement" in New_retVal.keys() ):
@ -773,7 +786,7 @@ def Get_Givent_Unite_Enseignement_Data_Of_Given_Class(diction):
'list_unite_enseignement._id':str(my_partner['ue_id'])} 'list_unite_enseignement._id':str(my_partner['ue_id'])}
print(" ### qry 0147 = ", qry) #print(" ### qry 0147 = ", 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).sort([("_id", pymongo.DESCENDING), ]):
if( "list_unite_enseignement" in New_retVal.keys() ): if( "list_unite_enseignement" in New_retVal.keys() ):