Index: /waeup_product/trunk/Widgets.py
===================================================================
--- /waeup_product/trunk/Widgets.py	(revision 203)
+++ /waeup_product/trunk/Widgets.py	(revision 204)
@@ -55,8 +55,8 @@
     """ ScratchcardPin Widget"""
     meta_type = "Scratchcard Pin Widget"
-    valid_pins = ['123456',
-                  '234567',
-                  '345678',
-                  '456789',
+    valid_pins = ['12345678',
+                  '23456789',
+                  '34567890',
+                  '45678901',
                   ]
     
@@ -71,4 +71,5 @@
             value = datastructure[widget_id]
             err = 0
+            #import pdb; pdb.set_trace()
             if not value in self.valid_pins: 
                 err = 'invalid Pin'
@@ -83,8 +84,4 @@
 widgetRegistry.register(ScratchcardPinWidget)
 
-##class ScratchcardPinWidgetType(CPSWidgetType):
-##    """Scratchcard Pin widget type."""
-##    meta_type = "Scratchcard Pin Widget Type"
-##    cls = ScratchcardPinWidget
 
 ###)
@@ -92,151 +89,2 @@
 ###########
 
-##WidgetTypeRegistry.register(StudentIdWidgetType)
-##WidgetTypeRegistry.register(ScratchcardPinWidgetType)
-
-##class MyProjectWeekDateTimeWidget(CPSDateTimeWidget): ###(
-##    """ """
-##    meta_type = "MyProject Week Date Time Widget"
-##    
-##    def validate(self, datastructure, **kw):
-##        """Validate datastructure and update datamodel."""
-##        
-##        valid = CPSDateTimeWidget.validate(self, datastructure, **kw)
-##        if not valid:
-##            return 0
-##        else:
-##            widget_id = self.getWidgetId()
-##            value = datastructure[widget_id]
-##            err = 0
-##            if value.dow() in (6, 0):
-##                err = 'Cette date ne correspond pas à un jour de semaine'
-##
-##            if err:
-##                datastructure.setError(widget_id, err)
-##
-##            return not err
-##
-##InitializeClass(MyProjectWeekDateTimeWidget)
-
-##class MyProjectWeekDateTimeWidgetType(CPSWidgetType):
-##    """MyProject Week DateTime widget type."""
-##    meta_type = "MyProject Week Date Time Widget Type"
-##    cls = MyProjectWeekDateTimeWidget
-##
-##InitializeClass(MyProjectWeekDateTimeWidgetType)
-##class MyProjectRestrictedStringWidget(CPSStringWidget):
-##    """ """
-##    meta_type = "MyProject Restricted String Widget"
-##    
-##    def validate(self, datastructure, **kw):
-##        """Validate datastructure and update datamodel."""
-##        
-##        valid = CPSStringWidget.validate(self, datastructure, **kw)
-##        if not valid:
-##            return 0
-##        else:
-##            widget_id = self.getWidgetId()
-##            value = datastructure[widget_id]
-##            err = 0
-##            if not (len(value) == 5 and value.isupper() and value.isalpha()):
-##                err = 'Cette chaîne ne correspond pas au format imposé'
-##
-##            if err:
-##                datastructure.setError(widget_id, err)
-##            else:
-##                datamodel = datastructure.getDataModel()
-##                datamodel[self.fields[0]] = value
-##            
-##            return not err
-##
-##InitializeClass(MyProjectRestrictedStringWidget)
-##
-##class MyProjectRestrictedStringWidgetType(CPSWidgetType):
-##    """MyProject Restricted String widget type."""
-##    meta_type = "MyProject Restricted String Widget Type"
-##    cls = MyProjectRestrictedStringWidget
-##
-##InitializeClass(MyProjectRestrictedStringWidgetType)
-##
-##
-##class MyProjectRestrictedEmailWidget(CPSEmailWidget):
-##    """ """
-##    meta_type = "MyProject Restricted Email Widget"
-##
-##    email_myproject_pat = compile(r"^([-\w_+])+\.([-\w_+])+@myproject\.fr$")
-##
-##    def validate(self, datastructure, **kw):
-##        """Validate datastructure and update datamodel."""
-##        
-##        valid = CPSEmailWidget.validate(self, datastructure, **kw)
-##        if not valid:
-##            return 0
-##        else:
-##            widget_id = self.getWidgetId()
-##            err, v = self._extractValue(datastructure[widget_id])
-##            LOG('MyProject: MyProjectWidgets.py', DEBUG, "Valeur de v : %s" % v)
-##            if not err and kw.get('layout_mode') != 'search' and \
-##              v and not self.email_myproject_pat.match(v):
-##                err = 'cpsschemas_err_email'
-##
-##            if err:
-##                datastructure.setError(widget_id, err)
-##            else:
-##                datamodel = datastructure.getDataModel()
-##                datamodel[self.fields[0]] = v
-##            
-##            return not err
-##
-##    def render(self, mode, datastructure, **kw):
-##        """Render in mode from datastructure."""
-##        return CPSStringWidget.render(self, mode, datastructure, **kw)
-##
-##InitializeClass(MyProjectRestrictedEmailWidget)
-##
-##class MyProjectRestrictedEmailWidgetType(CPSWidgetType):
-##    """MyProject Restricted String widget type."""
-##    meta_type = "MyProject Restricted Email Widget Type"
-##    cls = MyProjectRestrictedEmailWidget
-##
-##InitializeClass(MyProjectRestrictedEmailWidgetType)
-##
-##class MyProjectVisitTitleWidget(CPSStringWidget):
-##    """ """
-##    meta_type = "MyProject Visit Title Widget"
-##    
-##    def validate(self, datastructure, **kw):
-##        """Validate datastructure and update datamodel."""
-##        
-##        widget_id = self.getWidgetId()
-##        err = 0
-##        curr_date = DateTime()
-##        date = "%d.%d.%d" % (curr_date.day(), curr_date.month(), curr_date.year())
-##        user = getSecurityManager().getUser()
-##        value = 'Demande de visite du %s par %s' % (date, 
-##             self.portal_directories.members.getEntry(user.getId()).get('fullname'))
-##        datamodel = datastructure.getDataModel()
-##        datamodel[self.fields[0]] = value
-##            
-##        return not err
-##
-##    def render(self, mode, datastructure, **kw):
-##        return ''
-##
-##InitializeClass(MyProjectVisitTitleWidget)
-##
-##class MyProjectVisitTitleWidgetType(CPSWidgetType):
-##    """MyProject Visit Title widget type."""
-##    meta_type = "MyProject Visit Title Widget Type"
-##    cls = MyProjectVisitTitleWidget
-##
-##InitializeClass(MyProjectVisitTitleWidgetType)
-
-#####################################################################################
-
-##WidgetTypeRegistry.register(MyProjectWeekDateTimeWidgetType)
-##WidgetTypeRegistry.register(MyProjectRestrictedStringWidgetType)
-##WidgetTypeRegistry.register(MyProjectRestrictedEmailWidgetType)
-##WidgetTypeRegistry.register(MyProjectVisitTitleWidgetType)
-##
-
-###)
Index: /waeup_product/trunk/__init__.py
===================================================================
--- /waeup_product/trunk/__init__.py	(revision 203)
+++ /waeup_product/trunk/__init__.py	(revision 204)
@@ -1,3 +1,4 @@
 #-*- mode: python; mode: fold -*-
+# $Id$
 from Products.CMFCore.utils import ContentInit, ToolInit
 from Products.CMFCore.DirectoryView import registerDirectory
@@ -26,8 +27,5 @@
 
 
-
 import Widgets
-
-#registerDirectory('skins/waeup_default', globals())
 
 contentClasses = (
Index: /waeup_product/trunk/doc/functionaldescriptions.txt
===================================================================
--- /waeup_product/trunk/doc/functionaldescriptions.txt	(revision 204)
+++ /waeup_product/trunk/doc/functionaldescriptions.txt	(revision 204)
@@ -0,0 +1,150 @@
+======================
+Functionaldescriptions
+======================
+
+
+Accommodation
+=============
+
+
+Bedkategories
+-------------
+
+- female
+
+  + fresh
+  + returning
+  + final
+  + postgraduate
+
+- male
+
+  + fresh
+  + returning
+  + final
+  + postgraduate
+
+Hostels
+-------------
+
+Hall One
+````````
+Structure
+:::::::::
+
+- 7 Blocks  (A,B,C,D,E,F,G)
+
+  * 3 Floors (100,200,300)
+
+    + 10 Rooms
+
+      - 6 Bedspaces (A,B,C,D,E,F)
+
+Allocation
+::::::::::
+
+- Beds A,B female_final
+- Beds C   female_returning
+- Beds D,E,F female_fresh
+
+Hall Two
+````````
+Structure
+:::::::::
+
+- 6 Blocks  (A,B,C,D,E,F)
+
+  * 4 Floors (100,200,300,400) ???
+  
+    + 10 Rooms (1 - 10)
+    
+      - 8 Bedspaces (A,B,C,D,E,F,G,H)
+
+Allocation
+::::::::::
+
+- Beds A,B female_final
+- Beds C,D   female_returning
+- Beds E,F,G,H female_fresh
+
+Hall Three
+``````````
+Structure
+:::::::::
+
+- 6 Blocks  (A,B,C,D,E,F)
+
+  * 4 Floors (100,200,300,400) ???
+  
+    + 10 Rooms (1 - 10)
+    
+      - 8 Bedspaces (A,B,C,D,E,F,G,H)
+      
+
+Allocation
+::::::::::
+
+- Beds A,B male_final
+- Beds C,D male_returning
+- Beds E,F,G,H male_fresh
+
+Hall Four
+`````````
+Structure
+:::::::::
+
+- Section I
+
+  * 200 Rooms (1 - 200)
+  
+    + 8 Bedspaces (A,B,C,D,E,F,G,H)
+
+- Section II
+
+  * 200 Rooms (1 - 200)
+  
+    + 8 Bedspaces (A,B,C,D,E,F,G,H)
+     
+
+- Section III
+
+  * 147 Rooms (1 - 147)
+
+    + 8 Bedspaces (A,B,C,D,E,F,G,H)
+
+
+Allocation
+::::::::::
+
+- Beds A,B male_final
+- Beds C,D   male_returning
+- Beds E,F,G,H male_fresh
+
+Hall Five
+`````````
+Structure
+:::::::::
+
+- 2 Blocks  (A,B)
+  * 100 Bedspaces
+
+Allocation
+::::::::::
+
+- Block A female_final
+- Block B male_final
+
+Medical Hostel
+``````````````
+Structure
+:::::::::
+
+- 2 Blocks  (A,B)
+  * 138 Bedspaces
+
+Allocation
+::::::::::
+
+- Block A female_medical_500_600,female_dental_500_600 (60/40)
+- Block B male_medical_500_600,male_dental_500_600 (60/40)
+
Index: /waeup_product/trunk/doc/usecases.txt
===================================================================
--- /waeup_product/trunk/doc/usecases.txt	(revision 204)
+++ /waeup_product/trunk/doc/usecases.txt	(revision 204)
@@ -0,0 +1,35 @@
+========
+Usecases
+========
+
+Accommodation
+=============
+
+Manager
+```````
+Assign Bedspace
+:::::::::::::::
+A single bedspace can be assigned to a student according to his/her sex.
+
+Deassign Bedspace
+:::::::::::::::::
+An assigned bedspace can be deassigned
+
+Student
+```````
+Assign Bedspace
+:::::::::::::::
+A single bedspace is automatically assigned to a student according to
+ 
+- sex
+- level of study
+- course of study
+
+if such a bedspace is available.
+
+This is protected by a N500.00 scratchcard.
+
+The Hostel Allocation Slip is printed.
+
+
+
Index: /waeup_product/trunk/doc/userdescriptions.txt
===================================================================
--- /waeup_product/trunk/doc/userdescriptions.txt	(revision 204)
+++ /waeup_product/trunk/doc/userdescriptions.txt	(revision 204)
@@ -0,0 +1,173 @@
+================
+Userdescriptions
+================
+
+Accommodation
+=============
+
+HOSTEL ALLOCATION SLIP
+----------------------
+
+
+The fields needed for generating Hostel Allocation Slip are as follows:
+
+Student's Entry Registration No. 
+  (for new students, Matriculation No. for Old Students)
+
+Full Name
+
+Access PIN 
+  (the Scratch PIN purchased from a bank and used for the application)
+
+Sex
+  (eg. Male or Female)
+	
+Session
+  (Current Academic Session
+	
+Course of Study
+  (e.g. Medicine, Pharmacy, Biochemistry, Law or Accounting)
+  
+Level of Study 
+  (100, 200, 300, 400, 500 or 600 depending on the course of study)
+
+Then the details of the hostel allocation comprising:
+
+Date of Allocation
+  (This is the date the reservation was made)
+
+Name of Residence Hall
+	
+Block 
+
+Room Number
+
+Bed Space Allocated
+
+Annotation/Note
+  This is to affirm that you have been allocated a room in the hostel,
+  details as shown above. Please print this Allocation Slip and keep for Hostel Clearance
+
+
+HOSTEL CATEGORIES
+-----------------
+    
+The Hostel Categories are as follows:
+
+- Ugbowo Campus (Main Campus)
+
+  1. Hall One:  For all Categories of Female Students
+  2. Hall Two:  For all Categories of Female Students
+  3. Hall Three: For all Categories of Male Students
+  4. Hall Four: For all Categories of Male Students
+  5. Hall Five: For only Final Year Male & Female Students
+  6. Medical Hostel: For all 500 & 600 Level Medical & Dental Students only
+ 
+- Ekehuan Campus (satellite campus)
+
+  1. Female Undergraduate Hall 
+  2. Male Undergraduate Hall 
+  3. Postgraduate Hostel: For all Male Postgraduate Students 
+  4. Postgraduate Female Hostel: For all Female Postgraduate Students
+
+
+DETAILED HOSTEL DESCRIPTION
+---------------------------
+
+Hall One
+::::::::
+
+Consist of 7 Blocks labeled A,B,C.. & G, each Block consist of 30 rooms
+spread across three floors (10 rooms per floor). The first room on the
+Ground floor of Block A is numbered 101, the next 102, while the last room
+is labeled 110. The first room on the next floor is also labeled 201, next
+202 and the 10th room on that floor is 210. Each room has 6 bed spaces
+labeled A, B, C, D, E & F. Therefore, the first space to be allocated will
+Hall one, Block A, Room 101, Bed Space A. 
+
+Therefore, there are a total of 1,260 bed spaces in Hall One. (7 Blocks X 30
+rooms X 6 bed spaces).
+
+Hall Two
+::::::::
+ 
+This hall consist of 6 Blocks labeled A, B,C, D,E & F; each Block consist of
+40 rooms, each room has 8 bed spaces. The bed spaces are labeled exactly as
+described in Hall One above.
+
+Therefore, there are a total of 1,920 bed spaces in Hall One. (6 Blocks X 40
+rooms  bed spaces).
+
+
+Hall Three
+::::::::::
+
+Same as Hall Two
+
+Hall Four
+:::::::::
+
+This hall is divided into 3 Sections as follows:
+
+Section I 
+  has a total of 200 Rooms with 8 bed spaces in each room
+
+Section II 
+  has a total of 200 Rooms with 8 bed spaces in each room
+
+Section III
+  has a total of 147 Rooms with 8 bed spaces in each room
+
+Therefore, there are a total of 4,376 bed spaces in Hall Four.
+
+Hall Five
+:::::::::
+
+This hall of residence has two blocks, each has 100 bed spaces. One block accommodates
+final year male students while the other is for final  year female students.
+
+Medical Hostel
+::::::::::::::
+
+Has two blocks, each for male and female (500 & 600 Medical & Dental Students) with capacity  to accommodate 138 students each.
+
+Postgraduate Accommodation is currently being handled manually, I will give
+the details in my subsequent mail.
+
+
+Hostel Allocation Criteria
+--------------------------
+
+1. Only Full Time (Undergraduate & Postgraduate Students are entitled to
+Hostel Accommodation Allocation. 
+
+2. For all undergraduate hostel allocations, the available bed spaces are
+allocated as follows
+
+ a) Bed Spaces A & B in halls one, two, three & four are meant for Final Year Students only
+
+ b) Bed Space C in Hall One is strictly meant for Returning Students 
+
+ c) Bed Spaces D,E & F in Hall One are meant to be allocated to fresh students
+
+ d) In Halls Two, Three and Four, Bed Spaces C & D are for Returning Students and E,F,G & H are for Fresh Students
+
+
+3. Medical Hostel are allocated 500 & 600 Medical and Dental Students at a
+ratio 60:40 respectively
+
+4. All the available bed spaces (A, B, C, D, E, F, G & H) in Hall Five are
+allocated to FINAL YEAR ONLY
+
+5. Just before the commencement of Hostel Allocations, some reservations are
+made officially for Student Union Leaders, Sports Men and Women, Disabled or
+Physically-Challenged Students, etc. Therefore, there should be provision to
+make reservations at the back-end, and populate such reservations at a later
+date.
+
+6. The Hall of Residence attracts different charges, so students do not pay
+same amount for allocated spaces
+
+7. The Hostel Application Fee is all the same irrespective of the Hall of
+Residence the student is seeking reservation, and it N500.00
+
Index: /waeup_product/trunk/profiles/default/layouts/jamb.xml
===================================================================
--- /waeup_product/trunk/profiles/default/layouts/jamb.xml	(revision 203)
+++ /waeup_product/trunk/profiles/default/layouts/jamb.xml	(revision 204)
@@ -60,7 +60,11 @@
    <element value="firstname"/>
   </property>
