Changeset 3346
- Timestamp:
- 17 Mar 2008, 10:54:14 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r3341 r3346 943 943 da['app_mobile'] = brain.phone 944 944 945 da['entry_mode'] = self._v_certificates[brain.course_admitted][ 1]945 da['entry_mode'] = self._v_certificates[brain.course_admitted]['study_mode'] 946 946 947 947 #if brain.entry_mode: … … 1402 1402 if filename == pend_str: 1403 1403 pending_only = True 1404 # mode = "create"1405 # if edit:1406 # if filename.endswith('_toDelete'):1407 # mode = "delete"1408 # else:1409 # mode = "edit"1410 1404 importer_name = ''.join([part.capitalize() for part in name.split('_')]) 1411 1405 importer = eval("%sImport" % importer_name)(self) … … 1513 1507 empty_value_keys = [] 1514 1508 for k,v in record.items(): 1509 if k is None: 1510 continue 1515 1511 if v: 1516 1512 if v == EMPTY: -
WAeUP_SRP/base/skins/waeup_academics/getCertificatesDict.py
r3339 r3346 3 3 """ 4 4 Return the certificates as dictionary 5 6 """7 5 8 6 try: … … 11 9 def set_trace(): 12 10 pass 11 """ 13 12 14 if key is None: 15 res = context.portal_catalog.search({'meta_type': "Certificate"}) 16 dict = {} 17 18 for d in res: 19 c = d.getObject().getContent() 20 if not hasattr(c,'study_mode'): 21 continue 22 dict[d.getId] = (c.title,c.study_mode) 23 #set_trace() 24 return dict 13 res = context.portal_catalog.search({'meta_type': "Certificate"}) 14 dict = {} 25 15 26 res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key}) 27 if res: 28 return res[0].Title 29 raise KeyError 16 for d in res: 17 c = d.getObject().getContent() 18 if not hasattr(c,'study_mode'): 19 continue 20 #dict[d.getId] = (c.title,c.study_mode) 21 dict[d.getId] = {'title': c.title, 22 'study_mode': c.study_mode, 23 } 24 return dict 25
Note: See TracChangeset for help on using the changeset viewer.