Index: /WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py	(revision 2067)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py	(revision 2068)
@@ -20,5 +20,8 @@
     return 'Not allowed'
 
-entry_sessions = ('06','6')
+entry_sessions = ('-1','06','6')
+
+# students with entry_session None (-1) are interprteted as new AND returning students if they are 
+# in either of the last three states
 
 new_states =      ('admitted',
@@ -46,8 +49,8 @@
 dict['title'] = 'All Faculties'
 
-res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time)
+res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time, review_state = new_states)
 dict['total_ft'] = len(res_ft)
 
-res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time)
+res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time, review_state = new_states)
 dict['total_pt'] = len(res_pt)
 
Index: /WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py	(revision 2067)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py	(revision 2068)
@@ -20,5 +20,5 @@
     return 'Not allowed'
 
-entry_sessions = ('94','95','96','97','98','99','00','01','02','03','04','05','0','1','2','3','4','5')
+entry_sessions = ('-1','94','95','96','97','98','99','00','01','02','03','04','05','0','1','2','3','4','5')
 
 ret_states =      ('returning',
@@ -28,6 +28,6 @@
                    )
 full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
-part_time =       (         'de_pt','ug_pt','pg_pt')                   
-                   
+part_time =       (         'de_pt','ug_pt','pg_pt')
+
 faculties = context.portal_catalog(portal_type="Faculty")
 
@@ -41,8 +41,8 @@
 dict['title'] = 'All Faculties'
 
-res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time)
+res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time, review_state = ret_states)
 dict['total_ft'] = len(res_ft)
 
-res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time)
+res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time, review_state = ret_states)
 dict['total_pt'] = len(res_pt)
 
@@ -57,5 +57,5 @@
     else:
         dict[statepercent] = 0
-        
+
     # part_time
     res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = part_time)
@@ -66,6 +66,6 @@
         dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
     else:
-        dict[statepercent] = 0        
-        
+        dict[statepercent] = 0
+
 l.append(dict)
 
@@ -78,5 +78,5 @@
     dict['total_ft'] = len(res_ft)
     res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time)
-    dict['total_pt'] = len(res_pt)    
+    dict['total_pt'] = len(res_pt)
     for state in ret_states:
         # full_time
@@ -89,5 +89,5 @@
         else:
             dict[statepercent] = 0
-            
+
         # part_time
         res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time)
@@ -98,6 +98,6 @@
             dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
         else:
-            dict[statepercent] = 0            
-            
+            dict[statepercent] = 0
+
     l.append(dict)
 
Index: /WAeUP_SRP/trunk/skins/waeup_student/getSimpleStudentStatistics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getSimpleStudentStatistics.py	(revision 2068)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getSimpleStudentStatistics.py	(revision 2068)
@@ -0,0 +1,123 @@
+## Script (Python) "getRetStudentStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getStudentStatistics.py 1277 2007-01-11 21:11:37Z joachim $
+"""
+return Student Statistics
+"""
+
+import logging
+logger = logging.getLogger('Skins.getRetStudentStatistics')
+
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
+if not context.isStaff():
+    return 'Not allowed'
+
+#entry_sessions = ('-1','94','95','96','97','98','99','00','01','02','03','04','05','0','1','2','3','4','5')
+
+catA =      (      'school_fee_paid',
+                   'courses_registered',
+                   'courses_validated',
+                   )
+
+catB =      (      'courses_registered',
+                   'courses_validated',
+                   )
+                   
+catC =      ('admitted',
+                   'clearance_pin_entered',
+                   'objection_raised',
+                   'clearance_requested',
+                   'cleared_and_validated',
+                   )                  
+
+
+full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
+part_time =       (         'de_pt','ug_pt','pg_pt')       
+diploma   =       ('dp_ft','dp_pt')
+            
+                   
+faculties = context.portal_catalog(portal_type="Faculty")
+
+l = []
+
+fac_res = {}
+
+dict = {}
+dict['id'] = 'All Faculties'
+dict['title'] = 'All Faculties'
+
+res_Aft = context.students_catalog(review_state = catA, mode = full_time)
+dict['total_Aft'] = len(res_Aft)
+
+res_Apt = context.students_catalog(review_state = catA, mode = part_time)
+dict['total_Apt'] = len(res_Apt)
+
+res_Adp = context.students_catalog(review_state = catA, mode = diploma)
+dict['total_Adp'] = len(res_Adp)
+
+res_Bft = context.students_catalog(review_state = catB, mode = full_time)
+dict['total_Bft'] = len(res_Bft)
+
+res_Bpt = context.students_catalog(review_state = catB, mode = part_time)
+dict['total_Bpt'] = len(res_Bpt)
+
+res_Bdp = context.students_catalog(review_state = catB, mode = diploma)
+dict['total_Bdp'] = len(res_Bpt)
+
+res_Cft = context.students_catalog(review_state = catC, mode = full_time)
+dict['total_Cft'] = len(res_Cft)
+
+res_Cpt = context.students_catalog(review_state = catC, mode = part_time)
+dict['total_Cpt'] = len(res_Cpt)
+
+res_Cdp = context.students_catalog(review_state = catC, mode = diploma)
+dict['total_Cdp'] = len(res_Cdp)    
+
+   
+l.append(dict)
+
+
+for f in faculties:
+    dict = {}
+    dict['id'] = f.getId
+    dict['title'] = f.Title
+    res_Aft = context.students_catalog(faculty = f.getId, review_state = catA, mode = full_time)
+    dict['total_Aft'] = len(res_Aft)
+    
+    res_Apt = context.students_catalog(faculty = f.getId, review_state = catA, mode = part_time)
+    dict['total_Apt'] = len(res_Apt)
+
+    res_Adp = context.students_catalog(faculty = f.getId, review_state = catA, mode = diploma)
+    dict['total_Adp'] = len(res_Adp)
+
+    res_Bft = context.students_catalog(faculty = f.getId, review_state = catB, mode = full_time)
+    dict['total_Bft'] = len(res_Bft)
+
+    res_Bpt = context.students_catalog(faculty = f.getId, review_state = catB, mode = part_time)
+    dict['total_Bpt'] = len(res_Bpt)
+
+    res_Bdp = context.students_catalog(faculty = f.getId, review_state = catB, mode = diploma)
+    dict['total_Bdp'] = len(res_Bpt)
+
+    res_Cft = context.students_catalog(faculty = f.getId, review_state = catC, mode = full_time)
+    dict['total_Cft'] = len(res_Cft)
+
+    res_Cpt = context.students_catalog(faculty = f.getId, review_state = catC, mode = part_time)
+    dict['total_Cpt'] = len(res_Cpt)
+
+    res_Cdp = context.students_catalog(faculty = f.getId, review_state = catC, mode = diploma)
+    dict['total_Cdp'] = len(res_Cdp)    
+    
+    
+    l.append(dict)
+
+return l
+
+
Index: /WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 2067)
+++ /WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 2068)
@@ -18,6 +18,4 @@
       <nobr><a href="statistics_ret_view">Returning Student Statistics</a>
       &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