+  <property name="is_required">True</property>
   <property name="label">First Name</property>
   <property name="label_edit">First Name</property>
   <property name="description">First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
   <property name="display_width">40</property>
  </widget>
@@ -69,4 +73,5 @@
    <element value="lastname"/>
   </property>
+  <property name="is_required">True</property>
   <property name="label">Surname</property>
   <property name="label_edit">Surname</property>
Index: /waeup_product/trunk/profiles/default/layouts/jambcreate.xml
===================================================================
--- /waeup_product/trunk/profiles/default/layouts/jambcreate.xml	(revision 203)
+++ /waeup_product/trunk/profiles/default/layouts/jambcreate.xml	(revision 204)
@@ -60,7 +60,11 @@
    <element value="firstname"/>
   </property>
+  <property name="is_required">True</property>
   <property name="label">First Name</property>
   <property name="label_edit">First Name</property>
   <property name="description">First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
   <property name="display_width">40</property>
  </widget>
@@ -69,4 +73,5 @@
    <element value="lastname"/>
   </property>
+  <property name="is_required">True</property>
   <property name="label">Surname</property>
   <property name="label_edit">Surname</property>
Index: /waeup_product/trunk/profiles/default/workflows.xml
===================================================================
--- /waeup_product/trunk/profiles/default/workflows.xml	(revision 203)
+++ /waeup_product/trunk/profiles/default/workflows.xml	(revision 204)
@@ -39,4 +39,22 @@
    <bound-workflow workflow_id="waeup_base_wf"/>
   </type>
