Index: WAeUP_SRP/trunk/Students.py
===================================================================
--- WAeUP_SRP/trunk/Students.py	(revision 784)
+++ WAeUP_SRP/trunk/Students.py	(revision 785)
@@ -295,4 +295,16 @@
                 no_import.append(format % jamb)
                 continue
+            cert_id = jamb.get(csv_d['jamb_first_cos']).upper()
+            res = self.portal_catalog({'portal_type': "Certificate",
+                                     'id': cert_id })
+            if len(res) < 1:
+                em = 'No Certificate with ID %s \n' % cert_id
+                logger.info(em)
+                no_import.append(em)
+                no_import.append(format % jamb)
+                continue
+            cert = res[0].getObject()
+            cert_path = res[0].getPath()
+            cert_doc = cert.getContent()
             jamb_name = jamb.get(csv_d['jamb_lastname'])
             jamb_name.replace('>','')
@@ -346,9 +358,34 @@
             #wftool.doActionFor(pume,'close')
             pume.manage_setLocalRoles(sid, ['Owner',])
+            #
+            # Study Course
+            #
+            student.invokeFactory('StudentStudyCourse','study_course')
+            study_course = student.study_course
+            dsc = {}
+            from_certificate = ['title',
+                               'max_elect',
+                               'max_pass',
+                               'n_core',
+                               'nr_years',
+                               'probation_credits',
+                               'promotion_credits',
+                               'start_level',
+                              ]
+            for f in from_certificate:
+                dsc[f] = getattr(cert_doc,f)
+            cpl = cert_path.split('/')
+            dsc['faculty'] = cpl[-4]
+            dsc['department'] = cpl[-3]
+            dsc['study_course'] = cert_id
+            dsc['entry_session'] = jamb.get(csv_d['session'])
+            study_course.getContent().edit(mapping=dsc)
             student.getContent().createSubObjects()
             if dp['pume_tot_score']>49:
                 wftool.doActionFor(student,'pume_pass')
+                wftool.doActionFor(student,'admit')
             else:
                 wftool.doActionFor(student,'pume_fail')
