Changeset 1530 for WAeUP_SRP/trunk/skins
- Timestamp:
- 8 Mar 2007, 23:44:47 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py
r1520 r1530 29 29 dep['id'] = "All Faculties" 30 30 31 umequery = Eq('level','100') | (Eq('level','200') & Eq('entry_mode','DE')) 32 #umequery = Eq('level','100') 33 #dequery = Eq('entry_mode','DE') # only correct for 2006/2007 34 #total_new = aq_students(umequery or dequery) 35 total_new = aq_students(umequery) 31 freshquery = Eq('level','100') | (Eq('level','200') & Eq('entry_mode','DE')) 32 total_new = aq_students(freshquery) 36 33 total_new = float(len(total_new)) 37 34 dep['new'] = "%.0f" % total_new … … 70 67 dep['objection_raised_percent'] = "%.0f" % round(ora*100/total_new) 71 68 69 total_sfp = total_new - (cav + cr + cpe + adm + ora) 70 dep['rest'] = int(total_sfp) 71 dep['rest_percent'] = "%.0f" % round(total_sfp*100/total_new) 72 73 72 74 l.append(dep) 73 75 fs = context.portal_catalog(portal_type="Faculty") … … 76 78 dep['id'] = fid 77 79 fquery = Eq('faculty',fid) 78 #umequery = Eq('level','100') 79 #fac_res = aq_students(fquery & umequery & dequery) 80 fac_res = aq_students(fquery & umequery) 80 fac_res = aq_students(fquery & freshquery) 81 81 fac_ids = [r.id for r in fac_res] 82 82 total = float(len(fac_res)) 83 #if total == 0: 84 # continue 83 84 if total == 0: 85 continue 86 85 87 dep['new'] = "%.0f" % total 86 88 … … 106 108 if total: 107 109 dep['cleared_and_validated_percent'] = "%.0f" % round(cav*100/total) 110 108 111 ora = len([s for s in fac_ids if s in or_ids]) 109 112 dep['objection_raised'] = ora … … 112 115 dep['objection_raised_percent'] = "%.0f" % round(ora*100/total) 113 116 114 if total == 0: 115 continue 117 rest = int(total - (cav + cr + cpe + adm + ora)) 118 dep['rest'] = rest 119 dep['rest_percent'] = "%.0f" % round(rest*100/total) 116 120 117 121 l.append(dep) 118 122 119 123 return l 124 -
WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py
r1286 r1530 26 26 return l 27 27 dep = {} 28 28 sum = 0 29 29 dep['id'] = "All Faculties" 30 30 … … 33 33 ret_res = context.portal_catalog(review_state ='returning') 34 34 ret_ids = [r.getId for r in ret_res] 35 total_returned = aq_students(Ge('level','200')) 36 total_returned = float(len(total_returned)) 37 dep['returned'] = "%.0f" % total_returned 35 ret = len(ret_res) 36 dep['total'] = ret 38 37 39 38 l.append(dep) … … 43 42 dep['id'] = fid 44 43 fquery = Eq('faculty',fid) 45 squery = Ge('level','200') 46 fac_res = aq_students(fquery & squery) 44 fac_res = aq_students(fquery) 47 45 fac_ids = [r.id for r in fac_res] 46 total = float(len(fac_res)) 47 48 if total == 0: 49 continue 50 48 51 ret = len([s for s in fac_ids if s in ret_ids]) 49 52 dep['returned'] = ret 53 sum += ret 50 54 51 55 if ret == 0: … … 54 58 l.append(dep) 55 59 60 l[0]['sum'] = sum 61 56 62 return l 63 -
WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt
r1472 r1530 19 19 </span> 20 20 <span tal:condition="allowed" tal:omit-tag=""> 21 <a href="statistics_new_view"><strong> New Student Statistics</strong></a>21 <a href="statistics_new_view"><strong><nobr>New Student Statistics</nobr></strong></a> 22 22 23 <a href="statistics_ret_view"><strong> Returning Student Statistics</strong></a>23 <a href="statistics_ret_view"><strong><nobr>Returning Student Statistics</nobr></strong></a> 24 24 25 <a href="list_students"><strong>Cleared Student Export</strong></a> 25 <a href="statistics_reg_view"><strong><nobr>Registration Statistics</nobr></strong></a> 26 27 <a href="list_students"><strong><nobr>Cleared Student Export</nobr></strong></a> 26 28 27 28 29 <span tal:condition="is_so"> 29 <a href="add_student"><strong> Add Student Record</strong></a>30 <a href="add_student"><strong><nobr>Add Student Record</nobr></strong></a> 30 31 31 <a href="paid_transfer_list"><strong> Export Transfer Students</strong></a>32 <a href="paid_transfer_list"><strong><nobr>Export Transfer Students</nobr></strong></a> 32 33 </span> 33 34 -
WAeUP_SRP/trunk/skins/waeup_student/statistics_new_view.pt
r1292 r1530 10 10 <span tal:condition="departments"> 11 11 12 <a href="search_students"><strong>Search Students</strong></a> 13 14 <a href="statistics_ret_view"><strong>Returning Student Statistics</strong></a> 12 <a href="search_students"><strong><nobr>Search Students</nobr></strong></a> 13 14 <a href="statistics_ret_view"><strong><nobr>Returning Student Statistics</nobr></strong></a> 15 16 <a href="statistics_reg_view"><strong><nobr>Registration Statistics</nobr></strong></a> 17 15 18 <h3>New Student Statistics</h3> 16 19 <br /> … … 25 28 <th align="right">CR</th> 26 29 <th align="right">VC</th> 30 <th align="right">SFP</th> 27 31 </tr> 28 32 <tr tal:repeat="d departments" … … 52 56 (<span tal:content="d/cleared_and_validated_percent" />%) 53 57 </td> 54 58 <td width="80px" align="right"> 59 <span tal:content="d/rest" /> 60 (<span tal:content="d/rest_percent" />%) 61 </td> 55 62 </tr> 56 63 </table> … … 62 69 <tr><td>CR: </td> <td>Clearance requested</td></tr> 63 70 <tr><td>VC: </td> <td>Validated and cleared</td></tr> 71 <tr><td>SFP: </td> <td>School fee paid</td></tr> 64 72 </table> 65 73 </span> -
WAeUP_SRP/trunk/skins/waeup_student/statistics_ret_view.pt
r1292 r1530 10 10 <span tal:condition="departments"> 11 11 12 <a href="search_students"><strong>Search Students</strong></a> 13 14 <a href="statistics_new_view"><strong>New Student Statistics</strong></a> 12 <a href="search_students"><strong><nobr>Search Students</nobr></strong></a> 13 14 <a href="statistics_new_view"><strong><nobr>New Student Statistics</nobr></strong></a> 15 16 <a href="statistics_reg_view"><strong><nobr>Registration Statistics</nobr></strong></a> 15 17 <h3>Returning Student Statistics</h3> 16 18 <br /> … … 21 23 <th align="right">Returning</th> 22 24 </tr> 23 <tr tal:repeat="d departments" 24 tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')"> 25 <tr tal:define="d python:departments[0]" 26 class="even ajaxtd"> 27 <td width="80px">All Faculties</td> 28 <td width="80px" align="right"> 29 <span tal:content="d/sum" /> of <span tal:content="d/total" /> 30 </td> 31 </tr> 32 <tr tal:repeat="d python:departments[1:]" 33 tal:attributes="class python:test(repeat['d'].even(), 'odd ajaxtd', 'even ajaxtd')"> 25 34 <td width="80px"> <span tal:content="d/id" /> </td> 26 35 <td width="80px" align="right">
Note: See TracChangeset for help on using the changeset viewer.