Index: WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 1096)
@@ -46,5 +46,5 @@
         #set_trace()
         if s_review_state in ("student_created","admitted") and\
-        a_review_state == 'created' :
+                             a_review_state == 'created' :
             wftool.doActionFor(student_app,'open')
             if student_pume is not None:
@@ -68,5 +68,5 @@
             app_doc.edit(mapping = da)
         elif s_review_state in ("admitted") and a_review_state == 'opened' and\
-        not app_doc.app_ac_pin:
+                                            not app_doc.app_ac_pin:
             jamb_reg_no = app_doc.jamb_reg_no
             for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
@@ -89,5 +89,6 @@
         elif s_review_state == "clearance_pin_entered":
             redirect_url = "%s/clearance_edit_form" % student.absolute_url()
-        redirect_url = "%s/student_index" % student.absolute_url()
+        else:
+            redirect_url = "%s/student_index" % student.absolute_url()
     else:
         logger.info('"%s", "logged in"' % (member))
Index: WAeUP_SRP/trunk/skins/waeup_default/illegal_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/illegal_view.pt	(revision 1095)
+++ 	(revision )
@@ -1,3 +1,0 @@
-<metal:html define-macro="illegal_view">
-  <span tal:define="dummy python:request.RESPONSE.redirect('%s' % context.portal_url())" />
-</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_default/illegal_view.pt_not_used
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/illegal_view.pt_not_used	(revision 1096)
+++ WAeUP_SRP/trunk/skins/waeup_default/illegal_view.pt_not_used	(revision 1096)
@@ -0,0 +1,3 @@
+<metal:html define-macro="illegal_view">
+  <span tal:define="dummy python:request.RESPONSE.redirect('%s' % context.portal_url())" />
+</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_default/illegal_view.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/illegal_view.py	(revision 1096)
+++ WAeUP_SRP/trunk/skins/waeup_default/illegal_view.py	(revision 1096)
@@ -0,0 +1,8 @@
+##parameters=
+# $Id: illegal_view.py 681 2006-10-13 06:43:39Z henrik $
+"""
+"""
+
+REQUEST = context.REQUEST
+
+return REQUEST.RESPONSE.redirect('%s' % context.portal_url())
Index: WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt	(revision 1096)
@@ -1,3 +1,7 @@
 <metal:html tal:define="info context/getStudentInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
@@ -19,3 +23,4 @@
     </metal:main>
   </metal:body>
+</metal:block>  
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt	(revision 1096)
@@ -1,3 +1,7 @@
 <metal:html tal:define="info context/getStudentInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
   <metal:body use-macro="here/waeup_content_master/macros/master">
     <metal:main fill-slot="main">
@@ -28,3 +32,4 @@
     </metal:main>
   </metal:body>
+</metal:block>    
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/admission_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/admission_form.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/admission_form.pt	(revision 1096)
@@ -1,3 +1,7 @@
 <metal:html tal:define="info context/getStudentInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
   <metal:body use-macro="here/waeup_content_master/macros/master">
     <metal:main fill-slot="main">
@@ -63,10 +67,10 @@
       <form action="." method="post" class="group">
 
-                <input  tal:condition="python:review_state!='objection_raised'" type="submit" name="raise_objection:method" value="Raise an Objection"
+                <input  tal:condition="python:review_state=='admitted'" type="submit" name="raise_objection:method" value="Raise an Objection"
                        class="destructive"
                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
                        (cpsmcat('Confirm that you want to raise an objection.'), )" 
                        />
-                <input type="submit" name="application_edit:method"
+                <input tal:condition="python:review_state in ('admitted', 'objection_raised',)" type="submit" name="application_edit:method"
                        class="context" value="Continue" 
                        />
@@ -75,3 +79,4 @@
     </metal:main>
   </metal:body>
