parent
c5ae3c2231
commit
aaa8b39dc9
|
@ -9,9 +9,6 @@
|
|||
<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$/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" />
|
||||
<change beforePath="$PROJECT_DIR$/user_access_right.py" beforeDir="false" afterPath="$PROJECT_DIR$/user_access_right.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
1807
Log/log_file.log
1807
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -1359,13 +1359,24 @@ def Get_Partner_Session_Ftion_Reduice_Fields(diction):
|
|||
return local_status, my_partner
|
||||
|
||||
"""
|
||||
Filtre uniquement pour la Formation continue
|
||||
Filtre sur scope utilisateur
|
||||
"""
|
||||
filt_scope_class_id = {}
|
||||
if ("scope" in my_partner.keys() and "class_id" in my_partner['scope'].keys() and len(
|
||||
my_partner['scope']['class_id']) > 0):
|
||||
filt_scope_class_id['class_id'] = {'$in': my_partner['scope']['class_id']}
|
||||
|
||||
filt_scope_session_id = {}
|
||||
tab_session_id_ObjectId = []
|
||||
if ("scope" in my_partner.keys() and "session_id" in my_partner['scope'].keys() and len(
|
||||
my_partner['scope']['session_id']) > 0):
|
||||
for tmp in my_partner['scope']['session_id']:
|
||||
if (tmp):
|
||||
tab_session_id_ObjectId.append((ObjectId(tmp)))
|
||||
|
||||
filt_scope_session_id['_id'] = {'$in': tab_session_id_ObjectId}
|
||||
|
||||
|
||||
filt_archive = {}
|
||||
if ("archive" in diction.keys() and (diction["archive"] == "0" or diction["archive"] == "")):
|
||||
filt_archive = {'archive': {'$ne': '1'}}
|
||||
|
@ -1377,7 +1388,7 @@ def Get_Partner_Session_Ftion_Reduice_Fields(diction):
|
|||
val_tmp = 0
|
||||
|
||||
for retval in MYSY_GV.dbname['session_formation'].find({ "$and" : [ {'partner_owner_recid':str(my_partner['recid']),
|
||||
'valide':'1',},filt_scope_class_id, filt_archive]},
|
||||
'valide':'1',},filt_scope_class_id, filt_scope_session_id, filt_archive]},
|
||||
{'_id':1, 'code_session':1, 'titre':1,
|
||||
'class_internal_url':1, 'date_debut':1,
|
||||
'date_fin':1}):
|
||||
|
@ -1761,19 +1772,30 @@ def GetAllValideSessionPartner_List(diction):
|
|||
filt_archive = {'archive': '1'}
|
||||
|
||||
"""
|
||||
Filtre uniquement pour la Formation Initiale
|
||||
Filtre sur scope utilisateur
|
||||
"""
|
||||
filt_scope_class_id = {}
|
||||
if ("scope" in my_partner.keys() and "class_id" in my_partner['scope'].keys() and len(
|
||||
my_partner['scope']['class_id']) > 0):
|
||||
filt_scope_class_id['class_id'] = {'$in': my_partner['scope']['class_id']}
|
||||
|
||||
filt_scope_session_id = {}
|
||||
tab_session_id_ObjectId = []
|
||||
if ("scope" in my_partner.keys() and "session_id" in my_partner['scope'].keys() and len(
|
||||
my_partner['scope']['session_id']) > 0):
|
||||
for tmp in my_partner['scope']['session_id']:
|
||||
if (tmp):
|
||||
tab_session_id_ObjectId.append((ObjectId(tmp)))
|
||||
|
||||
filt_scope_session_id['_id'] = {'$in': tab_session_id_ObjectId}
|
||||
|
||||
|
||||
coll_session = MYSY_GV.dbname['session_formation']
|
||||
|
||||
filt_class_partner_recid = {'partner_owner_recid': str(my_partner['recid'])}
|
||||
|
||||
query = [{'$match': {
|
||||
"$and": [{'partner_owner_recid': str(my_partner['recid'])}, filt_scope_class_id, filt_archive]}},
|
||||
"$and": [{'partner_owner_recid': str(my_partner['recid'])}, filt_scope_class_id, filt_scope_session_id, filt_archive]}},
|
||||
{'$sort': {'_id': -1}},
|
||||
{'$lookup':
|
||||
{
|
||||
|
@ -2153,17 +2175,27 @@ def GetAllValideSessionPartner_List_filter_like(diction):
|
|||
filt_archive = {'archive': {'$ne': '1'}}
|
||||
|
||||
"""
|
||||
Filtre uniquement pour la Formation Initiale
|
||||
Filtre sur les formation si mis sur l'utilisateur
|
||||
"""
|
||||
filt_scope_class_id = {}
|
||||
if ("scope" in my_partner.keys() and "class_id" in my_partner['scope'].keys() and len(
|
||||
my_partner['scope']['class_id']) > 0):
|
||||
filt_scope_class_id['class_id'] = {'$in': my_partner['scope']['class_id']}
|
||||
|
||||
filt_scope_session_id = {}
|
||||
tab_session_id_ObjectId = []
|
||||
if( "scope" in my_partner.keys() and "session_id" in my_partner['scope'].keys() and len(my_partner['scope']['session_id']) > 0 ):
|
||||
for tmp in my_partner['scope']['session_id'] :
|
||||
if( tmp ):
|
||||
tab_session_id_ObjectId.append((ObjectId(tmp)))
|
||||
|
||||
filt_scope_session_id['_id'] = {'$in':tab_session_id_ObjectId}
|
||||
|
||||
|
||||
|
||||
coll_session = MYSY_GV.dbname['session_formation']
|
||||
|
||||
query = [ {'$match':{ '$and' : [ filt_code_session,{'partner_owner_recid':str(my_partner['recid'])}, filt_scope_class_id, filt_archive] }} ,
|
||||
query = [ {'$match':{ '$and' : [ filt_code_session,{'partner_owner_recid':str(my_partner['recid'])}, filt_scope_class_id, filt_scope_session_id, filt_archive] }} ,
|
||||
{'$sort': {'_id': -1}},
|
||||
{'$lookup':
|
||||
{
|
||||
|
|
19
class_mgt.py
19
class_mgt.py
|
@ -4085,7 +4085,7 @@ def find_partner_class_like(diction):
|
|||
{'partner_owner_recid': user_recid},
|
||||
filt_external_code, filt_title, filt_internal_url, filt_archive]}
|
||||
|
||||
print(" ### find_partner_class_like_local_qry = ", find_partner_class_like_local_qry)
|
||||
#print(" ### find_partner_class_like_local_qry = ", find_partner_class_like_local_qry)
|
||||
|
||||
"""
|
||||
Recuperation du nombre d'heure par jour depuis la confif du partner
|
||||
|
@ -4099,12 +4099,24 @@ def find_partner_class_like(diction):
|
|||
if (currency is False):
|
||||
currency = ""
|
||||
|
||||
"""
|
||||
Filtre sur scopde de l'utilisateur connecté
|
||||
"""
|
||||
filt_scope_class_id = {}
|
||||
tab_class_id_ObjectId = []
|
||||
if ("scope" in my_partner.keys() and "class_id" in my_partner['scope'].keys() and len(
|
||||
my_partner['scope']['class_id']) > 0):
|
||||
for tmp in my_partner['scope']['class_id']:
|
||||
if (tmp):
|
||||
tab_class_id_ObjectId.append((ObjectId(tmp)))
|
||||
|
||||
filt_scope_class_id['_id'] = {'$in': tab_class_id_ObjectId}
|
||||
|
||||
|
||||
val_tmp = 1
|
||||
for retVal in coll_name.find({"$and": [{'valide': '1'}, {'locked': '0'},
|
||||
{'partner_owner_recid': user_recid},
|
||||
filt_external_code, filt_title, filt_internal_url, filt_archive]},
|
||||
filt_external_code, filt_title, filt_internal_url, filt_scope_class_id, filt_archive]},
|
||||
{'programme':0, 'objectif': 0, 'indexed': 0, 'indexed_desc': 0,
|
||||
'indexed_obj': 0, 'indexed_title': 0, }
|
||||
).sort([("_id", pymongo.DESCENDING), ]):
|
||||
|
@ -4237,6 +4249,7 @@ def find_partner_class_like(diction):
|
|||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction retourne la liste des formations
|
||||
d'un parenaire mais seulement les champs :
|
||||
|
@ -4285,7 +4298,7 @@ def Get_Partner_All_Class_Few_Fields(diction):
|
|||
|
||||
|
||||
"""
|
||||
Filtre uniquement pour la Formation continue
|
||||
Filtre sur scopde de l'utilisateur connecté
|
||||
"""
|
||||
filt_scope_class_id = {}
|
||||
tab_class_id_ObjectId = []
|
||||
|
|
Loading…
Reference in New Issue