Changeset 1006 for WAeUP_SRP/trunk/skins/waeup_pins
- Timestamp:
- 7 Dec 2006, 18:18:28 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_pins/search_pins.py
r1002 r1006 12 12 list Students for ClearanceOfficers 13 13 """ 14 14 15 request = REQUEST 15 16 wftool = context.portal_workflow … … 47 48 48 49 if what == 'student': 49 items_2 = context.portal_pins(student = term)50 50 items_1 = context.portal_pins(student = term.upper()) 51 items_2 = context.portal_pins(student = term.lower()) 51 52 items = items_1 + items_2 52 53 elif what == 'pin': … … 55 56 items = [] 56 57 l = [] 58 students_url = "%s/%s" % (context.portal_url(),'students') 59 pins = [] 57 60 for i in items: 58 61 item = {} … … 61 64 item['serial'] = i.serial 62 65 item['pin'] = i.pin 66 if i.pin in pins: 67 continue 68 pins.append(i.pins) 63 69 if len(sno)==10: 64 #if bd.prefix == "APP":65 70 #res = context.portal_catalog(SearchableText=sno,portal_type='StudentApplication') 66 71 res = context.students_catalog(jamb_reg_no=sno.upper()) 67 72 if len(res) > 0: 68 item['student_url'] = "%s/ %s" % (context.portal_url(),res[0].id)73 item['student_url'] = "%s/campus/students/%s" % (context.portal_url(),res[0].id) 69 74 item['student_id'] = res[0].id 70 75 else: 71 76 item['student_url'] = None 72 77 item['student_id'] = '' 78 elif sno: 79 item['student_url'] = '%s/campus/students/%s' % (students_url,item['student']) 80 item['student_id'] = student 73 81 else: 74 item['student_url'] = ' %s/%s' % (students_url,item['student'])75 item['student_id'] = student82 item['student_url'] = '' 83 item['student_id'] = "not used" 76 84 l.append(item) 77 85
Note: See TracChangeset for help on using the changeset viewer.