- Timestamp:
- 18 Jan 2007, 11:12:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py
r1286 r1318 29 29 dep['id'] = "All Faculties" 30 30 31 total_new = aq_students(Eq('level','100')) 31 umequery = Eq('level','100') 32 #dequery = Eq('entry_mode','DE') # only correct for 2006/2007 33 #total_new = aq_students(umequery or dequery) 34 total_new = aq_students(umequery) 32 35 total_new = float(len(total_new)) 33 36 dep['new'] = "%.0f" % total_new … … 66 69 dep['objection_raised_percent'] = "%.0f" % round(ora*100/total_new) 67 70 68 ret_res = context.portal_catalog(review_state ='returning')69 ret_ids = [r.getId for r in ret_res]70 total_ret = aq_students(Ge('level','200'))71 total_ret = float(len(total_ret))72 dep['returning'] = "%.0f" % total_ret73 74 71 l.append(dep) 75 72 fs = context.portal_catalog(portal_type="Faculty") … … 78 75 dep['id'] = fid 79 76 fquery = Eq('faculty',fid) 80 squery = Eq('level','100') 81 fac_res = aq_students(fquery & squery) 77 #umequery = Eq('level','100') 78 #fac_res = aq_students(fquery & umequery & dequery) 79 fac_res = aq_students(fquery & umequery) 82 80 fac_ids = [r.id for r in fac_res] 83 81 total = float(len(fac_res)) … … 113 111 dep['objection_raised_percent'] = "%.0f" % round(ora*100/total) 114 112 115 squery = Ge('level','200') 116 fac_res = aq_students(fquery & squery) 117 fac_ids = [r.id for r in fac_res] 118 ret = len([s for s in fac_ids if s in ret_ids]) 119 dep['returning'] = ret 120 121 if total == 0 and ret == 0: 113 if total == 0: 122 114 continue 123 115
Note: See TracChangeset for help on using the changeset viewer.