Index: WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt	(revision 1166)
+++ WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt	(revision 1167)
@@ -22,5 +22,5 @@
         Up one level
       </a>
-      <h3>Update your Application Data!</h3>
+      <h3>Update Your Application Data!</h3>
       <br />
     </metal:block>  
Index: WAeUP_SRP/trunk/skins/waeup_student/createStudentFT.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/createStudentFT.py	(revision 1167)
+++ WAeUP_SRP/trunk/skins/waeup_student/createStudentFT.py	(revision 1167)
@@ -0,0 +1,49 @@
+## Script (Python) "deleteAllCourses"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=matric_no=None
+##title=
+##
+# $Id: createStudentFT.py 1158 2006-12-30 16:58:14Z joachim $
+''' create the Studenbase folder'''
+
+
+pm = context.portal_membership
+member = pm.getAuthenticatedMember()
+wftool = context.portal_workflow
+students_folder = context.portal_url.getPortalObject().campus.students
+import logging
+logger = logging.getLogger('createStudentFT')
+
+if str(member) not in ("henrik","joachim"):
+    return "not possible"
+if not matric_no:
+    return "No matric_no"
+
+if context.students_catalog(matric_no=matric_no):
+    return "Student with %s already exists" % matric_no
+res = context.returning_import(matric_no = matric_no)
+if len(res) != 1:
+    return "Matricel No %s not found in Returning Table" % matric_no
+student_brain = res[0]
+sid = context.waeup_tool.generateStudentId(student_brain.Lastname[0])
+students_folder.invokeFactory('Student', sid)
+logger.info('"%s","Created Student","%s", "%s" ' % (member,sid,matric_no))
+student = getattr(students_folder,sid)
+wftool.doActionFor(student,'clear_and_validate')
+student.manage_setLocalRoles(sid, ['Owner',])
+context.students_catalog.addRecord(id = sid,
+                                   matric_no = matric_no,
+                                   jamb_reg_no = student_brain.Entryregno,
+                                   sex = student_brain.Sex == "F",
+                                   name = "%s %s %s" % (student_brain.Firstname,
+                                                        student_brain.Middlename,
+                                                        student_brain.Lastname)
+                                )
+return "Student MatricelNo %s and %s Jamb %s created" % (matric_no,
+                                                         sid,
+                                                         student_brain.Entryregno)
+    
Index: WAeUP_SRP/trunk/skins/waeup_student/getPersonalInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getPersonalInfo.py	(revision 1167)
+++ WAeUP_SRP/trunk/skins/waeup_student/getPersonalInfo.py	(revision 1167)
@@ -0,0 +1,45 @@
+## Script (Python) "getPersonalInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getApplicationInfo.py 1161 2006-12-31 07:50:50Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Student.Personal.Info')
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+##from Products.zdb import set_trace
+##set_trace()
+if mtool.isAnonymousUser():
+    return None
+info = {}
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and member_id != requested_id:
+    logger.info('"%s", "accessed personal object of", "%s"' % (member_id,requested_id))
+    student_id = requested_id
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['id'] = student_id
+info['student'] = student
+info['review_state'] = wf.getInfoFor(student,'review_state',None)
+info['per'] = student.personal
+info['per_doc'] = student.personal.getContent()
+return info
Index: WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 1166)
+++ WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 1167)
@@ -123,10 +123,10 @@
               'StudentAccommodation': 'reserve_accommodation',
               'StudentClearance': 'clearance_edit_form',
