Index: WAeUP_SRP/trunk/skins/waeup_student/getStudentStatistics.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getStudentStatistics.py	(revision 1110)
+++ WAeUP_SRP/trunk/skins/waeup_student/getStudentStatistics.py	(revision 1112)
@@ -23,11 +23,57 @@
 dep = {}
 dep['id'] = "All"
-dep['students'] = len(context.students_catalog())
-dep['clearance_pin_entered'] = len(aq_portal(Eq('review_state','clearance_pin_entered')))
-dep['clearance_requested'] = len(aq_portal(Eq('review_state','clearance_requested')))
-dep['cleared_and_validated'] = len(aq_portal(Eq('review_state','cleared_and_validated')))
-dep['objection_raised'] = len(aq_portal(Eq('review_state','objection_raised')))
+total = len(context.students_catalog())
+dep['students'] = total
+cpe_res = context.portal_catalog(review_state ='clearance_pin_entered')
+cpe_ids = [r.getId for r in cpe_res]
+cpe = len(cpe_res)
+dep['clearance_pin_entered'] = cpe
+dep['clearance_pin_entered_percent'] = (cpe*100/total)
+cr_res = context.portal_catalog(review_state='clearance_requested')
+cr_ids = [r.getId for r in cr_res]
+cr = len(cr_res)
+dep['clearance_requested'] = cr
+dep['clearance_requested_percent'] = (cr*100/total)
+cav_res = context.portal_catalog(review_state ='cleared_and_validated')
+cav_ids = [r.getId for r in cav_res]
+cav = len(cav_res)
+dep['cleared_and_validated'] = cav
+dep['cleared_and_validated_percent'] = (cav*100/total)
+or_res = context.portal_catalog(review_state='objection_raised')
+or_ids = [r.getId for r in or_res]
+ora = len(or_res)
+dep['objection_raised'] = ora
+dep['objection_raised_percent'] = (ora*100/total)
 l.append(dep)
+fs = context.portal_catalog(portal_type="Faculty")
+#from Products.zdb import set_trace;set_trace()
+for fid in [f.getId for f in fs]:
+    dep = {}
+    dep['id'] = fid
+    fquery = Eq('portal_type','Faculty')
+    fac_res = context.students_catalog(faculty=fid)
+    fac_ids = [r.id for r in fac_res]
+    total = len(fac_res)
+    dep['students'] = total
+    cpe = len([s for s in fac_ids if s in cpe_ids])
+    dep['clearance_pin_entered'] = cpe
+    dep['clearance_pin_entered_percent'] = 0
+    if total:
+        dep['clearance_pin_entered_percent'] = (cpe*100/total)
+    cr = len([s for s in fac_ids if s in cr_ids])
+    dep['clearance_requested'] = cr
+    dep['clearance_requested_percent'] = 0
+    if total:
+        dep['clearance_requested_percent'] = (cr*100/total)
+    cav = len([s for s in fac_ids if s in cav_ids])
+    dep['cleared_and_validated'] = cav 
+    dep['cleared_and_validated_percent'] = 0
+    if total:
+        dep['cleared_and_validated_percent'] = (cav*100/total)
+    ora = len([s for s in fac_ids if s in or_ids])
+    dep['objection_raised'] = ora
+    dep['objection_raised_percent'] = 0
+    if total:
+        dep['objection_raised_percent'] = (ora*100/total)
+    l.append(dep)
 return l
-
-
Index: WAeUP_SRP/trunk/skins/waeup_student/statistics_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/statistics_view.pt	(revision 1110)
+++ WAeUP_SRP/trunk/skins/waeup_student/statistics_view.pt	(revision 1112)
@@ -17,5 +17,5 @@
         <table>
           <tr class="odd ajaxtd">
-            <th >Department</th>
+            <th >Faculty</th>
             <th align="right">Students</th>
             <th align="right">OR</th>
@@ -26,10 +26,24 @@
           <tr tal:repeat="d departments"
               tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
-            <td width="80px"> <span tal:content="d/id" /> </td>
-            <td width="80px" align="right" tal:content="d/students" />
-            <td width="80px" align="right" tal:content="d/objection_raised" />
-            <td width="80px" align="right" tal:content="d/clearance_pin_entered" />
-            <td width="80px" align="right" tal:content="d/clearance_requested" />
-            <td width="80px" align="right" tal:content="d/cleared_and_validated" />
+              <td width="80px"> <span tal:content="d/id" /> </td>
+              <td width="80px" align="right">
+                <span tal:content="d/students" />
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/objection_raised" />
+                (<span tal:content="d/objection_raised_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/clearance_pin_entered" />
+                (<span tal:content="d/clearance_pin_entered_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/clearance_requested" />
+                (<span tal:content="d/clearance_requested_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/cleared_and_validated" />
+                (<span tal:content="d/cleared_and_validated_percent" />%)
+              </td>
           </tr>
         </table>
