Index: /waeup_product/trunk/Extensions/install.py
===================================================================
--- /waeup_product/trunk/Extensions/install.py	(revision 46)
+++ /waeup_product/trunk/Extensions/install.py	(revision 47)
@@ -61,7 +61,7 @@
                         'id'        : 'checkadmission',
                         'name'      : 'Check Admission',
-                        'action'    : 'string:${object/absolute_url}/check_admission_form',
+                        'action'    : 'string:${object/absolute_url}/check_admission',
                         'permission': (View, ),
-                        'condition' : 'not:member',
+                        'condition' : 'member',
                         'category'  : 'student',
                         'visible'   : 1,
@@ -81,5 +81,5 @@
                         'action'    : 'cpsdocument_edit_form',
                         'permission': ( ),
-                        'condition' : 'python: here.portal_type == "Student"',
+                        'condition' : 'python: member and  here.portal_type == "Student"',
                         'category'  : 'student',
                         'visible'   : 1,
@@ -91,4 +91,13 @@
                         'permission': (),
                         'condition' : 'python:not here.portal_type in ("Jamb","StudentsFolder") and len(object.contentItems()) == 0',
+                        'category'  : 'student',
+                        'visible'   : 1,
+                      },
+                      { 'tool'      : 'portal_actions',
+                        'id'        : 'add_personal',
+                        'name'      : 'Add personal Data',
+                        'action'    : 'string:${object/absolute_url}/create_personal_form',
+                        'permission': (),
+                        'condition' : 'python:not here.portal_type in ("Jamb","StudentsFolder")',
                         'category'  : 'student',
                         'visible'   : 1,
@@ -187,4 +196,5 @@
                       'StudentsFolder': 'waeup_section_wf',
                       'Student': 'waeup_section_wf',
+                      'StudentPersonal': 'waeup_section_wf',
                       'Jamb': 'waeup_section_wf',
                       'ScratchCard': 'waeup_section_wf',
Index: /waeup_product/trunk/Students.py
===================================================================
--- /waeup_product/trunk/Students.py	(revision 46)
+++ /waeup_product/trunk/Students.py	(revision 47)
@@ -2,9 +2,10 @@
 from AccessControl import ClassSecurityInfo
 
-from Products.CMFCore.utils import getToolByName
+from Products.CMFCore.utils import UniqueObject, getToolByName
 from Products.CMFCore.permissions import View
 from Products.CMFCore.permissions import ModifyPortalContent
 from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder 
-from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument 
+#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument 
+from Products.CPSDocument.CPSDocument import CPSDocument 
 from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder 
 
@@ -20,9 +21,38 @@
     security = ClassSecurityInfo()
     
+    security.declarePublic("doCheckAdmission")
+    def doCheckAdmission(self,type_name,datamodel):
+        "the admission callback"
+##        class CPSUnrestrictedUser(UnrestrictedUser):
+##            """Unrestricted user that still has an id.
+##
+##            Taken from CPSMembershipTool
+##            """
+##
+##            def getId(self):
+##                """Return the ID of the user."""
+##                return self.getUserName()
+        print type_name
+        print datamodel
+        return self.REQUEST.RESPONSE.redirect("%s" % self.absolute_url())
+        mtool = getToolByName(self, 'portal_membership')
+        username = "%s" % datamodel.get('reg_nr')
+        print username
+        member=mtool.getMemberById("S%s" % username)
+        print member
+        from AccessControl.SecurityManagement import newSecurityManager
+        newSecurityManager(None,member.__of__(mtool.acl_users))
+        # datamodel is passed so that flexti can initialize the object.
+        #datamodel.set('lastname','Meier')
+        student = getattr(self,username)
+        student.invokeFactory('StudentPersonal', '%s' % username)
+        ob = getattr(student, id)
+        ##context.notifyCPSDocumentCreation(ob=ob)
+        return ob
+        
 InitializeClass(StudentsFolder)
 
 def addStudentsFolder(container, id, REQUEST=None, **kw):
     """Add a Student."""
-    print id
     ob = StudentsFolder(id, **kw)
     return CPSBase_adder(container, ob, REQUEST=REQUEST)
@@ -30,17 +60,21 @@
 ### The Student
 ###
-##class Student(BaseDocument):
+##class Student(CPSDocument):
 ##    """
 ##    WAeUP Student container for the various student data 
 ##    """
-##    meta_type = 'Student'
-##    portal_type = meta_type
+####    meta_type = 'Student'
+####    portal_type = meta_type
 ##    security = ClassSecurityInfo()
 ##    
+##    security.declarePublic("test")
+##    def test(self):
+##        """test"""
+##        return self.REQUEST
+##    
 ##InitializeClass(Student)
-##
+#
 ##def addStudent(container, id, REQUEST=None, **kw):
 ##    """Add a Student."""
-##    print id
 ##    ob = Student(id, **kw)
 ##    return CPSBase_adder(container, ob, REQUEST=REQUEST)
Index: /waeup_product/trunk/Widgets.py
===================================================================
--- /waeup_product/trunk/Widgets.py	(revision 46)
+++ /waeup_product/trunk/Widgets.py	(revision 47)
@@ -1,2 +1,3 @@
+#-*- mode: python; mode: fold -*-
 from Globals import InitializeClass
 from Products.CPSSchemas.Widget import CPSWidgetType
@@ -11,5 +12,5 @@
 from zLOG import LOG, DEBUG
 
-class StudentIdWidget(CPSStringWidget):
+class StudentIdWidget(CPSStringWidget): ###(
     """ StudentId Widget"""
     meta_type = "StudentId Widget"
@@ -19,4 +20,5 @@
         
         valid = CPSStringWidget.validate(self, datastructure, **kw)
+        print "studentw",valid
         if not valid:
             return 0
@@ -43,5 +45,7 @@
     cls = StudentIdWidget
 
-class ScratchcardPinWidget(CPSStringWidget):
+###)
+
+class ScratchcardPinWidget(CPSStringWidget): ###(
     """ ScratchcardPin Widget"""
     meta_type = "ScratchcardPin Widget"
@@ -56,4 +60,5 @@
         
         valid = CPSStringWidget.validate(self, datastructure, **kw)
+        print "sc_pinw",valid
         if not valid:
             return 0
@@ -62,4 +67,5 @@
             value = datastructure[widget_id]
             err = 0
+            print value
             if not value in valid_pins: 
                 err = 'invalid Pin'
@@ -74,7 +80,10 @@
 
 class ScratchcardPinWidgetType(CPSWidgetType):
-    """Student Id String widget type."""
+    """Scratchcard Pin widget type."""
     meta_type = "Scratchcard Pin  Widget Type"
     cls = ScratchcardPinWidget
+
+###)
+
 ###########
 
@@ -82,5 +91,5 @@
 WidgetTypeRegistry.register(ScratchcardPinWidgetType)
 
-##class MyProjectWeekDateTimeWidget(CPSDateTimeWidget):
+##class MyProjectWeekDateTimeWidget(CPSDateTimeWidget): ###(
 ##    """ """
 ##    meta_type = "MyProject Week Date Time Widget"
@@ -226,2 +235,4 @@
 ##WidgetTypeRegistry.register(MyProjectVisitTitleWidgetType)
 ##
+
+###)
Index: /waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
===================================================================
--- /waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 46)
+++ /waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 47)
@@ -1,9 +1,33 @@
+#-*- mode: python; mode: fold -*-
 ##parameters=
 # $Id$
 """Return custom layouts types."""