+                wftool.doActionFor(student,'finally_reject')
             if len(no_import) > 1:
                 open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write(
Index: WAeUP_SRP/trunk/profiles/default/actionicons.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/actionicons.xml	(revision 784)
+++ WAeUP_SRP/trunk/profiles/default/actionicons.xml	(revision 785)
@@ -241,6 +241,6 @@
               title="Display PUME Result" priority="2"
               icon_expr="zoom.png"/>
- <action-icon category="student" action_id="request_clearance"
-              title="Apply for PUME" priority="3"
+ <action-icon category="student" action_id="check_admission"
+              title="Check if admitted" priority="3"
               icon_expr="bell.png"/>
  <action-icon category="student" action_id="reserve_accommodation"
Index: WAeUP_SRP/trunk/profiles/default/actions.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/actions.xml	(revision 784)
+++ WAeUP_SRP/trunk/profiles/default/actions.xml	(revision 785)
@@ -144,9 +144,9 @@
    <permission>View</permission>
   </action>
-  <action title="Request Clearance" action_id="request_clearance"
+  <action title="Check Admission" action_id="check_admission"
      category="student" condition_expr="not:member"
-     url_expr="string:${portal_url}/request_clearance"
-     visible="True">
-   <permission>False</permission>
+     url_expr="string:${portal_url}/check_admission"
+     visible="True">
+   <permission>View</permission>
   </action>
   <action title="Book Hostel" action_id="reserve_accommodation"
Index: WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml	(revision 784)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml	(revision 785)
@@ -35,4 +35,20 @@
  <property name="reference">jamb_reg_no</property>
 </widget>
+<widget name="defer_date" meta_type="DateTime Widget">
+ <property name="title">Defer Date</property>
+ <property name="fields">
+  <element value="defer_date"/>
+ </property>
+ <property name="label">Defer Date</property>
+ <property name="label_edit">Defer Date</property>
+ <property name="readonly_layout_modes">
+  <element value="edit"/>
+ </property>
+ <property name="hidden_layout_modes">
+  <element value="create"/>
+ </property>
+ <property name="hidden_readonly_layout_modes"/>
+ <property name="view_format">iso8601_medium_easy</property>
+</widget>
  <widget name="entry_mode" meta_type="String Widget">
   <property name="title">Mode of Entry</property>
Index: WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml	(revision 784)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml	(revision 785)
@@ -39,4 +39,20 @@
   <property name="reference">jamb_reg_no</property>
   </widget>
+<widget name="defer_date" meta_type="DateTime Widget">
+ <property name="title">Defer Date</property>
+ <property name="fields">
+  <element value="defer_date"/>
+ </property>
+ <property name="label">Defer Date</property>
+ <property name="label_edit">Defer Date</property>
+ <property name="readonly_layout_modes">
+  <element value="edit"/>
+ </property>
+ <property name="hidden_layout_modes">
+  <element value="create"/>
+ </property>
+ <property name="hidden_readonly_layout_modes"/>
+ <property name="view_format">iso8601_medium_easy</property>
+</widget>
  <widget name="entry_mode" meta_type="String Widget">
   <property name="title">Mode of Entry</property>
Index: WAeUP_SRP/trunk/profiles/default/schemas/student_application.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/schemas/student_application.xml	(revision 784)
+++ WAeUP_SRP/trunk/profiles/default/schemas/student_application.xml	(revision 785)
@@ -6,5 +6,6 @@
  <field name="app_mobile" meta_type="CPS String Field"/>
  <field name="entry_mode" meta_type="CPS String Field"/>
- <field name="jamb_age" meta_type="CPS Int Field"/>
+  <field name="defer_date" meta_type="CPS DateTime Field"/>
+  <field name="jamb_age" meta_type="CPS Int Field"/>
  <field name="jamb_first_cos" meta_type="CPS String Field"/>
  <field name="jamb_first_uni" meta_type="CPS String Field"/>
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml	(revision 784)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml	(revision 785)
@@ -33,4 +33,5 @@
   <permission-map name="View" acquired="True">
    <permission-role>Anonymous</permission-role>
+   <permission-role>Owner</permission-role>
   </permission-map>
   <permission-map name="WAeUPModify own content"
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 784)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 785)
@@ -17,4 +17,7 @@
   <exit-transition transition_id="defer"/>
   <exit-transition transition_id="enter_clearance_pin"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="application_pin_entered" title="">
@@ -25,4 +28,5 @@
   </permission-map>
   <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
   </permission-map>
  </state>
@@ -35,4 +39,7 @@
  <state state_id="cleared_and_validated" title="">
   <exit-transition transition_id="create_content"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="clearance_requested" title="">
@@ -45,13 +52,25 @@
  <state state_id="deferred" title="">
   <exit-transition transition_id="enter_clearance_pin"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="finally_rejected" title="">
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="pume_failed" title="">
   <exit-transition transition_id="finally_reject"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="pume_passed" title="">
   <exit-transition transition_id="admit"/>
   <exit-transition transition_id="reject_admission"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="student_created" title="">
@@ -62,4 +81,7 @@
   <exit-transition transition_id="pume_fail"/>
   <exit-transition transition_id="pume_pass"/>  
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <transition transition_id="admit" title=""
Index: WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 784)
+++ WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 785)
@@ -60,10 +60,10 @@
                 da['app_ac_date'] = current
                 app_doc.edit(mapping = da)
-                dc = {}
-                dc['clr_ac_pin'] = pin
-                dc['entry_date'] = current
-                dc['session'] = "%s" % current.year()
-                dc['lga'] = app_doc.jamb_lga
-                info['clear_doc'].edit(mapping = dc)
+##                dc = {}
+##                dc['clr_ac_pin'] = pin
+##                dc['entry_date'] = current
+##                dc['session'] = "%s" % current.year()
+##                dc['lga'] = app_doc.jamb_lga
+##                info['clear_doc'].edit(mapping = dc)
         elif "Manager" in member.getRoles():
             pass
Index: WAeUP_SRP/trunk/skins/waeup_default/portlet_session_info.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/portlet_session_info.pt	(revision 784)
+++ WAeUP_SRP/trunk/skins/waeup_default/portlet_session_info.pt	(revision 785)
@@ -6,5 +6,5 @@
   <tal:block condition="context/isStudent">
        <strong> 
