Changeset 3774 for WAeUP_SRP/trunk
- Timestamp:
- 19 Nov 2008, 08:06:27 (16 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_statistics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_statistics/getNewStudentStatistics.py
r2705 r3774 38 38 full_time = ('ume_ft','de_ft','ug_ft','pg_ft') 39 39 part_time = ( 'de_pt','ug_pt','pg_pt') 40 diploma = ('dp_ft','dp_pt') 40 41 41 42 faculties = context.portal_catalog(portal_type="Faculty") … … 55 56 res_pt = context.students_catalog(entry_session = entry_sessions, mode = part_time, review_state = new_states) 56 57 dict['total_pt'] = len(res_pt) 58 59 res_dp = context.students_catalog(entry_session = entry_sessions, mode = diploma, review_state = new_states) 60 dict['total_dp'] = len(res_dp) 57 61 58 62 for state in new_states: … … 76 80 else: 77 81 dict[statepercent] = 0 82 83 # diploma 84 res_dp = context.students_catalog(entry_session = entry_sessions, review_state = state, mode = diploma) 85 state_dp = state + '_dp' 86 dict[state_dp] = len(res_dp) 87 statepercent = state+'_dp_percent' 88 if dict['total_dp'] > 0: 89 dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp']) 90 else: 91 dict[statepercent] = 0 78 92 79 93 l.append(dict) … … 88 102 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time) 89 103 dict['total_pt'] = len(res_pt) 104 res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = diploma) 105 dict['total_dp'] = len(res_dp) 90 106 for state in new_states: 91 107 # full_time … … 108 124 else: 109 125 dict[statepercent] = 0 126 127 # diploma 128 res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = diploma) 129 state_dp = state + '_dp' 130 dict[state_dp] = len(res_dp) 131 statepercent = state+'_dp_percent' 132 if dict['total_dp'] > 0: 133 dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp']) 134 else: 135 dict[statepercent] = 0 110 136 111 137 l.append(dict) -
WAeUP_SRP/trunk/skins/waeup_statistics/getRetStudentStatistics.py
r2705 r3774 20 20 return 'Not allowed' 21 21 22 entry_sessions = ('','-1','94','95','96','97','98','99','00','01','02','03','04','05','06','0','1','2','3','4','5','6') 22 current_session = context.getSessionId()[0] 23 23 24 current_session = context.getSessionId()[0] 24 25 26 range1 = range(94,100,1) 27 range2 = range(0,int(current_session),1) 28 missing_values = ['','-1'] 29 entry_sessions = missing_values + [str(k) for k in range1+range2] + ['0'+str(k) for k in range2] 30 31 #entry_sessions = ('','-1','94','95','96','97','98','99','00','01','02','03','04','05','06','07','0','1','2','3','4','5','6','7') 25 32 26 33 ret_states = ('returning', … … 31 38 full_time = ('ume_ft','de_ft','ug_ft','pg_ft') 32 39 part_time = ( 'de_pt','ug_pt','pg_pt') 40 diploma = ('dp_ft','dp_pt') 33 41 34 42 faculties = context.portal_catalog(portal_type="Faculty") … … 48 56 res_pt = context.students_catalog(entry_session = entry_sessions, mode = part_time, review_state = ret_states) 49 57 dict['total_pt'] = len(res_pt) 58 59 res_dp = context.students_catalog(entry_session = entry_sessions, mode = diploma, review_state = ret_states) 60 dict['total_dp'] = len(res_dp) 50 61 51 62 for state in ret_states: … … 69 80 else: 70 81 dict[statepercent] = 0 82 83 # diploma 84 res_dp = context.students_catalog(entry_session = entry_sessions, review_state = state, mode = diploma, session = current_session) 85 state_dp = state + '_dp' 86 dict[state_dp] = len(res_dp) 87 statepercent = state+'_dp_percent' 88 if dict['total_dp'] > 0: 89 dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp']) 90 else: 91 dict[statepercent] = 0 71 92 72 93 l.append(dict) … … 81 102 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time) 82 103 dict['total_pt'] = len(res_pt) 104 res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = diploma) 105 dict['total_dp'] = len(res_dp) 83 106 for state in ret_states: 84 107 # full_time … … 101 124 else: 102 125 dict[statepercent] = 0 126 127 # diploma 128 res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = diploma, session = current_session) 129 state_dp = state + '_dp' 130 dict[state_dp] = len(res_dp) 131 statepercent = state+'_dp_percent' 132 if dict['total_dp'] > 0: 133 dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp']) 134 else: 135 dict[statepercent] = 0 136 103 137 104 138 l.append(dict) -
WAeUP_SRP/trunk/skins/waeup_statistics/statistics_new_view.pt
r2705 r3774 140 140 </table> 141 141 142 <h3>Diploma Students (full-time and part-time)</h3> 143 <br /> 144 145 <table> 146 <tr class="odd ajaxtd"> 147 <th >Faculty</th> 148 <th align="right">Total New</th> 149 <th align="right">AD</th> 150 <th align="right">OR</th> 151 <th align="right">CPE</th> 152 <th align="right">CR</th> 153 <th align="right">VC</th> 154 <th align="right">SFP</th> 155 <th align="right">CLR</th> 156 <th align="right">CLV</th> 157 158 </tr> 159 <tr tal:repeat="d faculties" 160 tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')"> 161 <td width="80px"> <span tal:content="d/id" /> </td> 162 <td width="80px" align="right"> 163 <span tal:content="d/total_dp" /> 164 </td> 165 <td width="80px" align="right"> 166 <span tal:content="d/admitted_dp" /> 167 (<span tal:content="d/admitted_dp_percent" />%) 168 </td> 169 <td width="80px" align="right"> 170 <span tal:content="d/objection_raised_dp" /> 171 (<span tal:content="d/objection_raised_dp_percent" />%) 172 </td> 173 <td width="80px" align="right"> 174 <span tal:content="d/clearance_pin_entered_dp" /> 175 (<span tal:content="d/clearance_pin_entered_dp_percent" />%) 176 </td> 177 <td width="80px" align="right"> 178 <span tal:content="d/clearance_requested_dp" /> 179 (<span tal:content="d/clearance_requested_dp_percent" />%) 180 </td> 181 <td width="80px" align="right"> 182 <span tal:content="d/cleared_and_validated_dp" /> 183 (<span tal:content="d/cleared_and_validated_dp_percent" />%) 184 </td> 185 <td width="80px" align="right"> 186 <span tal:content="d/school_fee_paid_dp" /> 187 (<span tal:content="d/school_fee_paid_dp_percent" />%) 188 </td> 189 <td width="80px" align="right"> 190 <span tal:content="d/courses_registered_dp" /> 191 (<span tal:content="d/courses_registered_dp_percent" />%) 192 </td> 193 <td width="80px" align="right"> 194 <span tal:content="d/courses_validated_dp" /> 195 (<span tal:content="d/courses_validated_dp_percent" />%) 196 </td> 197 198 </tr> 199 </table> 142 200 143 201 -
WAeUP_SRP/trunk/skins/waeup_statistics/statistics_ret_view.pt
r3171 r3774 101 101 </tr> 102 102 </table> 103 104 <h3>Diploma Students (full-time and part-time)</h3> 105 <br /> 106 107 <table> 108 <tr class="odd ajaxtd"> 109 <th >Faculty</th> 110 <th align="right">Total</th> 111 112 <th align="right">SFP</th> 113 <th align="right">CLR</th> 114 <th align="right">CLV</th> 115 <th align="right">RET</th> 116 117 </tr> 118 <tr tal:repeat="d faculties" 119 tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')"> 120 <td width="80px"> <span tal:content="d/id" /> </td> 121 <td width="80px" align="right"> 122 <span tal:content="d/total_dp" /> 123 </td> 124 <td width="80px" align="right"> 125 <span tal:content="d/school_fee_paid_dp" /> 126 (<span tal:content="d/school_fee_paid_dp_percent" />%) 127 </td> 128 <td width="80px" align="right"> 129 <span tal:content="d/courses_registered_dp" /> 130 (<span tal:content="d/courses_registered_dp_percent" />%) 131 </td> 132 <td width="80px" align="right"> 133 <span tal:content="d/courses_validated_dp" /> 134 (<span tal:content="d/courses_validated_dp_percent" />%) 135 </td> 136 <td width="80px" align="right"> 137 <span tal:content="d/returning_dp" /> 138 (<span tal:content="d/returning_dp_percent" />%) 139 </td> 140 141 </tr> 142 </table> 103 143 104 144
Note: See TracChangeset for help on using the changeset viewer.