12/01/24 - 16h30
parent
d2b69a2fab
commit
82b09cb5cf
|
@ -1,13 +1,11 @@
|
|||
<?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="09/01/24 - 19h30">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="11/01/24 - 21h30">
|
||||
<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$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ressources_materiels.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_materiels.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Session_Formation_Sequence.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation_Sequence.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -77,13 +75,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00144" summary="11/11/2023 - 23h">
|
||||
<created>1699740510545</created>
|
||||
<option name="number" value="00144" />
|
||||
<option name="presentableId" value="LOCAL-00144" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1699740510546</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00145" summary="13/11/2023 - 12h30">
|
||||
<created>1699876222238</created>
|
||||
<option name="number" value="00145" />
|
||||
|
@ -420,7 +411,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1704825095911</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="193" />
|
||||
<task id="LOCAL-00193" summary="11/01/24 - 21h30">
|
||||
<created>1705004951917</created>
|
||||
<option name="number" value="00193" />
|
||||
<option name="presentableId" value="LOCAL-00193" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1705004951917</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="194" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -435,7 +433,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="11/12/2023 - 20h30" />
|
||||
<MESSAGE value="12/12/2023 - 22h30" />
|
||||
<MESSAGE value="13/12/2023 - 23h30" />
|
||||
<MESSAGE value="14/12/2023 - 08h30" />
|
||||
|
@ -460,6 +457,7 @@
|
|||
<MESSAGE value="06/01/24 - 20h30" />
|
||||
<MESSAGE value="08/01/24 - 22h30" />
|
||||
<MESSAGE value="09/01/24 - 19h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="09/01/24 - 19h30" />
|
||||
<MESSAGE value="11/01/24 - 21h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="11/01/24 - 21h30" />
|
||||
</component>
|
||||
</project>
|
1370
Log/log_file.log
1370
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -16,6 +16,7 @@ from datetime import datetime, date
|
|||
|
||||
from xhtml2pdf import pisa
|
||||
|
||||
import Session_Formation_Sequence
|
||||
import partner_client
|
||||
import prj_common as mycommon
|
||||
import secrets
|
||||
|
@ -3551,6 +3552,10 @@ Cette fonction supprime une session de formation.
|
|||
/!\ : il faut s'assurer qu'il n'y a aucune inscription avant de supprimer valide.
|
||||
Et la session est supprimé, alors supprimer toutes inscriptions (annulée) associés
|
||||
Ensuite supprimer les affectations d'enseignants et de materiels associée
|
||||
|
||||
12/01/2024 :
|
||||
- Supprimer les sequences de cette session
|
||||
- Dealloué les agenda
|
||||
"""
|
||||
def Delete_SessionFormation(diction):
|
||||
try:
|
||||
|
@ -3580,17 +3585,12 @@ def Delete_SessionFormation(diction):
|
|||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
# Verifier la validité du token
|
||||
retval = mycommon.check_partner_token_validity("", mytoken)
|
||||
if retval is False:
|
||||
return "Err_Connexion", " La session de connexion n'est pas valide"
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(mytoken)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Les informations d'identification sont incorrectes ")
|
||||
return False, "Impossible de récupérer la liste des stagiaires, Les informations d'identification sont incorrectes "
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
partner_recid = str(my_partner['recid'])
|
||||
session_id = ""
|
||||
if ("session_id" in diction.keys()):
|
||||
if diction['session_id']:
|
||||
|
@ -3620,6 +3620,15 @@ def Delete_SessionFormation(diction):
|
|||
# Pour le materiel
|
||||
MYSY_GV.dbname['ressource_materielle_affectation'].delete_many(delete_affectation_qry)
|
||||
|
||||
# 12/01/2024 : Supprimer les sequences
|
||||
for sequence in MYSY_GV.dbname['session_formation_sequence'].find({'session_id':str(diction['session_id']),
|
||||
'partner_owner_recid':str(my_partner['recid'])},
|
||||
{'_id':1}):
|
||||
local_status, local_retval = Session_Formation_Sequence.Delete_Given_Session_Sequence({'token':str(diction['token']), '_id':str(sequence['_id']) })
|
||||
if( local_status is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " WARNING : Impossible de supprimer la sequence_id "+str(sequence['_id']))
|
||||
|
||||
|
||||
|
||||
# Suppression de la session
|
||||
deleted_session_qry = {'_id':ObjectId(str(session_id)), 'partner_owner_recid':str(partner_recid)}
|
||||
|
|
|
@ -423,7 +423,7 @@ def Create_Automatic_Sequence(diction):
|
|||
|
||||
cpt = 10
|
||||
|
||||
|
||||
nb_sequence = 0
|
||||
|
||||
for single_date in mycommon.daterange(date_debut_session, date_fin_session):
|
||||
#print(single_date.strftime("%Y-%m-%d"))
|
||||
|
@ -457,13 +457,16 @@ def Create_Automatic_Sequence(diction):
|
|||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " WARNING : " + str(local_val))
|
||||
else:
|
||||
nb_sequence = nb_sequence +1
|
||||
|
||||
cpt = cpt + 1
|
||||
|
||||
|
||||
|
||||
|
||||
return True, " Les séquences ont été automatiquement créées "
|
||||
|
||||
return True, str(nb_sequence)+" séquence(s) automatiquement créée(s) "
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
|
@ -895,6 +898,7 @@ def Delete_Given_Session_Sequence_Mass(diction):
|
|||
if diction['tab_id']:
|
||||
tab_id = str(diction['tab_id']).split(",")
|
||||
|
||||
nb_sequence = 0
|
||||
for my_id in tab_id:
|
||||
my_seq_data = {}
|
||||
my_seq_data['token'] = diction['token']
|
||||
|
@ -905,9 +909,10 @@ def Delete_Given_Session_Sequence_Mass(diction):
|
|||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - WARNING . " + str(local_retval))
|
||||
|
||||
else:
|
||||
nb_sequence = nb_sequence + 1
|
||||
|
||||
|
||||
return True, "Les sequences ont été supprimées en masse "
|
||||
return True, str(nb_sequence)+" séquence(s) supprimée(s) "
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
|
|
Loading…
Reference in New Issue