Changeset 2067
- Timestamp:
- 27 Jul 2007, 10:17:53 (17 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py
r1788 r2067 31 31 'courses_validated', 32 32 ) 33 34 full_time = ('ume_ft','de_ft','ug_ft','pg_ft') 35 part_time = ( 'de_pt','ug_pt','pg_pt') 36 33 37 faculties = context.portal_catalog(portal_type="Faculty") 34 38 … … 41 45 dict['id'] = 'All Faculties' 42 46 dict['title'] = 'All Faculties' 43 res = context.students_catalog(entry_session = entry_sessions) 44 dict['total'] = len(res) 47 48 res_ft = context.students_catalog(entry_session = entry_sessions, mode = full_time) 49 dict['total_ft'] = len(res_ft) 50 51 res_pt = context.students_catalog(entry_session = entry_sessions, mode = part_time) 52 dict['total_pt'] = len(res_pt) 53 45 54 for state in new_states: 46 res = context.students_catalog(entry_session = entry_sessions, review_state = state) 47 dict[state] = len(res) 48 statepercent = state+'_percent' 49 if dict['total'] > 0: 50 dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total']) 55 # full_time 56 res_ft = context.students_catalog(entry_session = entry_sessions, review_state = state, mode = full_time) 57 state_ft = state + '_ft' 58 dict[state_ft] = len(res_ft) 59 statepercent = state+'_ft_percent' 60 if dict['total_ft'] > 0: 61 dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft']) 51 62 else: 52 63 dict[statepercent] = 0 64 65 # part_time 66 res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state, mode = part_time) 67 state_pt = state + '_pt' 68 dict[state_pt] = len(res_pt) 69 statepercent = state+'_pt_percent' 70 if dict['total_pt'] > 0: 71 dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt']) 72 else: 73 dict[statepercent] = 0 74 53 75 l.append(dict) 76 54 77 55 78 for f in faculties: … … 57 80 dict['id'] = f.getId 58 81 dict['title'] = f.Title 59 res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId) 60 dict['total'] = len(res) 82 res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = full_time) 83 dict['total_ft'] = len(res_ft) 84 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time) 85 dict['total_pt'] = len(res_pt) 61 86 for state in new_states: 62 res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state) 63 dict[state] = len(res) 64 statepercent = state+'_percent' 65 if dict['total'] > 0: 66 dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total']) 87 # full_time 88 res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = full_time) 89 state_ft = state + '_ft' 90 dict[state_ft] = len(res_ft) 91 statepercent = state+'_ft_percent' 92 if dict['total_ft'] > 0: 93 dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft']) 67 94 else: 68 95 dict[statepercent] = 0 96 97 # part_time 98 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time) 99 state_pt = state + '_pt' 100 dict[state_pt] = len(res_pt) 101 statepercent = state+'_pt_percent' 102 if dict['total_pt'] > 0: 103 dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt']) 104 else: 105 dict[statepercent] = 0 106 69 107 l.append(dict) 108 109 70 110 71 111 return l -
WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py
r1788 r2067 27 27 'courses_validated', 28 28 ) 29 full_time = ('ume_ft','de_ft','ug_ft','pg_ft') 30 part_time = ( 'de_pt','ug_pt','pg_pt') 31 29 32 faculties = context.portal_catalog(portal_type="Faculty") 30 33 … … 37 40 dict['id'] = 'All Faculties' 38 41 dict['title'] = 'All Faculties' 39 res = context.students_catalog(entry_session = entry_sessions) 40 dict['total'] = len(res) 42 43 res_ft = context.students_catalog(entry_session = entry_sessions, mode = full_time) 44 dict['total_ft'] = len(res_ft) 45 46 res_pt = context.students_catalog(entry_session = entry_sessions, mode = part_time) 47 dict['total_pt'] = len(res_pt) 48 41 49 for state in ret_states: 42 res = context.students_catalog(entry_session = entry_sessions, review_state = state) 43 dict[state] = len(res) 44 statepercent = state+'_percent' 45 if dict['total'] > 0: 46 dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total']) 50 # full_time 51 res_ft = context.students_catalog(entry_session = entry_sessions, review_state = state, mode = full_time) 52 state_ft = state + '_ft' 53 dict[state_ft] = len(res_ft) 54 statepercent = state+'_ft_percent' 55 if dict['total_ft'] > 0: 56 dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft']) 47 57 else: 48 58 dict[statepercent] = 0 59 60 # part_time 61 res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state, mode = part_time) 62 state_pt = state + '_pt' 63 dict[state_pt] = len(res_pt) 64 statepercent = state+'_pt_percent' 65 if dict['total_pt'] > 0: 66 dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt']) 67 else: 68 dict[statepercent] = 0 69 49 70 l.append(dict) 71 50 72 51 73 for f in faculties: … … 53 75 dict['id'] = f.getId 54 76 dict['title'] = f.Title 55 res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId) 56 dict['total'] = len(res) 77 res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = full_time) 78 dict['total_ft'] = len(res_ft) 79 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time) 80 dict['total_pt'] = len(res_pt) 57 81 for state in ret_states: 58 res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state) 59 dict[state] = len(res) 60 statepercent = state+'_percent' 61 if dict['total'] > 0: 62 dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total']) 82 # full_time 83 res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = full_time) 84 state_ft = state + '_ft' 85 dict[state_ft] = len(res_ft) 86 statepercent = state+'_ft_percent' 87 if dict['total_ft'] > 0: 88 dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft']) 63 89 else: 64 90 dict[statepercent] = 0 91 92 # part_time 93 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time) 94 state_pt = state + '_pt' 95 dict[state_pt] = len(res_pt) 96 statepercent = state+'_pt_percent' 97 if dict['total_pt'] > 0: 98 dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt']) 99 else: 100 dict[statepercent] = 0 101 65 102 l.append(dict) 66 103 -
WAeUP_SRP/trunk/skins/waeup_student/statistics_new_view.pt
r1766 r2067 20 20 <br /> 21 21 <span tal:condition="not:isAnon"> 22 23 <h3>Full-Time Students (UME, DE, UG, PG)</h3> 24 <br /> 25 22 26 <table> 23 27 <tr class="odd ajaxtd"> … … 38 42 <td width="80px"> <span tal:content="d/id" /> </td> 39 43 <td width="80px" align="right"> 40 <span tal:content="d/total " />44 <span tal:content="d/total_ft" /> 41 45 </td> 42 46 <td width="80px" align="right"> 43 <span tal:content="d/admitted " />44 (<span tal:content="d/admitted_ percent" />%)47 <span tal:content="d/admitted_ft" /> 48 (<span tal:content="d/admitted_ft_percent" />%) 45 49 </td> 46 50 <td width="80px" align="right"> 47 <span tal:content="d/objection_raised " />48 (<span tal:content="d/objection_raised_ percent" />%)51 <span tal:content="d/objection_raised_ft" /> 52 (<span tal:content="d/objection_raised_ft_percent" />%) 49 53 </td> 50 54 <td width="80px" align="right"> 51 <span tal:content="d/clearance_pin_entered " />52 (<span tal:content="d/clearance_pin_entered_ percent" />%)55 <span tal:content="d/clearance_pin_entered_ft" /> 56 (<span tal:content="d/clearance_pin_entered_ft_percent" />%) 53 57 </td> 54 58 <td width="80px" align="right"> 55 <span tal:content="d/clearance_requested " />56 (<span tal:content="d/clearance_requested_ percent" />%)59 <span tal:content="d/clearance_requested_ft" /> 60 (<span tal:content="d/clearance_requested_ft_percent" />%) 57 61 </td> 58 62 <td width="80px" align="right"> 59 <span tal:content="d/cleared_and_validated " />60 (<span tal:content="d/cleared_and_validated_ percent" />%)63 <span tal:content="d/cleared_and_validated_ft" /> 64 (<span tal:content="d/cleared_and_validated_ft_percent" />%) 61 65 </td> 62 66 <td width="80px" align="right"> 63 <span tal:content="d/school_fee_paid " />64 (<span tal:content="d/school_fee_paid_ percent" />%)67 <span tal:content="d/school_fee_paid_ft" /> 68 (<span tal:content="d/school_fee_paid_ft_percent" />%) 65 69 </td> 66 70 <td width="80px" align="right"> 67 <span tal:content="d/courses_registered " />68 (<span tal:content="d/courses_registered_ percent" />%)71 <span tal:content="d/courses_registered_ft" /> 72 (<span tal:content="d/courses_registered_ft_percent" />%) 69 73 </td> 70 74 <td width="80px" align="right"> 71 <span tal:content="d/courses_validated " />72 (<span tal:content="d/courses_validated_ percent" />%)75 <span tal:content="d/courses_validated_ft" /> 76 (<span tal:content="d/courses_validated_ft_percent" />%) 73 77 </td> 74 78 75 79 </tr> 76 80 </table> 81 82 <h3>Part-Time Students (DE, UG, PG)</h3> 83 <br /> 84 85 <table> 86 <tr class="odd ajaxtd"> 87 <th >Faculty</th> 88 <th align="right">Total New</th> 89 <th align="right">AD</th> 90 <th align="right">OR</th> 91 <th align="right">CPE</th> 92 <th align="right">CR</th> 93 <th align="right">VC</th> 94 <th align="right">SFP</th> 95 <th align="right">CLR</th> 96 <th align="right">CLV</th> 97 98 </tr> 99 <tr tal:repeat="d faculties" 100 tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')"> 101 <td width="80px"> <span tal:content="d/id" /> </td> 102 <td width="80px" align="right"> 103 <span tal:content="d/total_pt" /> 104 </td> 105 <td width="80px" align="right"> 106 <span tal:content="d/admitted_pt" /> 107 (<span tal:content="d/admitted_pt_percent" />%) 108 </td> 109 <td width="80px" align="right"> 110 <span tal:content="d/objection_raised_pt" /> 111 (<span tal:content="d/objection_raised_pt_percent" />%) 112 </td> 113 <td width="80px" align="right"> 114 <span tal:content="d/clearance_pin_entered_pt" /> 115 (<span tal:content="d/clearance_pin_entered_pt_percent" />%) 116 </td> 117 <td width="80px" align="right"> 118 <span tal:content="d/clearance_requested_pt" /> 119 (<span tal:content="d/clearance_requested_pt_percent" />%) 120 </td> 121 <td width="80px" align="right"> 122 <span tal:content="d/cleared_and_validated_pt" /> 123 (<span tal:content="d/cleared_and_validated_pt_percent" />%) 124 </td> 125 <td width="80px" align="right"> 126 <span tal:content="d/school_fee_paid_pt" /> 127 (<span tal:content="d/school_fee_paid_pt_percent" />%) 128 </td> 129 <td width="80px" align="right"> 130 <span tal:content="d/courses_registered_pt" /> 131 (<span tal:content="d/courses_registered_pt_percent" />%) 132 </td> 133 <td width="80px" align="right"> 134 <span tal:content="d/courses_validated_pt" /> 135 (<span tal:content="d/courses_validated_pt_percent" />%) 136 </td> 137 138 </tr> 139 </table> 140 141 142 77 143 <br /> 78 144 <table> -
WAeUP_SRP/trunk/skins/waeup_student/statistics_ret_view.pt
r1767 r2067 20 20 <br /> 21 21 <span tal:condition="not:isAnon"> 22 23 <h3>Full-Time Students (UME, DE, UG, PG)</h3> 24 <br /> 25 22 26 <table> 23 27 <tr class="odd ajaxtd"> … … 34 38 <td width="80px"> <span tal:content="d/id" /> </td> 35 39 <td width="80px" align="right"> 36 <span tal:content="d/total " />40 <span tal:content="d/total_ft" /> 37 41 </td> 38 42 <td width="80px" align="right"> 39 <span tal:content="d/returning " />40 (<span tal:content="d/returning_ percent" />%)43 <span tal:content="d/returning_ft" /> 44 (<span tal:content="d/returning_ft_percent" />%) 41 45 </td> 42 46 <td width="80px" align="right"> 43 <span tal:content="d/school_fee_paid " />44 (<span tal:content="d/school_fee_paid_ percent" />%)47 <span tal:content="d/school_fee_paid_ft" /> 48 (<span tal:content="d/school_fee_paid_ft_percent" />%) 45 49 </td> 46 50 <td width="80px" align="right"> 47 <span tal:content="d/courses_registered " />48 (<span tal:content="d/courses_registered_ percent" />%)51 <span tal:content="d/courses_registered_ft" /> 52 (<span tal:content="d/courses_registered_ft_percent" />%) 49 53 </td> 50 54 <td width="80px" align="right"> 51 <span tal:content="d/courses_validated " />52 (<span tal:content="d/courses_validated_ percent" />%)55 <span tal:content="d/courses_validated_ft" /> 56 (<span tal:content="d/courses_validated_ft_percent" />%) 53 57 </td> 54 58 55 59 </tr> 56 60 </table> 61 62 <h3>Part-Time Students (DE, UG, PG)</h3> 63 <br /> 64 65 <table> 66 <tr class="odd ajaxtd"> 67 <th >Faculty</th> 68 <th align="right">Total</th> 69 <th align="right">RET</th> 70 <th align="right">SFP</th> 71 <th align="right">CLR</th> 72 <th align="right">CLV</th> 73 74 </tr> 75 <tr tal:repeat="d faculties" 76 tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')"> 77 <td width="80px"> <span tal:content="d/id" /> </td> 78 <td width="80px" align="right"> 79 <span tal:content="d/total_pt" /> 80 </td> 81 <td width="80px" align="right"> 82 <span tal:content="d/returning_pt" /> 83 (<span tal:content="d/returning_pt_percent" />%) 84 </td> 85 <td width="80px" align="right"> 86 <span tal:content="d/school_fee_paid_pt" /> 87 (<span tal:content="d/school_fee_paid_pt_percent" />%) 88 </td> 89 <td width="80px" align="right"> 90 <span tal:content="d/courses_registered_pt" /> 91 (<span tal:content="d/courses_registered_pt_percent" />%) 92 </td> 93 <td width="80px" align="right"> 94 <span tal:content="d/courses_validated_pt" /> 95 (<span tal:content="d/courses_validated_pt_percent" />%) 96 </td> 97 98 </tr> 99 </table> 100 101 57 102 <br /> 58 103 <table>
Note: See TracChangeset for help on using the changeset viewer.