-layouts = {}
-
-# common header layout
-common_layout = {
+
+##    'widgets': { ###(
+##        '': {
+##            'type': 'String Widget',
+##            'data': {
+##                'title': '',
+##                'fields': ('',),
+##                'is_required': False,
+##                'label': '',
+##                'label_edit': '',
+##                'description': '',
+##                'help': '',
+##                'is_i18n': False,
+##                'readonly_layout_modes': (),
+##                'hidden_layout_modes': (),
+##                'hidden_readonly_layout_modes': (),
+##                'hidden_empty': False,
+##                'hidden_if_expr': '',
+##                'css_class': '',
+##                'widget_mode_expr': '',
+##                'display_width': 10,
+##                'size_max': 0,
+##            },
+
+###)
+
+common_layout = {###(
     'widgets': {
         'LanguageSelector': {
@@ -70,8 +94,8 @@
         },
     }
-layouts['waeup_common'] = common_layout
 #
-#
-student_layout = {
+###)
+
+student_layout = { ###(
     'widgets': {
         'jamb_is_admitted': {
@@ -119,26 +143,26 @@
             },
         },
-        'jamb_pin_usage': {
-            'type': 'Int Widget',
-            'data': {
-                'title': 'Jamb Pin usage',
-                'fields': ('jamb_pin_usage',),
-                'is_required': False,
-                'label': 'Nr of Cardusage',
-                'label_edit': 'Nr of Cardusage',
-                'description': '',
-                'help': 'How many times has the scratchcard been used',
-                'is_i18n': False,
-                'readonly_layout_modes': (),
-                'hidden_layout_modes': (),
-                'hidden_readonly_layout_modes': (),
-                'hidden_empty': False,
-                'hidden_if_expr': '',
-                'css_class': '',
-                'widget_mode_expr': '',
-                'display_width': 2,
-                'size_max': 2,
-            },
-        },
+##        'jamb_pin_usage': {
+##            'type': 'Int Widget',
+##            'data': {
+##                'title': 'Jamb Pin usage',
+##                'fields': ('jamb_pin_usage',),
+##                'is_required': False,
+##                'label': 'Nr of Cardusage',
+##                'label_edit': 'Nr of Cardusage',
+##                'description': '',
+##                'help': 'How many times has the scratchcard been used',
+##                'is_i18n': False,
+##                'readonly_layout_modes': (),
+##                'hidden_layout_modes': (),
+##                'hidden_readonly_layout_modes': (),
+##                'hidden_empty': False,
+##                'hidden_if_expr': '',
+##                'css_class': '',
+##                'widget_mode_expr': '',
+##                'display_width': 2,
+##                'size_max': 2,
+##            },
+##        },
         'faculty': {
             'type': 'String Widget',
@@ -171,13 +195,143 @@
             [{'widget_id': 'jamb_is_admitted', 'ncols': 1},],
             [{'widget_id': 'jamb_where_admitted', 'ncols': 1},],
-            [{'widget_id': 'jamb_pin_usage', 'ncols': 1},],
+            #[{'widget_id': 'jamb_pin_usage', 'ncols': 1},],
             [{'widget_id': 'faculty', 'ncols': 1},],
         ]
     },
 }
-layouts['student'] = student_layout
-#
-#
-scratch_card = {
+###)
+
+student_personal_layout = { ###(
+    'widgets': {
+        'firstname': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('firstname',),
+                'is_required': False,
+                'label': 'First Name',
+                'label_edit': 'First Name',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'middlename': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('middlename',),
+                'is_required': False,
+                'label': 'Middle Name',
+                'label_edit': 'Middle Name',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'lastname': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('lastname',),
+                'is_required': False,
+                'label': 'Last Name',
+                'label_edit': 'Last Name',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'sex': {
+            'type': 'Boolean Widget',
+            'data': {
+                'title': '',
+                'fields': ('sex',),
+                'is_required': False,
+                'label': 'Sex',
+                'label_edit': 'Sex',
+                'label_false': 'male',
+                'label_true': 'female',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'birthday': {
+            'type': 'Date Widget',
+            'data': {
+                'title': '',
+                'fields': ('birthday',),
+                'is_required': False,
+                'label': '',
+                'label_edit': 'Day of birth',
+                'description': 'Day of birth',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+    },
+    'layout': {
+        'style_prefix': 'layout_default_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'firstname', 'ncols': 1},],
+            [{'widget_id': 'middlename', 'ncols': 1},],
+            [{'widget_id': 'lastname', 'ncols': 1},],
+            [{'widget_id': 'sex', 'ncols': 1},],
+            [{'widget_id': 'birthday', 'ncols': 1},],
+        ]
+    },
+}
+
+###)
+
+scratch_card = { ###(
     'widgets': {
         'sc_id': {
@@ -237,7 +391,91 @@
 }
 
-layouts['scratch_card'] = scratch_card
-
-jamb_layout = {
+
+###)
+
+admission = { ###(
+    'widgets': {
+        'sc_id': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'SC ID',
+                'fields': ('admission_sc_id',),
+                'is_required': False,
+                'label': 'Card Serial Number ',
+                'label_edit': 'Card Serial Number',
+                'description': 'Card Serial Number ',
+                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': 'python:1',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'sc_pin': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'SC Pin',
+                'fields': ('admission_sc_pin'),
+                'is_required': True,
+                'label': 'PIN',
+                'label_edit': 'PIN',
+                'description': '',
+                'help': 'PIN-(Personal Identification Number) is an 8 or 12 digit number on the reverse side of the scratch card which you can purchase from many Banks',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 10,
+            },
+        },
+        'jamb_id': {
+            'type': 'StudentId Widget',
+            'data': {
+                'title': 'Registration Number',
+                'fields': ('reg_nr'),
+                'is_required': True,
+                'label': 'Registration Number',
+                'label_edit': 'Registration Number',
+                'description': '',
+                'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 10,
+            },
+        },
+    },
+   'layout': {
+        'style_prefix': 'layout_admission_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+            [{'widget_id': 'jamb_id', 'ncols': 1},],
+        ]
+    },
+}
+
+###)
+
+jamb_layout = { ###(
     'widgets': {
         'reg_nr': {
@@ -459,6 +697,12 @@
     },
 }
-
+###)
+
+layouts = {}
+layouts['waeup_common'] = common_layout
+layouts['student'] = student_layout
+layouts['student_personal'] = student_personal_layout
+layouts['scratch_card'] = scratch_card
+layouts['admission'] = admission
 layouts['jamb'] = jamb_layout
-
 return layouts
Index: /waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
===================================================================
--- /waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 46)
+++ /waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 47)
@@ -1,3 +1,6 @@
-university_schema = {
+#-*- mode: python; mode: fold -*-
+# $Id$
+
+university_schema = { ###(
    'allow_discussion': {
         'type': 'CPS Int Field',
@@ -9,5 +12,7 @@
 }
 
-students_folder_schema = {
+###)
+
+students_folder_schema = { ###(
    'allow_discussion': {
         'type': 'CPS Int Field',
@@ -19,5 +24,7 @@
 }
 
-student_schema = {
+###)
+
+student_schema = { ###(
    'allow_discussion': {
         'type': 'CPS Int Field',
@@ -81,26 +88,51 @@
         },
     },
-    'jamb_pin_usage': {
-        'type': 'CPS Int Field',
-        'data': {
-            'default_expr': 'python:0',
-            'is_searchabletext': False,
-            'acl_read_permissions': '',
-            'acl_read_roles': '',
-            'acl_read_expr': '',
-            'acl_write_permissions': '',
-            'acl_write_roles': '',
-            'acl_write_expr': '',
-            'read_ignore_storage': False,
-            'read_process_expr': '',
-            'read_process_dependent_fields': (),
-            'write_ignore_storage': False,
-            'write_process_expr': '',
-        },
-    },
 }
 #
+###)
+
+student_personal_schema = { ###(
+   'allow_discussion': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'python:0',
+            'is_searchabletext': 0,
+            },
+        },
+     'firstname': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+    'middlename': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'lastname': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'sex': {
+        'type': 'CPS Boolean Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'birthday': {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+}
 #
-jamb_schema = {
+###)
+
+jamb_schema = { ###(
    'allow_discussion': {
         'type': 'CPS Int Field',
@@ -115,4 +147,57 @@
             'default_expr': 'string:',
             'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+        },
+    },
+    'admission_sc_id': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': '',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+        },
+    },
+    'admission_sc_pin': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+        },
+    },
+    'admission_sc_pin_usage': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'python:0',
+            'is_searchabletext': False,
             'acl_read_permissions': '',
             'acl_read_roles': '',
@@ -274,55 +359,60 @@
 }
 
-scratch_card = {
-   'allow_discussion': {
-        'type': 'CPS Int Field',
-        'data': {
-            'default_expr': 'python:0',
-            'is_searchabletext': 0,
-            },
-        },
-     'sc_id': {
-        'type': 'CPS String Field',
-        'data': {
-            'default_expr': '',
-            'is_searchabletext': 0,
-            'acl_read_permissions': '',
-            'acl_read_roles': '',
-            'acl_read_expr': '',
-            'acl_write_permissions': '',
-            'acl_write_roles': '',
-            'acl_write_expr': '',
-            'read_ignore_storage': False,
-            'read_process_expr': '',
-            'read_process_dependent_fields': (),
-            'write_ignore_storage': False,
-            'write_process_expr': '',
-        },
-    },
-     'sc_pin': {
-        'type': 'CPS String Field',
-        'data': {
-            'default_expr': '',
-            'is_searchabletext': 0,
-            'acl_read_permissions': '',
-            'acl_read_roles': '',
-            'acl_read_expr': '',
-            'acl_write_permissions': '',
-            'acl_write_roles': '',
-            'acl_write_expr': '',
-            'read_ignore_storage': False,
-            'read_process_expr': '',
-            'read_process_dependent_fields': (),
-            'write_ignore_storage': False,
-            'write_process_expr': '',
-        },
-    },
-}
+###)
+
+##scratch_card = { ###(
+####   'allow_discussion': {
+####        'type': 'CPS Int Field',
+####        'data': {
+####            'default_expr': 'python:0',
+####            'is_searchabletext': 0,
+####            },
+####        },
+##     'sc_id': {
+##        'type': 'CPS String Field',
+##        'data': {
+##            'default_expr': '',
+##            'is_searchabletext': 0,
+##            'acl_read_permissions': '',
+##            'acl_read_roles': '',
+##            'acl_read_expr': '',
+##            'acl_write_permissions': '',
+##            'acl_write_roles': '',
+##            'acl_write_expr': '',
+##            'read_ignore_storage': False,
+##            'read_process_expr': '',
+##            'read_process_dependent_fields': (),
+##            'write_ignore_storage': False,
+##            'write_process_expr': '',
+##        },
+##    },
+##     'sc_pin': {
+##        'type': 'CPS String Field',
+##        'data': {
+##            'default_expr': '',
+##            'is_searchabletext': 0,
+##            'acl_read_permissions': '',
+##            'acl_read_roles': '',
+##            'acl_read_expr': '',
+##            'acl_write_permissions': '',
+##            'acl_write_roles': '',
+##            'acl_write_expr': '',
+##            'read_ignore_storage': False,
+##            'read_process_expr': '',
+##            'read_process_dependent_fields': (),
+##            'write_ignore_storage': False,
+##            'write_process_expr': '',
+##        },
+##    },
+##}
 schemas = {}
+###)
+
 schemas['university'] = university_schema
 schemas['students'] = students_folder_schema
 schemas['student'] = student_schema
+schemas['student_personal'] = student_personal_schema
 schemas['jamb'] = jamb_schema
-schemas['scratch_card'] = scratch_card
+#schemas['scratch_card'] = scratch_card
 
 return schemas
Index: /waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
===================================================================
--- /waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 46)
+++ /waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 47)
@@ -1,2 +1,3 @@
+#-*- mode: python; mode: fold -*-
 ##parameters=
 # $Id$
@@ -8,5 +9,5 @@
 ChangePermissions = 'Change permissions'
 
-university_type = {
+university_type = { ###(
     'title': 'WAeUP Base Folder',
     'description': 'The WAeUP Container',
@@ -55,5 +56,7 @@
 }
 
-students_folder_type = {
+###)
+
+students_folder_type = { ###(
     'title': 'WAeUP Student Folder',
     'description': 'The WAeUP Student Folder',
@@ -103,5 +106,7 @@
 }
 
-student_type = {
+###)
+
+student_type = { ###(
     'title': 'WAeUP Student',
     'description': '',
@@ -116,5 +121,5 @@
     'global_allow': True,
     'filter_content_types': True,
-    'allowed_content_types': ('Jamb',),
+    'allowed_content_types': ('Jamb','StudentPersonal'),
     'allow_discussion': False,
     'cps_is_searchable': True,
@@ -130,6 +135,6 @@
          {'id': 'view',
           'name': 'action_view',
-          #'action': 'string:${object_url}/student_view',
-          'action': 'string:${object_url}/cpsdocument_view',
+          'action': 'string:${object_url}/student_view',
+          #'action': 'string:${object_url}/cpsdocument_view',
           'condition': '',
           'permission': ('View',),
@@ -137,7 +142,7 @@
           'visible': True,},
          {'id': 'new_content',
-          'name': 'Add Jamb Data',
+          'name': 'Add Data',
           'action': 'string:${object_url}/folder_factories',
-          'condition': "python:len(object.contentItems()) == 0 ",
+          'condition': "python:1 or len(object.contentItems()) == 0 ",
           'permission': ('Modify portal content',),
           'category': 'object',
@@ -146,5 +151,5 @@
           'name': 'action_folder_contents',
           'action': 'string:${object_url}/folder_contents',
-          'condition': "python:object.getTypeInfo().cps_proxy_type != 'document'",
+          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
           'permission': ('Modify portal content',),
           'category': 'object',
@@ -159,5 +164,8 @@
     )
 }
-scratch_card = {
+
+###)
+
+scratch_card = { ###(
     'title': 'WAeUP Scratchcard',
     'description': '',
@@ -210,6 +218,7 @@
 }
 #
-#
-jamb_type = {
+###)
+
+jamb_type = { ###(
     'title': "JAMB data",
     'description': 'The data from JAMB',
@@ -229,5 +238,32 @@
     #'schemas': ['common','metadata','jamb'],
     'schemas': ['jamb'],
-    'layouts': ['jamb',],
+    'layouts': ['jamb'],
+    'flexible_layouts': (),
+    'storage_methods': ('admitted:store_admission_pin'),
+    'cps_workspace_wf': 'workspace_content_wf',
+    'cps_section_wf': 'section_content_wf',
+}
+
+###)
+
+student_personal_type = { ###(
+    'title': "Student personal data",
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'CPS Document',
+    'product': 'CPSDocument',
+    'factory': 'addCPSDocument',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'document',
+    'cps_display_as_document_in_listing': True,
+    'cps_is_portalbox': False,
+    #'schemas': ['common','metadata','jamb'],
+    'schemas': ['student_personal'],
+    'layouts': ['student_personal'],
     'flexible_layouts': (),
     'storage_methods': (),
@@ -235,4 +271,5 @@
     'cps_section_wf': 'section_content_wf',
 }
+###)
 
 types = {}
@@ -240,4 +277,5 @@
 types['StudentsFolder'] = students_folder_type
 types['Student'] = student_type
+types['StudentPersonal'] = student_personal_type
 types['ScratchCard'] = scratch_card
 types['Jamb'] = jamb_type
Index: /waeup_product/trunk/skins/waeup_default/portlet_studentnavigation.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_default/portlet_studentnavigation.pt	(revision 46)
+++ /waeup_product/trunk/skins/waeup_default/portlet_studentnavigation.pt	(revision 47)
@@ -1,8 +1,10 @@
 <tal:block define="mtool here/portal_membership;
-                   anonymous mtool/isAnonymousUser"
+                   anonymous mtool/isAnonymousUser;
+                   user python: mtool.getAuthenticatedMember();
+                   folder_id python:str(user)[1:]"
                    >
-  <tal:block condition="not:anonymous">
+  <tal:block condition="python: not anonymous">
     <a href="" i18n:translate=""
-       tal:attributes="href string:${here/portal_url}/sections/unidemo/students">Studentadministration</a>
+       tal:attributes="href string:${here/portal_url}/sections/unidemo/students/${folder_id}">Studentadministration</a>
   </tal:block>
   <tal:block condition="anonymous">
Index: /waeup_product/trunk/skins/waeup_student/check_admission.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/check_admission.py	(revision 46)
+++ /waeup_product/trunk/skins/waeup_student/check_admission.py	(revision 47)
@@ -1,7 +1,51 @@
-##parameters=REQUEST=None
+##parameters=REQUEST
+# $Id$
+"""
+process the Admission Form
 
-# $Id$
+return html renderer + psm
+"""
+type_name = 'Jamb'
+ti = context.portal_types[type_name]
 
-admin = "SectionManager" in context.portal_membership.getAuthenticatedMember().getRolesInContext(context)
+REQUEST.set('type_name',type_name)
 
-return context.student_admitted_form()
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+#student = context.getContent()
+student = context
+
+#jamb = getattr(student,'my-jamb').getContent()
+jamb = getattr(student,'my-jamb')
+
+##res = jamb.validateStoreRender(request=REQUEST,
+##                               layout_mode='create',
+##                               layout_mode_ok='admitted',
+##                               layout_mode_err='create',
+##                               layout_id='admission',
+##                               )
+
+lt = context.portal_layouts
+
+res,psm,ds = lt.renderLayout(layout_id= 'admission',
+                      schema_id= 'jamb',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      )
+if psm == 'invalid':
+    return context.check_admission_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
+    
+elif psm == 'valid':
+    return context.student_admitted_form(rendered = res,
+                                 psm = psm,
+                                 student = student,
+                                 jamb = jamb,
+                                 )
+    
+return res,psm,ds
+
Index: /waeup_product/trunk/skins/waeup_student/check_admission_form.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_student/check_admission_form.pt	(revision 46)
+++ /waeup_product/trunk/skins/waeup_student/check_admission_form.pt	(revision 47)
@@ -1,45 +1,23 @@
-<metal:html use-macro="here/main_template/macros/master">
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   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="header" />
-  <metal:main fill-slot="main" tal:define="lotool here/portal_layouts">
-    <metal:block tal:condition="python: 1" define-macro="default_view"
-                 tal:define="layout python: lotool.checkadmission;
-                 ldef python: lotool.checkadmission.getLayoutDefinition()"
-                 >
-      <form action='check_admission' method='post'
-            enctype='multipart/form-data' class='workflow'>
-        <table tal:condition="python: 1" width="100%" cellpadding="2" cellspacing="2" border="0"
-               summary="layout">
-          <tr valign="top">
-            <td colspan="1">
-              <div class="">
-                <div class="label">
-                  <label>Student Id</label>
-                </div>
-                <div class="field">
-                  <input name="student Id" type="text" value="" size="10" />
-                </div>
-              </div>
-            </td>
-          </tr>
-          <tr valign="top">
-            <td colspan="1">
-              <div class="label">
-                <label>Scratch Card Pin</label>
-              </div>
-              <div class="field">
-                <input name="sc_pin" type="text" value="" size="10" />
-              </div>
-            </td>
-          </tr>
-          <tr valign="top">
-            <td colspan="1">
-              <input type="submit" class="standalone"
-                     name="cpsdocument_create_button" value="check" />
-            </td>
-          </tr>
-        </table>
-      </form>
+    <metal:block fill-slot="main">
+<span tal:content="structure data_storage" />
+      <h1>check your admission to the UniDemo !</h1>
+      <div tal:replace="structure rendered_main" />
     </metal:block>
-  </metal:main>
-</metal:html>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/trunk/skins/waeup_student/create_personal_form.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_student/create_personal_form.pt	(revision 47)
+++ /waeup_product/trunk/skins/waeup_student/create_personal_form.pt	(revision 47)
@@ -0,0 +1,26 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items here/contentValues"
+               >
+    <form action="content_create" tal:attributes="action string:${here_url}/content_create"
+          method="post" class="group">
+      <dt>
+        <input type="hidden" name="type_name" value="Jamb" /> 
+      <p>
+        <input id="objectTitle" type="text" name="Title" value="personal" class="focus" size="40" />
+        <input type="submit" class="standalone searchButton" value="create" />
+      </p>
+    </form>
+  </metal:block>
+</html>
Index: /waeup_product/trunk/skins/waeup_student/layout_admission_create.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_student/layout_admission_create.pt	(revision 47)
+++ /waeup_product/trunk/skins/waeup_student/layout_admission_create.pt	(revision 47)
@@ -0,0 +1,83 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             creation creation|nothing;
+             metadata metadata|nothing;
+             type_name request/type_name|nothing;
+             ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+             creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
+             edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
+             metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
+             formaction string:check_admission_form;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             "
+             >
+  <form action='check_admission' method='post'
+        enctype='multipart/form-data' class='workflow'>
+    <div class='group'>
+      <div class='documentFields'>
+        <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout">
+          <tr tal:repeat="row layout/rows" valign="top">
+            <td tal:repeat="cell row"
+                tal:attributes="colspan cell/ncols">
+              <tal:block define="widget cell/widget;
+              wid widget/getWidgetId;
+              dm options/datastructure/getDataModel;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required widget/is_required|nothing;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              widget_css_class python:test(is_flexible, 'group', widget_css_class);
+              css_class python:test(err, 'row error',
+              test(is_flexible, 'group', 'row'))"
+              >
+                <div tal:attributes="class widget_css_class;
+                id python:widget.getHtmlWidgetId()+'_widget';"
+                >
+                  <div class="label" tal:condition="widget/label_edit"
+                       tal:attributes="class python:test(is_required, 'label required','label')">
+                    <label i18n:translate="" tal:condition="widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                    <label tal:condition="not:widget/is_i18n"
+                           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>
+                  <div class="field">
+                    <div tal:replace="structure cell/widget_rendered"/>
+                  </div>
+                  <div class="tooltipArea" style="visibility: hidden;"
+                       tal:condition="widget/help"
+                       tal:attributes="id tooltip_id;
+                       onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                       >
+                    <tal:block i18n:translate="" tal:condition="widget/is_i18n"
+                               tal:content="widget/help">i18_key-help_for_this_field</tal:block>
+                    <tal:block tal:condition="not:widget/is_i18n"
+                               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>
+                </div>
+              </tal:block>
+            </td>
+          </tr>
+        </table>
+        <input type="submit" class="standalone" name="cpsdocument_edit_button" value="check" />
+      </div>        
+    </div>
+  </form>
+</metal:block>
+  
Index: /waeup_product/trunk/skins/waeup_student/student_admitted_form.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_student/student_admitted_form.pt	(revision 46)
+++ /waeup_product/trunk/skins/waeup_student/student_admitted_form.pt	(revision 47)
@@ -1,112 +1,15 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   jamb options/jamb/getContent;
+                   student options/student/getContent;
+                   edition python:1;"
+                   >
 <metal:html use-macro="here/main_template/macros/master">
-
   <metal:block fill-slot="header" />
-  <metal:main fill-slot="main" tal:define="lotool here/portal_layouts">
-    <metal:block tal:condition="python: 1" define-macro="default_view"
-                 tal:define="layout python: lotool.checkadmission;
-                 ldef python: lotool.checkadmission.getLayoutDefinition()"
-                 >
-      <form action='check_addmission' method='post'
-            enctype='multipart/form-data' class='workflow'>
-        <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
-          <TR>
-            <td colspan="">
-              Disclaimer
-            </TD>
-          </TR>
-          <TR>
-            <td colspan="">
-              <span>The result information given below is correct at the time of release of results by the Board. The board accepts no responsibility there after for any errors or omissions caused as a result of transmission via the internet or downloading or printing by the user. <p> Candidates are required to obtain their results slips from the Board as the result information contained herein does not constitute valid admission documentation and will therefore not be acceptable as such the institution applied to and/or the Board</p></span>
-            </TD>
-          </TR>
-          <TR>
-            <td colspan="">
-              <span >Examination</span></TD>
-            <td colspan="">
-              <span>UME 2005/2006</span></TD>
-          </TR>
-          <tr>
-            <td colspan="2">
-              <span>Personal Information</span></TD>
-          </tr>
-          <tr>
-            <TD width="50%">
-            Candidate Name</TD>
-            <TD>
-              <span>Olomide Kingshasa</span></TD>
-          </tr>
-          <tr>
-            <TD>Registration Number</TD>
-            <TD>
-              <span>1234567AC</span></TD>
-          </tr>
-          <tr>
-            <TD colspan="2">
-              <span>Examination Information</span></TD>
-          </tr>
-          <tr>
-            <TD>Examination Number</TD>
-            <TD>
-            Examination Centre Name</TD>
-          </tr>
-          <tr>
-            <TD >
-              <span>4568</span>
-              <span>401</span></TD>
-            <TD>
-              <span>Imaguero College (Snr) Sapele Rd B/C</span></TD>
-          </tr>
-          <TR>
-            <TD colspan="2">
-              <span>Subjects Information</span>
-            </TD>
-          </TR>
-          <TR>
-            <TD colspan="2">
-              <table cellspacing="0" rules="all" border="0">
-                <tr>
-                  <td>Subject</td><td>Score</td>
-                </tr>
-                <tr>
-                  <td>Use of English</td><td>32</td>
-                </tr>
-                <tr>
-                  <td>Economics</td><td>34</td>
-                </tr>
-                <tr>
-                  <td>Government</td><td>34</td>
-                </tr>
-                <tr>
-                  <td>Mathematics</td><td>31</td>
-                </tr>
-              </table>
-            </TD>
-          </TR>
-          <TR>
-            <TD>Aggregate</TD>
-            <TD>
-              <span>131</span>
-            </TD>
-          </TR>
-          <tr>
-            <TD colspan="2"><span>Admission Information</span></TD>
-          </tr>
-          <tr>
-            <TD colspan="2" align="left">
-              <span>NO ADMISSION OFFERED YET</span>
-              <HR width="100%" SIZE="1" />
-            </TD>
-          </tr>
-          <TR>
-            <TD>
-              <span>Card Use</span>
-            </TD>
-            <TD>
-              <span>1 of 5</span>
-            </TD>
-          </TR>
-        </TABLE>
-      </form>
-    </metal:block>
-  </metal:main>
-</metal:html>
+    <metal:main fill-slot="main">
+      <span tal:condition="python: 1" tal:content="jamb/reg_nr" />
+      <span tal:condition="python: 1" tal:content="jamb/admission_sc_pin" />
+      <span tal:content="student/title_or_id" />
+    </metal:main>
+  </metal:html>
+</tal:block>
Index: /waeup_product/trunk/skins/waeup_student/student_index_html.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/student_index_html.py	(revision 47)
+++ /waeup_product/trunk/skins/waeup_student/student_index_html.py	(revision 47)
@@ -0,0 +1,7 @@
+##parameters=post_id=None, REQUEST=None
+
+# $Id$
+
+"""Default view for the Student."""
+
+return context.student_view_main()
Index: eup_product/trunk/skins/waeup_student/student_view.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/student_view.py	(revision 46)
+++ 	(revision )
@@ -1,8 +1,0 @@
-##parameters=post_id=None, REQUEST=None
-
-# $Id$
-
-"""Default view for the forum. If post_id is not None, post with id = <post_id>
-will be displayed, otherwise first post will be displayed."""
-
-return context.student_view_main()
Index: eup_product/trunk/skins/waeup_student/student_view_main.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_student/student_view_main.pt	(revision 46)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<html metal:use-macro="here/content_lib_master/macros/master">
-
-<metal:block fill-slot="head_slot">
-  <tal:block tal:define="student here/getContent">
-  </tal:block>
-</metal:block>
-
-<metal:block fill-slot="css_slot">
-  <link rel="Stylesheet" type="text/css" href=""
-    tal:attributes="href string:${base_url}student.css" />
-</metal:block>
-
-<metal:block fill-slot="main"
-             tal:define="student here/getContent;
-             items here/contentValues"
-             >
-    <span tal:condition="python: 0" tal:content="items" />
-    <tal:block tal:content="structure student/jamb_where_admitted" />
-    <table cellspacing="0" cellpadding="0">
-      <tal:block condition="python: len(items)">
-        <tr tal:repeat="item items">
-          <td colspan="1"> 
-            <a href="jamb" 
-               tal:attributes="href item/absolute_url"
-               tal:content="item/title_or_id"></a>
-          </td>
-        </tr>
-      </tal:block>
-      <tr tal:condition="python:not len(items)">
-        <td>
-          no Items yet !
-        </td>
-      </tr>
-    </table>
-  </metal:block>
-</html>
Index: /waeup_product/trunk/skins/waeup_student/student_view_manager.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_student/student_view_manager.pt	(revision 47)
+++ /waeup_product/trunk/skins/waeup_student/student_view_manager.pt	(revision 47)
@@ -0,0 +1,36 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+<metal:block fill-slot="css_slot">
+  <link rel="Stylesheet" type="text/css" href=""
+    tal:attributes="href string:${base_url}student.css" />
+</metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="student here/getContent;
+             items here/contentValues"
+             >
+    <span tal:condition="python: 0" tal:content="items" />
+    <tal:block tal:content="structure student/jamb_where_admitted" />
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+      </tal:block>
+      <tr tal:condition="python:not len(items)">
+        <td>
+          no Items yet !
+        </td>
+      </tr>
+    </table>
+  </metal:block>
+</html>