+  <type type_id="StudentPersonal">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="StudentEligibility">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="StudentDocuments">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="StudyLevel">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="Semester">
+   <bound-workflow workflow_id="waeup_student_wf"/>
+  </type>
+  <type type_id="CourseTicket">
+   <bound-workflow workflow_id="waeup_student_wf"/>
+  </type>
  </bindings>
 </object>
Index: /waeup_product/trunk/skins/waeup_default/logged_in.pt
===================================================================
--- /waeup_product/trunk/skins/waeup_default/logged_in.pt	(revision 203)
+++ /waeup_product/trunk/skins/waeup_default/logged_in.pt	(revision 204)
@@ -39,5 +39,5 @@
                    >
           <tal:block 
-              condition="python:'Students' in member.getGroups()"
+              condition="python:1 or 'Student' in member.getRoles()"
               tal:define="dummy python: context.process_waeup_login(member=member,sc_pin=request.get('sc_pin'))" />
           <tal:block condition="first_time">
Index: /waeup_product/trunk/skins/waeup_student/create_jamb.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 203)
+++ /waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 204)
@@ -52,19 +52,12 @@
     try:
         #pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student','Contributor'))
-        pr.addMember(s_id, '123456',roles=('Member','CPSMember','Student','Contributor'))
+        pr.addMember(s_id, '123456',roles=('Member','CPSMember','Student'))
     except:
         noCPSMember = True
     if noCPSMember:
         #pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
