Changeset 727 for WAeUP_SRP/trunk
- Timestamp:
- 20 Oct 2006, 13:06:08 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 10 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r725 r727 84 84 certs = {} 85 85 for c in l: 86 certs[c.id] = c.getObject() 86 ca,ac,fa,dep_id,co,certcode = c.relative_path.split('/') 87 cid = "%(dep_id)s_%(certcode)s" % vars() 88 certs[cid] = c.getObject() 87 89 for student in students: 88 90 logger.info('processing "%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student) … … 95 97 continue 96 98 certcode = makeCertificateCode(student.get('CourseMajor')) 97 if certcode not in certs.keys(): 99 dep_id = student.get('Dept') 100 fac_id = student.get('Faculty') 101 cid = "%(dep_id)s_%(certcode)s" % vars() 102 if cid not in certs.keys(): 98 103 em = 'Certificate with ID %s %s not found\n' % (certcode, student.get('CourseMajor')) 99 104 logger.info(em) … … 101 106 no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student) 102 107 continue 108 certificate_doc = certs[cid].getContent() 103 109 level = student.get('StudentLevel') 104 110 try: … … 162 168 studycourse = student_obj.study_course 163 169 dsc = {} 170 from_certificate = ['title', 171 'max_elect', 172 'max_pass', 173 'n_core', 174 'nr_years', 175 'probation_credits', 176 'promotion_credits', 177 'start_level', 178 ] 179 for f in from_certificate: 180 dsc[f] = getattr(certificate_doc,f) 181 dsc['faculty'] = fac_id 182 dsc['department'] = dep_id 164 183 dsc['study_course'] = certcode 165 dsc['department'] = student.get('Dept')166 dsc['faculty'] = student.get('Faculty')167 184 css = student.get('CurrentSession') or '2004-2005' 168 185 cs = int(css.split('-')[0]) - 2000 … … 206 223 wftool.doActionFor(clearance,'close') 207 224 wftool.doActionFor(personal,'close') 225 wftool.doActionFor(studycourse,'close_for_edit') 208 226 open("%s/import/pwlist-%s.csv" % (i_home,name),"w+").write('\n'.join(pwlist)) 209 227 return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1')) … … 217 235 level_wf_actions["SUCCESSFUL STUDENT"] = "pass_A" 218 236 level_wf_actions["STUDENT WITH CARRYOVER COURSES"] = "pass_B" 219 level_wf_actions["STUDENT FOR PROBATION"] = "p ass_C"220 level_wf_actions["STUDENT ON PROBATION/TRANSFER"] = " pass_D"237 level_wf_actions["STUDENT FOR PROBATION"] = "probate_C" 238 level_wf_actions["STUDENT ON PROBATION/TRANSFER"] = "reject_D" 221 239 import transaction 222 240 wftool = self.portal_workflow … … 274 292 no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result) 275 293 continue 294 course_doc = courses[course].getContent() 276 295 temp_level = result.get('Level') 277 296 result['StudentId'] = sf.getId() … … 285 304 no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result) 286 305 continue 287 if level_changed: 306 level_changed = True 307 if 'dlev' in vars().keys(): 288 308 wftool.doActionFor(l,level_wf_actions[dlev['verdict']]) 289 level_changed = True290 309 level = temp_level 291 310 l = getattr(sc,level,None) … … 302 321 cr = getattr(l,course) 303 322 dcr = {} 323 from_course = ['title', 324 'credits', 325 'passmark', 326 ] 327 for f in from_course: 328 dcr[f] = getattr(course_doc,f) 304 329 dlev = {} 305 330 dcr['ansbook'] = result.get('Ansbook') -
WAeUP_SRP/trunk/profiles/default/layouts.xml
r652 r727 19 19 <object name="student_clearance" meta_type="CPS Layout"/> 20 20 <object name="student_clearance_fe" meta_type="CPS Layout"/> 21 <object name="student_course_result s" meta_type="CPS Layout"/>21 <object name="student_course_result" meta_type="CPS Layout"/> 22 22 <object name="student_personal" meta_type="CPS Layout"/> 23 23 <object name="student_personal_fe" meta_type="CPS Layout"/> -
WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml
r724 r727 7 7 <property name="flexible_widgets"/> 8 8 <property name="validate_values_expr"></property> 9 <widget name="credits" meta_type="Int Widget"> 10 <property name="title">Credits</property> 11 <property name="fields"> 12 <element value="credits"/> 13 </property> 14 <property name="label">Credits</property> 15 <property name="label_edit">Credits</property> 16 <property name="readonly_layout_modes"/> 17 <property name="readonly_layout_modes"> 18 <element value="edit"/> 19 </property> 20 <property name="hidden_readonly_layout_modes"/> 21 </widget> 22 <widget name="passmark" meta_type="Int Widget"> 23 <property name="title">Passmark</property> 24 <property name="fields"> 25 <element value="passmark"/> 26 </property> 27 <property name="is_required">True</property> 28 <property name="label">Passmark</property> 29 <property name="label_edit">Passmark</property> 30 <property name="readonly_layout_modes"> 31 <element value="edit"/> 32 </property> 33 <property name="hidden_layout_modes"/> 34 <property name="hidden_readonly_layout_modes"/> 35 </widget> 36 <widget name="title" meta_type="String Widget"> 37 <property name="title">Course Title</property> 38 <property name="fields"> 39 <element value="title"/> 40 </property> 41 <property name="label">Course Title</property> 42 <property name="label_edit">Course Title</property> 43 <property name="readonly_layout_modes"> 44 <element value="edit"/> 45 </property> 46 <property name="hidden_layout_modes"/> 47 <property name="hidden_readonly_layout_modes"/> 48 <property name="display_width">60</property> 49 </widget> 9 50 <widget name="ansbook" meta_type="String Widget"> 10 51 <property name="title">Ansbook</property> … … 40 81 <property name="hidden_readonly_layout_modes"/> 41 82 </widget> 42 <widget name="gpa" meta_type="Float Widget">43 <property name="title">GPA</property>44 <property name="fields">45 <element value="gpa"/>46 </property>47 <property name="label">GPA</property>48 <property name="label_edit">GPA</property>49 <property name="readonly_layout_modes"/>50 <property name="hidden_layout_modes"/>51 <property name="hidden_readonly_layout_modes"/>52 </widget>53 83 <widget name="grade" meta_type="String Widget"> 54 84 <property name="title">Grade</property> … … 69 99 <property name="label">ID</property> 70 100 <property name="label_edit">ID</property> 71 <property name="readonly_layout_modes"/> 101 <property name="readonly_layout_modes"> 102 <element value="edit"/> 103 </property> 72 104 <property name="hidden_layout_modes"/> 73 105 <property name="hidden_readonly_layout_modes"/> … … 119 151 <table> 120 152 <row> 153 <cell name="title"/> 154 </row> 155 <row> 121 156 <cell name="semester"/> 157 </row> 158 <row> 159 <cell name="credits"/> 160 </row> 161 <row> 162 <cell name="passmark"/> 122 163 </row> 123 164 <row> -
WAeUP_SRP/trunk/profiles/default/layouts/student_study_course.xml
r723 r727 18 18 <property name="hidden_layout_modes"/> 19 19 <property name="hidden_readonly_layout_modes"/> 20 </widget> 21 <widget name="end_level" meta_type="Select Widget"> 22 <property name="title">End Level</property> 23 <property name="fields"> 24 <element value="end_level"/> 25 </property> 26 <property name="label">End Level</property> 27 <property name="label_edit">End Level</property> 28 <property name="readonly_layout_modes"/> 29 <property name="hidden_layout_modes"/> 30 <property name="hidden_readonly_layout_modes"/> 31 <property name="vocabulary">courselevel</property> 32 </widget> 33 <widget name="max_elect" meta_type="String Widget"> 34 <property name="title">Max Elect</property> 35 <property name="fields"> 36 <element value="max_elect"/> 37 </property> 38 <property name="label">Max Elect</property> 39 <property name="label_edit">Max Elect</property> 40 <property name="readonly_layout_modes"/> 41 <property name="hidden_layout_modes"/> 42 <property name="hidden_readonly_layout_modes"/> 43 </widget> 44 <widget name="max_load" meta_type="Int Widget"> 45 <property name="title">Maximum Load</property> 46 <property name="fields"> 47 <element value="max_load"/> 48 </property> 49 <property name="is_required">True</property> 50 <property name="label">Maximum Load</property> 51 <property name="label_edit">Maximum Load</property> 52 <property name="readonly_layout_modes"/> 53 <property name="hidden_layout_modes"/> 54 <property name="hidden_readonly_layout_modes"/> 55 </widget> 56 <widget name="max_pass" meta_type="Int Widget"> 57 <property name="title">Maximum Pass</property> 58 <property name="fields"> 59 <element value="max_pass"/> 60 </property> 61 <property name="is_required">True</property> 62 <property name="label">Maximum Pass</property> 63 <property name="label_edit">Maximum Pass</property> 64 <property name="readonly_layout_modes"/> 65 <property name="hidden_layout_modes"/> 66 <property name="hidden_readonly_layout_modes"/> 67 </widget> 68 <widget name="n_core" meta_type="Int Widget"> 69 <property name="title">NCore</property> 70 <property name="fields"> 71 <element value="n_core"/> 72 </property> 73 <property name="label">NCore</property> 74 <property name="label_edit">NCore</property> 75 <property name="readonly_layout_modes"/> 76 <property name="hidden_layout_modes"/> 77 <property name="hidden_readonly_layout_modes"/> 78 </widget> 79 <widget name="nr_years" meta_type="Int Widget"> 80 <property name="title">Nr of Years</property> 81 <property name="fields"> 82 <element value="nr_years"/> 83 </property> 84 <property name="label">Nr of Years</property> 85 <property name="label_edit">Nr of Years</property> 86 <property name="readonly_layout_modes"/> 87 <property name="hidden_layout_modes"/> 88 <property name="hidden_readonly_layout_modes"/> 89 </widget> 90 <widget name="probation_credits" meta_type="Int Widget"> 91 <property name="title">Probation Credits</property> 92 <property name="fields"> 93 <element value="probation_credits"/> 94 </property> 95 <property name="label">Probation Credits</property> 96 <property name="label_edit">Probation Credits</property> 97 <property name="readonly_layout_modes"/> 98 <property name="hidden_layout_modes"/> 99 <property name="hidden_readonly_layout_modes"/> 100 </widget> 101 <widget name="promotion_credits" meta_type="Int Widget"> 102 <property name="title">Promotion Credits</property> 103 <property name="fields"> 104 <element value="promotion_credits"/> 105 </property> 106 <property name="label">Promotion Credits</property> 107 <property name="label_edit">Promotion Credits</property> 108 <property name="readonly_layout_modes"/> 109 <property name="hidden_layout_modes"/> 110 <property name="hidden_readonly_layout_modes"/> 111 </widget> 112 <widget name="start_level" meta_type="Select Widget"> 113 <property name="title">Start Level</property> 114 <property name="fields"> 115 <element value="start_level"/> 116 </property> 117 <property name="label">Start Level</property> 118 <property name="label_edit">Start Level</property> 119 <property name="readonly_layout_modes"/> 120 <property name="hidden_layout_modes"/> 121 <property name="hidden_readonly_layout_modes"/> 122 <property name="vocabulary">courselevel</property> 123 </widget> 124 <widget name="end_level" meta_type="Select Widget"> 125 <property name="title">End Level</property> 126 <property name="fields"> 127 <element value="end_level"/> 128 </property> 129 <property name="label">End Level</property> 130 <property name="label_edit">End Level</property> 131 <property name="readonly_layout_modes"/> 132 <property name="hidden_layout_modes"/> 133 <property name="hidden_readonly_layout_modes"/> 134 <property name="vocabulary">courselevel</property> 20 135 </widget> 21 136 <widget name="department" meta_type="String Widget"> … … 53 168 <cell name="department"/> 54 169 </row> 170 <row> 171 <cell name="start_level"/> 172 </row> 173 <row> 174 <cell name="end_level"/> 175 </row> 176 <row> 177 <cell name="max_pass"/> 178 </row> 179 <row> 180 <cell name="max_load"/> 181 </row> 182 <row> 183 <cell name="promotion_credits"/> 184 </row> 185 <row> 186 <cell name="probation_credits"/> 187 </row> 188 <row> 189 <cell name="nr_years"/> 190 </row> 191 <row> 192 <cell name="n_core"/> 193 </row> 194 <row> 195 <cell name="max_elect"/> 196 </row> 55 197 </table> 56 198 </object> -
WAeUP_SRP/trunk/profiles/default/schemas.xml
r652 r727 9 9 <object name="course" meta_type="CPS Schema"/> 10 10 <object name="course_results" meta_type="CPS Schema"/> 11 <object name="student_course_results" meta_type="CPS Schema"/>12 11 <object name="department" meta_type="CPS Schema"/> 13 12 <object name="faculty" meta_type="CPS Schema"/> 14 13 <object name="semester" meta_type="CPS Schema"/> 15 14 <object name="student" meta_type="CPS Schema"/> 16 <object name="student_study_course" meta_type="CPS Schema"/>17 15 <object name="scratch_card_batch" meta_type="CPS Schema"/> 16 <object name="student_course_result" meta_type="CPS Schema"/> 18 17 <object name="student_accommodation" meta_type="CPS Schema"/> 19 18 <object name="student_accommodation_fe" meta_type="CPS Schema"/> … … 22 21 <object name="student_personal" meta_type="CPS Schema"/> 23 22 <object name="student_search" meta_type="CPS Schema"/> 23 <object name="student_study_course" meta_type="CPS Schema"/> 24 24 <object name="students" meta_type="CPS Schema"/> 25 25 <object name="student_study_level" meta_type="CPS Schema"/> -
WAeUP_SRP/trunk/profiles/default/schemas/student_course_result.xml
r724 r727 1 1 <?xml version="1.0"?> 2 2 <object name="course_results" meta_type="CPS Schema"> 3 <field name="title" meta_type="CPS String Field"/> 4 <field name="faculty_code" meta_type="CPS String Field"/> 5 <field name="department_code" meta_type="CPS String Field"/> 6 <field name="credits" meta_type="CPS Int Field"/> 7 <field name="passmark" meta_type="CPS Int Field"/> 3 8 <field name="ansbook" meta_type="CPS String Field"/> 4 9 <field name="carry_level" meta_type="CPS String Field"/> 5 <field name="gpa" meta_type="CPS Float Field"/>6 10 <field name="grade" meta_type="CPS String Field"/> 7 11 <field name="import_id" meta_type="CPS String Field"/> -
WAeUP_SRP/trunk/profiles/default/schemas/student_study_course.xml
r723 r727 1 1 <?xml version="1.0"?> 2 2 <object name="student_study_course" meta_type="CPS Schema"> 3 <field name="title" meta_type="CPS String Field"/> 3 4 <field name="study_course" meta_type="CPS String Field"> 4 5 <property name="is_searchabletext">True</property> … … 10 11 <property name="is_searchabletext">True</property> 11 12 </field> 13 <field name="max_elect" meta_type="CPS String Field"/> 14 <field name="max_load" meta_type="CPS Int Field"/> 15 <field name="max_pass" meta_type="CPS Int Field"/> 16 <field name="n_core" meta_type="CPS Int Field"/> 17 <field name="nr_years" meta_type="CPS Int Field"/> 18 <field name="probation_credits" meta_type="CPS Int Field"/> 19 <field name="promotion_credits" meta_type="CPS Int Field"/> 20 <field name="start_level" meta_type="CPS String Field"/> 21 <field name="end_level" meta_type="CPS String Field"/> 12 22 </object> -
WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml
r723 r727 17 17 <property name="cps_display_as_document_in_listing">True</property> 18 18 <property name="schemas"> 19 <element value="student_course_result s"/>19 <element value="student_course_result"/> 20 20 </property> 21 21 <property name="layouts"> 22 <element value="student_course_result s"/>22 <element value="student_course_result"/> 23 23 </property> 24 24 <property name="layout_clusters"/> -
WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml
r603 r727 17 17 <item key="clearance_requested" msgid="">clearance requested</item> 18 18 <item key="cleared_and_validated" msgid="">cleared and validated</item> 19 <item key="content_addable" msgid="">content addable</item> 20 <item key="category_A" msgid="">category A</item> 21 <item key="category_B" msgid="">category B</item> 22 <item key="category_C" msgid="">category C</item> 23 <item key="category_D" msgid="">category D</item> 24 <item key="category_E" msgid="">category E</item> 25 <item key="category_F" msgid="">category F</item> 19 26 </object> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
r723 r727 10 10 <exit-transition transition_id="open"/> 11 11 </state> 12 <state state_id="content_addable" title=""> 13 <exit-transition transition_id="close"/> 14 <exit-transition transition_id="create_content"/> 15 <exit-transition transition_id="open"/> 16 </state> 12 17 <state state_id="created" title=""> 13 18 <exit-transition transition_id="close"/> 19 <exit-transition transition_id="close_for_edit"/> 14 20 <exit-transition transition_id="create_content"/> 15 21 <exit-transition transition_id="open"/> … … 25 31 <state state_id="opened" title=""> 26 32 <exit-transition transition_id="close"/> 33 <exit-transition transition_id="close_for_edit"/> 27 34 <exit-transition transition_id="create_content"/> 28 35 <permission-map name="Modify portal content" … … 46 53 <guard-role>SectionManager</guard-role> 47 54 <guard-role>Owner</guard-role> 55 </guard> 56 </transition> 57 <transition transition_id="close_for_edit" title="" 58 new_state="content_addable" trigger="USER" 59 before_script="" after_script=""> 60 61 <guard> 48 62 </guard> 49 63 </transition> -
WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py
r725 r727 1 # #Script (Python) "cpsdocument_edit"1 # Script (Python) "cpsdocument_edit" 2 2 ##bind container=container 3 3 ##bind context=context … … 12 12 return Info about the Studylevel 13 13 """ 14 def findCourse(cid):15 ''' find the course'''16 res = context.portal_catalog({'meta_type': 'Course',17 'id': cid})18 if len(res) < 1:19 return None20 course = res[0].getObject().getContent()21 return course22 23 14 def calculateGPA(): 24 15 """calculate the gpa""" … … 76 67 rd = ro.getContent() 77 68 row['id'] = ro.getId() 78 course = findCourse(ro.getId()) 79 row['credits'] = 0 80 if course: 81 row['credits'] = course.credits 69 row['credits'] = rd.credits 82 70 if row['credits'] and rd.grade: 83 credits = int( course.credits)71 credits = int(rd.credits) 84 72 sum += credits * ['F','E','D','C','B','A'].index(rd.grade) 85 73 course_count += credits 86 74 row['sum'] = sum 87 75 row['count'] = course_count 88 row['title'] = rd. Title()76 row['title'] = rd.title 89 77 #row['core'] = rd.core_or_elective 90 78 row['semester'] = rd.semester -
WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py
r680 r727 12 12 return Info about the current Student 13 13 """ 14 #from Products.ZCTextIndex.QueryParser import ParseError,QueryError 14 try: 15 from Products.AdvancedQuery import Eq, Between, Le 16 evalAdvancedQuery = context.portal_catalog.evalAdvancedQuery 17 except: 18 evalAdvancedQuery = None 19 15 20 request = context.REQUEST 16 21 form = request.form … … 53 58 err = False 54 59 with_review = state != "all" 60 onlyreview = with_review and not term 61 with_level_results = state.startswith("category") and evalAdvancedQuery is not None 62 bools = "with_review = %s<br\> onlyreview = %s<br\> with_level_results = %s" % (with_review,onlyreview,with_level_results) 55 63 if not term and not with_review: 56 64 psm = "You must specify a search string when searching 'all states'." … … 66 74 is_manager = is_manager, 67 75 ) 68 with_review = state != "all"69 76 items = [] 70 77 res = [] 71 78 portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']} 72 79 st_queries = ('jamb_reg_no','matric_no','name') 73 onlyreview = with_review and not term 74 if onlyreview: 75 res = catalog(portal_type='Student', 76 review_state=state) 80 query_step = 0 81 if onlyreview and not with_level_results: 82 query_step = 1 83 query = Eq('portal_type','Student') & Eq('review_state',state) 84 res = evalAdvancedQuery(query) 85 ## res = catalog(portal_type='Student', 86 ## review_state=state) 87 elif onlyreview and with_level_results: 88 query_step = 2 89 query = Eq('portal_type','StudentStudyLevel') & Eq('review_state',state) 90 res = evalAdvancedQuery(query) 77 91 elif what == "student_id": 78 92 if with_review: 93 query_step = 3 79 94 res = catalog(portal_type='Student', 80 95 id = term.strip(), 81 96 review_state=state) 82 97 else: 98 query_step = 4 83 99 res = catalog(portal_type='Student', 84 100 id = term.strip()) 85 elif what in st_queries :101 elif what in st_queries and not with_level_results: 86 102 if what == "jamb_reg_no": 103 query_step = 5 87 104 pt = 'StudentApplication' 88 105 st = "%s*" % term.strip().lower() 89 106 elif what == "matric_no": 107 query_step = 6 90 108 pt = 'StudentClearance' 91 109 st = "%s*" % term.strip().lower() 92 110 elif what == "name": 111 query_step = 7 93 112 pt = portal_type_query 94 113 st = "%s*" % term.strip() … … 102 121 is_manager = is_manager, 103 122 ) 123 elif what in st_queries and with_level_results and evalAdvancedQuery: 124 if what == "jamb_reg_no": 125 query_step = 8 126 pt = 'StudentApplication' 127 st = "%s*" % term.strip().lower() 128 elif what == "matric_no": 129 query_step = 9 130 pt = 'StudentClearance' 131 st = "%s*" % term.strip().lower() 132 elif what == "name": 133 query_step = 10 134 pt = portal_type_query 135 st = "%s*" % term.strip() 136 query = Eq('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip().lower())\ 137 | Eq('portal_type','StudentStudyLevel') & Eq('review_state',state) 138 try: 139 res = evalAdvancedQuery(query) 140 except: 141 return context.students_manager_view(rendered = rend, 142 psm = 'Advanced Query failed' % term, 143 #psm = "%s, %s" % (psm,ds), 144 students = items, 145 is_manager = is_manager, 146 ) 104 147 students = [] 148 raw_res = len(res) 105 149 if res: 106 150 for r in res: 107 if r.portal_type in ("StudentApplication","StudentPersonal" ):151 if r.portal_type in ("StudentApplication","StudentPersonal",): 108 152 student = r.getObject().aq_parent 153 elif r.portal_type in ("StudentStudyLevel",): 154 student = r.getObject().aq_parent.aq_parent 109 155 ## pp = '/'.join(r.getPath().split('/')[:-1]) 110 156 ## student_cat = catalog(pathindex=pp,portal_type='Student')[0] … … 114 160 student = r.getObject() 115 161 student_rs = wf.getInfoFor(student,'review_state','keiner') 116 if (with_review and student_rs != state ) or student in items:162 if (with_review and student_rs != state and not with_level_results) or student in items: 117 163 continue 118 164 items.append(student) … … 126 172 ) 127 173 return context.students_manager_view(rendered = rend, 128 psm = """ Your search for "%s" in %s with state %s failed.""" % (st,what,state),174 psm = """Step: %s found: %s Your search for "%s" in %s with state %s failed.<br\>%s""" % (query_step,raw_res,st,what,state,bools), 129 175 students = students, 130 176 is_manager = is_manager,
Note: See TracChangeset for help on using the changeset viewer.