-              'StudentPersonal': '',
+              'StudentPersonal': 'personal_edit_form',
               }
 s_view_links = {'StudentApplication': 'application_view',
               'StudentAccommodation': 'accommodation_view',
               'StudentClearance': 'clearance_view',
-              'StudentPersonal': None,
+              'StudentPersonal': 'personal_view',
               'StudentStudyCourse': 'study_course_view',
               'StudentPume': 'pume_view',
Index: WAeUP_SRP/trunk/skins/waeup_student/layout_personal_edit.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/layout_personal_edit.pt	(revision 1167)
+++ WAeUP_SRP/trunk/skins/waeup_student/layout_personal_edit.pt	(revision 1167)
@@ -0,0 +1,111 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_application_edit.pt 1071 2006-12-16 15:53:13Z joachim $ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction|string:personal_edit;
+  creation creation|nothing;
+  cpsmcat nocall:here/translation_service;
+  proceed options/proceed|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/layout_personal_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/layout_personal_view.pt	(revision 1167)
+++ WAeUP_SRP/trunk/skins/waeup_student/layout_personal_view.pt	(revision 1167)
@@ -0,0 +1,55 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_application_view.pt 980 2006-12-02 07:18:27Z henrik $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields_not_displayed python:('',)" >
+
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr>
+      <td><span class="dlabel">Student ID</span>:
+      </td>
+      <td> 
+         <span tal:replace="python:here.aq_parent.aq_parent.id" />
+      </td>      
+    </tr>
+    
+    <span tal:repeat="row layout/rows">
+        <span tal:repeat="cell row">
+          <span tal:condition="python:cell['widget_rendered'] 
+                               and not cell['widget_rendered'] in ('None','-',)
+                               or cell['widget_id'] == 'birth_certificate'">
+          <span tal:define="widget cell/widget"
+                tal:condition="python:cell['widget_id'] not in fields_not_displayed">
+            <div tal:omit-tag=""
+                 tal:attributes="class cell/widget_css_class|nothing;">
+                 
+            <tr>                         
+            <tal:block condition="widget/label">
+            <td width="180px" valign="top" nowrap>
+              <span i18n:translate="" tal:condition="widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+              <span tal:condition="not:widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+            </td>
+            </tal:block>
+            <tal:block condition="not: widget/label">
+            <td valign="top">
+              <div> no label </div>
+            </td>
+            </tal:block>              
+            <td valign="top">
+             <div class="ddescription" tal:condition="cell/widget_rendered" tal:content="structure cell/widget_rendered"></div>
+             <div class="ddescription" tal:condition="not:cell/widget_rendered"> none </div>
+            </td>
+            </tr>
+            </div>
+          </span>
+          </span>
+      </span>
+    </span>    
+
+    
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py	(revision 1167)
+++ WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py	(revision 1167)
@@ -0,0 +1,54 @@
+## Script (Python) "personal_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cpsdocument_edit_button=None, cpsdocument_edit_and_view_button=None, action=None
+##title=
+# $Id: application_edit.py 1071 2006-12-16 15:53:13Z joachim $
+"""
+"""
+wftool = context.portal_workflow
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Student.Personal.Edit')
+
+info = context.getPersonalInfo()
+
+if info is None:
+    logger.info('"anonymous access","%s"' % REQUEST.get('URL0'))
+    return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = info['student']
+per = info['per']
+per_doc = info['per_doc']
+state = info['review_state']
+is_valid, ds = per_doc.validate(request=REQUEST,
+                                schema_id = 'student_personal',
+                                layout_id = 'student_personal_fe',
+                                proxy=per,
+                                use_session=True)
+
+psm = ""
+args = {}
+action = "/personal_edit_form"
+base_url = per.absolute_url()
+
+if is_valid:
+    if cpsdocument_edit_button:
+        logger.info('"%s", "edited personal data"' % (info['id']))
+        #action = ""
+        #base_url = student.absolute_url()
+        #url = base_url + action
+        psm = 'psm_content_changed'
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+
+args['portal_status_message'] = psm
+url = base_url + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk/skins/waeup_student/personal_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/personal_edit_form.pt	(revision 1167)
+++ WAeUP_SRP/trunk/skins/waeup_student/personal_edit_form.pt	(revision 1167)
@@ -0,0 +1,46 @@
+<metal:html tal:define="info context/getPersonalInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
+<metal:block tal:define="rendered_main python:info['per_doc'].render(
+                      layout_mode='edit',
+                      schema_id = 'student_personal',
+                      layout_id = 'student_personal_fe',
+                      request=request, 
+                      use_session=True,);
+           form_action string:personal_edit;
+           edition python:True;
+           metadata nothing;
+            ">
+  <metal:body use-macro="here/waeup_content_master/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3>Update Your Personal Data!</h3>
+      <br />
+    </metal:block>  
+  
+    <metal:main fill-slot="main">
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <span tal:condition="info">
+        <span tal:omit-tag="" tal:replace="structure rendered_main"/>
+      </span>
+      <input type="submit" class="standalone" 
+             name="cpsdocument_edit_button"
+             value="Save" 
+             id="cpsdocument_edit_button"/>
+    </form>
+    </metal:main>
+  </metal:body>
+</metal:block>
+</metal:block>
+</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/personal_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/personal_view.pt	(revision 1167)
+++ WAeUP_SRP/trunk/skins/waeup_student/personal_view.pt	(revision 1167)
@@ -0,0 +1,26 @@
+<metal:html tal:define="info context/getPersonalInfo">
+  <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">
+      <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>My Personal Record</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['app_doc'].render(proxy=info['per_doc'],
+              layout_mode='view', 
+              layout_id='student_personal_fe')" 
+              />
+      </span>
+    </metal:main>
+  </metal:body>
+  </metal:block>
+</metal:html>