-         <span tal:condition="info/is_student" tal:content="python:info['student_doc'].Title()" /> 
+         <span tal:condition="info/is_student|nothing" tal:content="python:info['student_doc'].Title()" /> 
        </strong>
   </tal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/check_admission.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/check_admission.py	(revision 785)
+++ WAeUP_SRP/trunk/skins/waeup_student/check_admission.py	(revision 785)
@@ -0,0 +1,55 @@
+##parameters=REQUEST
+# $Id: apply_admission.py 649 2006-10-11 06:24:39Z joachim $
+"""
+request Clearance
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+
+type_name = 'StudentApplication'
+ti = context.portal_types[type_name]
+REQUEST.set('type_name',type_name)
+redirect = REQUEST.RESPONSE.redirect
+wf = context.portal_workflow
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'student_application_fe',
+                      schema_id= 'student_application',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "check_admission",
+                      button = "Check Admission",
+                      )
+if psm == 'invalid':
+    return context.check_admission_pin_form(rendered = res,
+                                 psm = "Please correct your input.",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.check_admission_pin_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = ds.get('s_id')
+    student = getattr(context.campus.students, s_id)
+    review_state = wf.getInfoFor(student,'review_state',None)
+    if review_state == "finally_rejected":
+        url = "%s/campus/students/%s/pume/finally_rejected_view" % (context.portal_url(),s_id)
+        return redirect(url)
+    pin = str(ds.get('app_ac_pin'))
+    return redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s"
+          % (context.absolute_url(),s_id,pin.split('-')[2],pin))
+return
Index: WAeUP_SRP/trunk/skins/waeup_student/check_admission_pin_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/check_admission_pin_form.pt	(revision 785)
+++ WAeUP_SRP/trunk/skins/waeup_student/check_admission_pin_form.pt	(revision 785)
@@ -0,0 +1,29 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   jamb options/jamb/getContent|nothing;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Check if your admitted! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul>
+            <li>Buy an Admission Scratch Card.</li> 
+            <li>Enter your JAMB registration number and the Admission PIN above.</li> 
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/defer_admission.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/defer_admission.py	(revision 785)
+++ WAeUP_SRP/trunk/skins/waeup_student/defer_admission.py	(revision 785)
@@ -0,0 +1,26 @@
+## Script (Python) "cpsdocument_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
+"""
+defer student and print Info.
+"""
+import DateTime
+current = DateTime.DateTime()
+request = context.REQUEST
+wf = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRoles()
+
+info = context.getStudentInfo()
+
+info['app_doc'].edit(mapping={'defer_date':current,})
+wf.doActionFor(info['student'],'defer')
+return context.defer_done_view(info=info)
Index: WAeUP_SRP/trunk/skins/waeup_student/defer_done_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/defer_done_view.pt	(revision 785)
+++ WAeUP_SRP/trunk/skins/waeup_student/defer_done_view.pt	(revision 785)
@@ -0,0 +1,31 @@
+<metal:html tal:define="info options/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"
+            tal:define="review_state info/review_state">
+            
+        <h3>You defered your Study</h3>
+        <h3>My Application Record</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+              layout_mode='view', 
+              layout_id='student_application_fe')" 
+              />
+      </span>
+        <h3>My Study Course</h3>
+      <br />
+      <table tal:define="sc python: info['course_doc']">
+        <tr>
+          <td tal:content="sc/title" /> <td>ID: <span tal:content="sc/study_course" /></td>
+        </tr>
+        <tr>
+          <td tal:content="sc/title" /> <td tal:content="sc/study_course" />
+        </tr>
+      </table>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/defer_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/defer_view.pt	(revision 785)
+++ WAeUP_SRP/trunk/skins/waeup_student/defer_view.pt	(revision 785)
@@ -0,0 +1,62 @@
+<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"
+            tal:define="review_state info/review_state">
+            
+        <div style="text-align: right"
+             tal:condition="python:review_state in ('admission_applied', 'clearance_pin_entered',)">
+        <a href="" target="slip" tal:attributes="href string:application_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Application Slip
+        </a>
+        
+        </div>
+
+        <h3>My Application Record</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+              layout_mode='view', 
+              layout_id='student_application_fe')" 
+              />
+      </span>
+        <h3>My Study Course</h3>
+      <br />
+      <table tal:define="sc python: info['course_doc']">
+        <tr>
+          <td tal:content="sc/title" /> <td tal:content="sc/study_course" />
+        </tr>
+      </table>
+        <span tal:condition="python:0" tal:omit-tag=""
+              tal:content="structure python: info['course_doc'].render(proxy=info['course_doc'],
+              layout_mode='view_student_course', 
+              layout_id='student_study_course')" 
+              />
+      
+      <form action="." method="post" class="group"
+            >
+        <table width="100%" cellspacing="0" cellpadding="2"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+                <input type="submit" name="defer_admission:method" value="defer"
+                       class="destructive"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('confirm that you defer'), )" 
+                       />
+                <input type="submit" name="request_clearance:method"
+                       class="context" value="request Clearance" 
+                       />
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/finally_rejected_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/finally_rejected_view.pt	(revision 785)
+++ WAeUP_SRP/trunk/skins/waeup_student/finally_rejected_view.pt	(revision 785)
@@ -0,0 +1,31 @@
+<metal:html tal:define="app_doc python: context.aq_parent.application.getContent();
+                        pume_doc python: context.getContent()">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+
+            
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:pume_anon_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+        
+        </a>
+        </div>
+
+        <h3><span tal:content="app_doc/jamb_firstname" />
+                            <span tal:content="app_doc/jamb_lastname" /> is not admitted</h3>
+
+        <span tal:omit-tag=""
+              tal:content="structure python: app_doc.render(proxy=app_doc,
+              layout_mode='view_info', 
+              layout_id='student_application_fe')" 
+              />        
+        <span tal:omit-tag=""
+              tal:content="structure python: pume_doc.render(proxy=pume_doc,
+              layout_mode='view', 
+              layout_id='student_pume_fe')" 
+              />
+
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 784)
+++ WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 785)
@@ -28,14 +28,19 @@
     if context.isManager() and 'students' in path_info:
         student_id = path_info[path_info.index('students')+1]
+    elif member_id == "Anonymous User":
+        return None
     else:
         student_id = member_id
 else:
     student_id = student.getId()
-res = context.portal_catalog(id = student_id,portal_type='Student')
-if not res:# or len(res) > 1:
+student_path = "/srp/campus/students/%s" % student_id
+student = context.restrictedTraverse(student_path,default=None)
+if student is None or student.portal_type != 'Student':
     return None
-brain = res[-1]
-student = brain.getObject()
-student_path = brain.getPath()
+##res = context.portal_catalog(id = student_id,portal_type='Student')
+##if not res:# or len(res) > 1:
+##    return None
+##brain = res[-1]
+##student = brain.getObject()
 info['review_state'] = wf.getInfoFor(student,'review_state',None)
 info['student'] = student
@@ -47,31 +52,41 @@
 info['per'] = student.personal
 info['per_doc'] = student.personal.getContent()
+course = getattr(student,'study_course',None)
+info['course'] = course
+if course:
+    info['course_doc'] = student.study_course.getContent()
 info['sex'] = 'male'
 if info['per_doc'].sex:
     info['sex'] = 'female'
-res = context.portal_catalog(container_path=student_path,
-                             portal_type='StudentAccommodation')
-if res:
-    acco = res[0].getObject()
-    info['acco'] = acco
+##res = context.portal_catalog(container_path=student_path,
+##                             portal_type='StudentAccommodation')
+##if res:
+##    acco = res[0].getObject()
+acco = getattr(student,'accommodation',None)
+if acco.portal_type != "StudentAccomodation":
+    acco = None
+info['acco'] = acco
+if acco is not None:
     info['acco_doc'] = acco.getContent()
     info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
-else:
-    info['acco'] = None
-res = context.portal_catalog(container_path=student_path,
-                             portal_type='StudentClearance')
-if res:
-    clear = res[0].getObject()
-    info['clear'] = clear
+##res = context.portal_catalog(container_path=student_path,
+##                             portal_type='StudentClearance')
+##if res:
+##    clear = res[0].getObject()
+##    info['clear'] = clear
+clear = getattr(student,'clearance',None)
+info['clear'] = clear
+if clear is not None:
     info['clear_doc'] = clear.getContent()
     info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None)
-else:
-    info['clear'] = None
 
-res = context.portal_catalog(container_path=student_path,
-                             portal_type='StudentPume')
-if res:
-    pume = res[0].getObject()
-    info['pume'] = clear
+##res = context.portal_catalog(container_path=student_path,
+##                             portal_type='StudentPume')
+##if res:
+##    pume = res[0].getObject()
+##    info['pume'] = clear
+pume = getattr(student,'pume',None)
+info['pume'] = pume
+if pume is not None:
     info['pume_doc'] = pume.getContent()
     info['pume_review_state'] = wf.getInfoFor(pume,'review_state',None)
Index: WAeUP_SRP/trunk/skins/waeup_student/layout_waeup_view_student_course.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/layout_waeup_view_student_course.pt	(revision 785)
+++ WAeUP_SRP/trunk/skins/waeup_student/layout_waeup_view_student_course.pt	(revision 785)
@@ -0,0 +1,32 @@
+<!-- $Id: layout_waeup_lib.pt 770 2006-10-29 05:24:04Z henrik $ -->
+<metal:block define-macro="table_view"
+             tal:define="layout options/layout;
+             widgets python:context.getRenderedWidgets(layout);
+             fields python:(
+                            'title',
+                            'study_course',
+                            'faculty',
+                            'department',
+                            )"
+                                  >
+  <table>
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td >
+              <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+              <span tal:replace="structure cell/widget_rendered" />
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt	(revision 784)
+++ WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt	(revision 785)
@@ -11,5 +11,5 @@
                    
                    
-<table class="registration">
+<table class="registration" tal:condition="info|nothing">
   
   <span tal:condition="python:path('info/review_state')=='application_pin_entered'">
Index: WAeUP_SRP/trunk/skins/waeup_student/request_clearance.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/request_clearance.py	(revision 784)
+++ 	(revision )
@@ -1,51 +1,0 @@
-##parameters=REQUEST
-# $Id: apply_admission.py 649 2006-10-11 06:24:39Z joachim $
-"""
-request Clearance
-"""
-import DateTime
-current = DateTime.DateTime()
-pr = context.portal_registration
-
-
-type_name = 'StudentApplication'
-ti = context.portal_types[type_name]
-REQUEST.set('type_name',type_name)
-
-validate = REQUEST.has_key("cpsdocument_create_button")
-
-lt = context.portal_layouts
-pr = context.portal_registration
-
-res,psm,ds = lt.renderLayout(layout_id= 'student_application_fe',
-                      schema_id= 'student_application',
-                      context=context,
-                      mapping=validate and REQUEST,
-                      ob={},
-                      layout_mode='create',
-                      formaction = "request_clearance",
-                      button = "Request Clearance",
-                      )
-if psm == 'invalid':
-    return context.clearance_pin_form(rendered = res,
-                                 psm = "Please correct your input.",
-                                 #psm = "%s, %s" % (psm,ds),
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
-elif psm == '':
-    return context.clearance_pin_form(rendered = res,
-                                 psm = None,
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
-elif psm == 'valid':
-    s_id = ds.get('s_id')
-    pin = str(ds.get('app_ac_pin'))
-    return context.REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s"
-          % (context.absolute_url(),s_id,pin.split('-')[2],pin))
-return
-
-
Index: WAeUP_SRP/trunk/skins/waeup_student/student_index.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/student_index.py	(revision 784)
+++ WAeUP_SRP/trunk/skins/waeup_student/student_index.py	(revision 785)
@@ -32,6 +32,8 @@
     if state == 'admission_applied':
         return redirect("%s/application_view" % student.absolute_url())
-    elif state in ('application_pin_entered','admitted'):
+    elif state in ('application_pin_entered',):
         return redirect("%s/application_edit" % student.absolute_url())
+    elif state in ('admitted',):
+        return redirect("%s/defer_view" % student.absolute_url())
     elif state == 'clearance_pin_entered':
         return redirect("%s/student_view" % info['clear'].absolute_url())