-        pr.addMember(s_id, '123456',roles=('Member','Student','Contributor'))
-    student.manage_setLocalRoles(s_id, ['Owner'])
-    jamb.manage_setLocalRoles(s_id, ['Owner'])
-##    student.getContent().setOwnership(s_id)
-##    jamb.getContent().setOwnership(s_id)
-##    groups = context.portal_directories.groups
-##    gm = list(groups.getEntry('Students')['members'])
-##    gm.extend((s_id,))
-##    groups.editEntry({'group': 'Students', 
-##                      'members': gm})  
+        pr.addMember(s_id, '123456',roles=('Member','Student'))
+    student.manage_setLocalRoles(s_id, ['Owner',])
+    jamb.manage_setLocalRoles(s_id, ['Owner',])
     return context.students_folder_view_manager(psm=psm)
 
Index: /waeup_product/trunk/skins/waeup_student/process_waeup_login.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/process_waeup_login.py	(revision 203)
+++ /waeup_product/trunk/skins/waeup_student/process_waeup_login.py	(revision 204)
@@ -8,10 +8,10 @@
 response=request.response
 
-if request.form.get('submit') == 'Login':
-    #waeup = context.portal_catalog(id = 'demouni')[0]
-    waeup = context.portal_catalog(portal_type = 'University')[0]
-    if "Manager" in member.getRoles():
-        return
-    return response.redirect(waeup.getURL())
+##if request.form.get('submit') == 'Login':
+##    #waeup = context.portal_catalog(id = 'demouni')[0]
+##    waeup = context.portal_catalog(portal_type = 'University')[0]
+##    if "Manager" in member.getRoles():
+##        return
+##    return response.redirect(waeup.getURL())
 
 member_id = str(member)
