- Timestamp:
- 29 Sep 2006, 14:14:40 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/layouts/student_search.xml
r587 r596 17 17 <property name="hidden_layout_modes"/> 18 18 <property name="hidden_readonly_layout_modes"/> 19 <property name="vocabulary">searchable_ review_states_voc</property>19 <property name="vocabulary">searchable_student_states</property> 20 20 </widget> 21 21 <widget name="search_mode" meta_type="Generic Select Widget"> … … 24 24 <element value="search_mode"/> 25 25 </property> 26 <property name="is_required">True</property> 26 27 <property name="label">Search for</property> 27 28 <property name="label_edit">Search for</property> … … 29 30 <property name="hidden_layout_modes"/> 30 31 <property name="hidden_readonly_layout_modes"/> 31 <property name="vocabulary">s earch_mode_voc</property>32 <property name="vocabulary">student_search_mode</property> 32 33 <property name="render_format">radio</property> 33 34 </widget> -
WAeUP_SRP/trunk/profiles/default/vocabularies.xml
r584 r596 16 16 <object name="exam_types" meta_type="CPS Vocabulary"/> 17 17 <object name="pin_prefixes" meta_type="CPS Vocabulary"/> 18 <object name="search_mode_voc" meta_type="CPS Vocabulary"/> 19 <object name="searchable_review_states_voc" meta_type="CPS Vocabulary"/> 18 <object name="student_search_mode" meta_type="CPS Vocabulary"/> 19 <object name="searchable_student_states" meta_type="CPS Vocabulary"/> 20 <object name="academics_search_mode" meta_type="CPS Vocabulary"/> 21 <object name="searchable_academics_states" meta_type="CPS Vocabulary"/> 20 22 </object> -
WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml
r585 r596 5 5 <property name="description"></property> 6 6 <property name="acl_write_roles">Manager</property> 7 <item key="all" msgid="">All States</item> 7 8 <item key="admission_applied " msgid="">Applied for Admission</item> 8 9 <item key="created" msgid="">Data Imported</item> -
WAeUP_SRP/trunk/profiles/default/vocabularies/student_search_mode.xml
r587 r596 9 9 <item key="matric_no" msgid="">Matriculation Number</item> 10 10 <item key="jamb_id" msgid="">Jamb Id</item> 11 <item key="review_state" msgid="">Review State</item>12 11 </object> -
WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py
r589 r596 54 54 state = ds.get('review_state') 55 55 term = ds.get('search_string') 56 if state == " ----- ":57 state = ''58 56 err = False 59 57 if not term and what in ('student_edit','jamb_id','name','matric_no'): 60 psm = "You must specify a search string "58 psm = "You must specify a search string when searching in 'All States'" 61 59 err = True 62 60 elif '*' in term: 63 psm = " You cannot use '*'"61 psm = "you cannot use the '*' alone" 64 62 err = True 65 63 if err: … … 70 68 is_manager = is_manager, 71 69 ) 72 onlyreview = state and what == "review_state"70 with_review = state != "all" 73 71 items = [] 74 72 res = [] 75 73 portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']} 76 74 st_queries = ('jamb_id','matric_no','name') 75 onlyreview = with_review and not what 77 76 if onlyreview: 78 77 res = catalog(portal_type=portal_type_query, 79 78 review_state=state) 80 79 elif what == "student_id": 81 res = catalog(portal_type='Student', 82 id = term.strip()) 80 if with_review: 81 res = catalog(portal_type='Student', 82 id = term.strip(), 83 review_state=state) 84 else: 85 res = catalog(portal_type='Student', 86 id = term.strip()) 83 87 elif what in st_queries: 84 88 if what == "jamb_id": … … 91 95 pt = portal_type_query 92 96 st = "%s*" % term.strip() 93 try: 94 res = catalog(portal_type=pt,SearchableText=st,) 95 except: 96 return context.students_manager_view(rendered = rend, 97 psm = 'Searchstring "%s" not allowed' % term, 98 #psm = "%s, %s" % (psm,ds), 99 students = items, 100 is_manager = is_manager, 101 ) 97 if with_review: 98 try: 99 res = catalog(portal_type=pt,SearchableText=st, 100 review_state=state) 101 except: 102 return context.students_manager_view(rendered = rend, 103 psm = 'Searchstring "%s" not allowed' % term, 104 #psm = "%s, %s" % (psm,ds), 105 students = items, 106 is_manager = is_manager, 107 ) 108 else: 109 try: 110 res = catalog(portal_type=pt,SearchableText=st,) 111 except: 112 return context.students_manager_view(rendered = rend, 113 psm = 'Searchstring "%s" not allowed' % term, 114 #psm = "%s, %s" % (psm,ds), 115 students = items, 116 is_manager = is_manager, 117 ) 102 118 103 119 if res:
Note: See TracChangeset for help on using the changeset viewer.