+</metal:block>     
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/admission_rejected_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/admission_rejected_view.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/admission_rejected_view.pt	(revision 1096)
@@ -1,12 +1,7 @@
-<metal:html tal:define="info context/getStudentInfo">
-  <metal:body use-macro="here/main_template/macros/master">
-    <metal:main fill-slot="main">
-    <span tal:condition="not: info">
-      <metal:block use-macro="here/error_not_found/macros/not_found" />
-    </span>
-    <span tal:condition="info">
-      <h3>You are not admitted into the University of Benin!</h3>
-    </span>
-    </metal:main>
-  </metal:body>
-</metal:html>
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+
+    <h3>You are not admitted into the University of Benin!</h3>
+
+  </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk/skins/waeup_student/admission_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/admission_slip.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/admission_slip.pt	(revision 1096)
@@ -1,3 +1,7 @@
 <metal:html tal:define="info context/getStudentInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
@@ -53,3 +57,4 @@
     </metal:main>
   </metal:body>
+</metal:block>      
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt	(revision 1096)
@@ -1,5 +1,5 @@
 <metal:html tal:define="info context/getApplicationInfo">
   <span tal:condition="not: info">
-    <metal:block use-macro="here/illegal_view/macros/illegal_view" />
+    <span tal:content="here/illegal_view" />
   </span>
 <metal:block tal:condition="info"> 
Index: WAeUP_SRP/trunk/skins/waeup_student/application_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/application_view.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/application_view.pt	(revision 1096)
@@ -1,5 +1,5 @@
 <metal:html tal:define="info context/getStudentInfo">
   <span tal:condition="not: info">
-    <metal:block use-macro="here/illegal_view/macros/illegal_view" />
+    <span tal:content="here/illegal_view" />
   </span>
   <metal:block tal:condition="info"> 
Index: WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form.pt	(revision 1096)
@@ -2,5 +2,5 @@
 <metal:block tal:define="info context/getClearanceInfo">
   <span tal:condition="not: info">
-    <metal:block use-macro="here/illegal_view/macros/illegal_view" />
+    <span tal:content="here/illegal_view" />
   </span>
 <metal:block tal:condition="info"> 
Index: WAeUP_SRP/trunk/skins/waeup_student/clearance_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/clearance_slip.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/clearance_slip.pt	(revision 1096)
@@ -3,5 +3,5 @@
     <metal:main fill-slot="main">
       <span tal:condition="not: info">
-        <metal:block use-macro="here/error_not_found/macros/not_found" />
+        <span tal:content="here/illegal_view" />
       </span>
       <span tal:condition="info">
Index: WAeUP_SRP/trunk/skins/waeup_student/clearance_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/clearance_view.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/clearance_view.pt	(revision 1096)
@@ -3,4 +3,8 @@
                         is_student context/isStudent;
                         ">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info">                         
   <metal:body use-macro="here/waeup_content_master/macros/master">
     <metal:main fill-slot="main">
@@ -40,3 +44,4 @@
     </metal:main>
   </metal:body>
+</metal:block>      
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/contact_student_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/contact_student_form.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/contact_student_form.pt	(revision 1096)
@@ -2,4 +2,8 @@
                         info context/getStudentInfo;
                         ">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info">                         
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
@@ -73,3 +77,4 @@
     </metal:main>
   </metal:body>
+</metal:block>      
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/no_booking_allowed.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/no_booking_allowed.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/no_booking_allowed.pt	(revision 1096)
@@ -1,12 +1,8 @@
-<metal:html tal:define="info context/getStudentInfo">
-  <metal:body use-macro="here/main_template/macros/master">
-    <metal:main fill-slot="main">
-    <span tal:condition="not: info">
-      <metal:block use-macro="here/error_not_found/macros/not_found" />
-    </span>
-    <span tal:condition="info">
-      <h3>You are not eligible to book accommodation!</h3>
-    </span>
-    </metal:main>
-  </metal:body>
-</metal:html>
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+
+    <h3>You are not eligible to book accommodation!</h3>
+
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk/skins/waeup_student/objection_raised_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/objection_raised_form.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/objection_raised_form.pt	(revision 1096)
@@ -1,4 +1,8 @@
 <metal:html tal:define="info options/info|context/getStudentInfo;
                         review_state info/review_state">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info">                         
   <metal:body use-macro="here/waeup_content_master/macros/master">
     <metal:main fill-slot="main">