-      <nobr><a href="list_students">Cleared Student Export</a>
-      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
       <span tal:condition="is_so">
          <nobr><a href="view_logs">View Log Files</a>
@@ -25,5 +23,7 @@
          <nobr><a href="add_student">Add Student Record</a>        
          &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
-         <nobr><a href="paid_transfer_list">Export Transfer Students</a></nobr>    
+         <nobr><a href="paid_transfer_list">Export Transfer Students</a>
+         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+         <nobr><a href="list_students">Cleared Student Export</a></nobr>             
       </span>
       </strong>
Index: /WAeUP_SRP/trunk/skins/waeup_student/statistics_simple_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/statistics_simple_view.pt	(revision 2068)
+++ /WAeUP_SRP/trunk/skins/waeup_student/statistics_simple_view.pt	(revision 2068)
@@ -0,0 +1,111 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+  <metal:block tal:define="faculties context/getSimpleStudentStatistics;
+                        mtool here/portal_membership;
+                        member mtool/getAuthenticatedMember;">       
+
+      <span tal:condition="not: faculties">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="faculties">
+  
+      <strong>
+      <nobr><a href="search_students">Search Students</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>        
+      <nobr><a href="statistics_new_view">New Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+      </strong>     
+
+      <h3>Basic Student Statistics</h3>
+      <br />      
+      <span tal:condition="not:isAnon">
+
+  
+      
+        <table >  
+
+          <tr>
+            <th>&nbsp;</th>
+            <th style="border-style:solid; border-width:1px; border-color:black" align="center" colspan="3">Category A</th>
+
+            <th style="border-style:solid; border-width:1px; border-color:black" align="center" colspan="3">Category B</th>
+
+            <th style="border-style:solid; border-width:1px; border-color:black" align="center" colspan="3">Category C</th>
+
+
+          </tr>
+
+          <tr class="odd ajaxtd">
+            <th >Faculty</th>
+            <th align="right">FT</th>
+            <th align="right">PT</th>
+            <th align="right">DP</th>
+            <th align="right">FT</th>
+            <th align="right">PT</th>
+            <th align="right">DP</th>
+            <th align="right">FT</th>
+            <th align="right">PT</th>
+            <th align="right">DP</th>
+
+          </tr>
+          <tr tal:repeat="d faculties"
+              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td width="80px"> <span tal:content="d/id" /> </td>
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Aft" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Apt" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Adp" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Bft" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Bpt" />
+              </td>              
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Bdp" />
+              </td>      
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Cft" />
+              </td>      
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Cpt" />
+              </td>      
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Cdp" />
+              </td>                                                
+
+                                       
+
+          </tr>
+        </table>
+
+ 
+        
+        <br />
+        <table>
+
+        <tr><td>Category A: </td> <td>students who have paid their school fee</td></tr>
+        <tr><td>Category B: </td> <td>students who registered their courses online</td></tr>
+        <tr><td>Category C: </td> <td>students who have neither paid their school fee or registered their courses online</td></tr>
+          
+        </table>
+      </span>
+      </span>
+  </metal:block>      
+  </metal:main>
+</metal:body>
+      
