- Timestamp:
- 27 Jul 2007, 13:56:17 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py
r2067 r2068 20 20 return 'Not allowed' 21 21 22 entry_sessions = (' 94','95','96','97','98','99','00','01','02','03','04','05','0','1','2','3','4','5')22 entry_sessions = ('-1','94','95','96','97','98','99','00','01','02','03','04','05','0','1','2','3','4','5') 23 23 24 24 ret_states = ('returning', … … 28 28 ) 29 29 full_time = ('ume_ft','de_ft','ug_ft','pg_ft') 30 part_time = ( 'de_pt','ug_pt','pg_pt') 31 30 part_time = ( 'de_pt','ug_pt','pg_pt') 31 32 32 faculties = context.portal_catalog(portal_type="Faculty") 33 33 … … 41 41 dict['title'] = 'All Faculties' 42 42 43 res_ft = context.students_catalog(entry_session = entry_sessions, mode = full_time )43 res_ft = context.students_catalog(entry_session = entry_sessions, mode = full_time, review_state = ret_states) 44 44 dict['total_ft'] = len(res_ft) 45 45 46 res_pt = context.students_catalog(entry_session = entry_sessions, mode = part_time )46 res_pt = context.students_catalog(entry_session = entry_sessions, mode = part_time, review_state = ret_states) 47 47 dict['total_pt'] = len(res_pt) 48 48 … … 57 57 else: 58 58 dict[statepercent] = 0 59 59 60 60 # part_time 61 61 res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state, mode = part_time) … … 66 66 dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt']) 67 67 else: 68 dict[statepercent] = 0 69 68 dict[statepercent] = 0 69 70 70 l.append(dict) 71 71 … … 78 78 dict['total_ft'] = len(res_ft) 79 79 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time) 80 dict['total_pt'] = len(res_pt) 80 dict['total_pt'] = len(res_pt) 81 81 for state in ret_states: 82 82 # full_time … … 89 89 else: 90 90 dict[statepercent] = 0 91 91 92 92 # part_time 93 93 res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time) … … 98 98 dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt']) 99 99 else: 100 dict[statepercent] = 0 101 100 dict[statepercent] = 0 101 102 102 l.append(dict) 103 103
Note: See TracChangeset for help on using the changeset viewer.