@@ -66,3 +70,4 @@
     </metal:main>
   </metal:body>
+</metal:block>     
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/search_students.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/search_students.py	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/search_students.py	(revision 1096)
@@ -18,8 +18,14 @@
 mtool = context.portal_membership
 member = mtool.getAuthenticatedMember()
+is_anon = mtool.isAnonymousUser()
 #roles = member.getRolesInContext(context)
 lt = context.portal_layouts
 #pr = context.portal_registration
 path_info = request.get('PATH_INFO').split('/')
+
+allowed = True
+if is_anon:
+    allowed = False
+
 try:
     from Products.AdvancedQuery import Eq, Between, Le,In
@@ -91,5 +97,5 @@
                              info = user_info,
                              students = [],
-                             allowed = True,
+                             allowed = allowed,
                              )
 what = ds.get('search_mode')
@@ -112,5 +118,5 @@
                              info = user_info,
                              students = items,
-                             allowed = True,
+                             allowed = allowed,
                              )
 st_queries = ('jamb_reg_no','matric_no','name')
@@ -129,5 +135,5 @@
                              psm = "No student found!",
                              students = [],
-                             allowed = True,
+                             allowed = allowed,
                              )
     elif what == "department":
@@ -154,5 +160,5 @@
     #set_trace()
     only_review = False
-    query = In('faculty',faculties) | In('department',departments) 
+    query = In('faculty',faculties) | In('department',departments)
     res = aq_students(query)
     search_set = [r.id for r in res]
@@ -203,5 +209,5 @@
                              info = user_info,
                              students = students,
-                             allowed = True,
+                             allowed = allowed,
                              co_view = co_view,
                              )
@@ -210,6 +216,6 @@
                              info = user_info,
                              students = students,
-                             allowed = True,
-                             )
-
-
+                             allowed = allowed,
+                             )
+
+
Index: WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 1096)
@@ -15,5 +15,5 @@
     <metal:main fill-slot="main">
       <span tal:condition="not: allowed">
-        <metal:block use-macro="here/error_not_found/macros/not_found" />
+        <span tal:content="here/illegal_view" />
       </span>
       <span tal:condition="allowed" tal:omit-tag="">
Index: WAeUP_SRP/trunk/skins/waeup_student/statistics_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/statistics_view.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/statistics_view.pt	(revision 1096)
@@ -3,4 +3,8 @@
                         member mtool/getAuthenticatedMember;"
                         >
+  <span tal:condition="not: departments">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="departments">                         
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
@@ -38,3 +42,4 @@
     </metal:main>
   </metal:body>
+</metal:block>      
 </metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/student_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/student_view.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/student_view.pt	(revision 1096)
@@ -6,5 +6,5 @@
     <metal:main fill-slot="main">
       <span tal:condition="not: info">
-        <metal:block use-macro="here/error_not_found/macros/not_found" />
+        <span tal:content="here/illegal_view" />
       </span>
       <span tal:condition="info"
Index: WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt	(revision 1095)
+++ WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt	(revision 1096)
@@ -1,6 +1,10 @@
-<metal:html tal:define="info context/getStudyCourseInfo;
-            is_so context/isSectionOfficer;
-            s_info context/getStudentInfo;"
-            >
+<metal:html tal:define="is_so context/isSectionOfficer;
+                        s_info context/getStudentInfo;"
+                        >
+  <span tal:condition="not: s_info">
+    <span tal:content="here/illegal_view" />
+  </span>
+  <metal:block tal:condition="s_info">             
+  <span tal:define="info context/getStudyCourseInfo">
   <metal:body use-macro="here/waeup_content_master/macros/master">
     <metal:block fill-slot="header">
@@ -91,6 +95,7 @@
       </form>
     </metal:main>
-    
-    <metal:sub fill-slot="sub"/>
+ 
   </metal:body>
+  </span>  
+  </metal:block>
 </metal:html>
