Index: WAeUP_SRP/trunk/Students.py
===================================================================
--- WAeUP_SRP/trunk/Students.py	(revision 361)
+++ WAeUP_SRP/trunk/Students.py	(revision 362)
@@ -14,4 +14,9 @@
 from Products.CPSCore.CPSMembershipTool import CPSUnrestrictedUser
 from Products.WAeUP_SRP.Academics import makeCertificateCode
+import logging
+import csv,re
+import Globals
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
 
 class StudentsFolder(CPSDocument): ###(
@@ -19,5 +24,5 @@
     WAeUP container for the various WAeUP containers data
     """
-    meta_type = 'Students Folder'
+    meta_type = 'StudentsFolder'
     portal_type = meta_type
     security = ClassSecurityInfo()
@@ -44,5 +49,5 @@
         certs = {}
         for c in l:
-            certs[s.id] = c.getObject()
+            certs[c.id] = c.getObject()
         for student in students:
             logger.info('processing "%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"' % student)
@@ -60,16 +65,18 @@
             if s is None:
                 #self.log('Creating Faculty %(id)s = %(Title)s' % faculty)
-                logger.info('Creating Student with ID %(MatricNo)s %(fullname)s' % faculty)
+                logger.info('Creating Student with ID %(MatricNo)s %(fullname)s' % student)
                 students_folder.invokeFactory('Student', sid)
                 s = getattr(self,sid)
                 s.invokeFactory('StudentPersonal','personal')
-                sp = getattr(self,sid)
+                sp = s.personal
                 d = {'Title': 'Personal Data'}
+                d['matricel_no'] = student.get('MatricNo')
+                d['entry_reg_no'] = student.get('EntryRegNo')
                 d['fullname'] = student.get('fullname')
                 d['firstname'] = student.get('FirstName')
                 d['middlename'] = student.get('MiddleName')
-                d['lastname'] = student.get('LastName')
+                d['lastname'] = student.get('Lastname')
                 d['former_surname'] = student.get('FormerSurname')
-                d['sex'] = student.get('Sex') == 'M'
+                d['sex'] = student.get('Sex') == 'F'
                 d['nationality'] = student.get('Nationality')
                 d['state'] = student.get('State') 
@@ -79,6 +86,22 @@
                 d['campus_address'] = student.get('CampusAddress')
                 d['phone'] = student.get('PhoneNumber')
-                d['email'] = student.get('EmailAddress')
-                f.getContent().edit(mapping=d)
+                d['email'] = student.get('Emailaddress')
+                sp.getContent().edit(mapping=d)
+                #
+                # Study Course
+                #
+                s.invokeFactory('StudentStudyCourse','study_course')
+                sc = s.study_course
+                d = {}
+                d['matricel_no'] = student.get('MatricNo')
+                d['entry_reg_no'] = student.get('EntryRegNo')
+                d['faculty'] = student.get('Faculty')
+                d['department'] = student.get('Dept')
+                d['course_major'] = certcode
+                css = student.get('CurrentSession') or '2004-2005'
+                cs = int(css.split('-')[0]) - 2000
+                cl = int(student.get('StudentLevel'))/100
+                d['entry_session'] = "200%s" % (cs - cl)
+                sc.getContent().edit(mapping=d)
             else:
                 em = 'Faculty with ID %(MatricNo)s %(fullname)s already exists' % student
@@ -111,7 +134,7 @@
         """compose title"""
         reg_nr = self.getId()[1:]
-        data = getattr(self,'PERSONAL',None)
+        data = getattr(self,'personal',None)
         if data is None:
-            data = getattr(self,'JAMB',None)
+            data = getattr(self,'jamb',None)
         if data:
             content = data.getContent()
@@ -212,4 +235,28 @@
 ###)
 
+class StudentStudyCourse(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentStudyCourse'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+##    security.declareProtected(View,"Title")
+##    def Title(self):
+##        """compose title"""
+##        content = self.getContent()
+##        return "StudyCourse Data for %s %s" % (content.firstname,content.lastname)
+
+
+InitializeClass(StudentStudyCourse)
+
+def addStudentStudyCourse(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = StudentStudyCourse(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
 class StudentEligibility(CPSDocument): ###(
     """
Index: WAeUP_SRP/trunk/__init__.py
===================================================================
--- WAeUP_SRP/trunk/__init__.py	(revision 361)
+++ WAeUP_SRP/trunk/__init__.py	(revision 362)
@@ -28,4 +28,5 @@
 from Products.WAeUP_SRP.Students import StudentsFolder, addStudentsFolder
 from Products.WAeUP_SRP.Students import Student, addStudent
+from Products.WAeUP_SRP.Students import StudentStudyCourse, addStudentStudyCourse
 from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal
 from Products.WAeUP_SRP.Students import StudentEligibility, addStudentEligibility
@@ -52,4 +53,5 @@
     StudentsFolder,
     Student,
+    StudentStudyCourse,
     StudentPersonal,
     StudentEligibility,
@@ -74,4 +76,5 @@
     addStudentsFolder,
     addStudent,
+    addStudentStudyCourse,
     addStudentPersonal,
     addStudentEligibility,
@@ -96,4 +99,5 @@
     {}, # StudentsFolder,
     {}, # Student,
+    {}, # StudentStudyCourse,
     {}, # StudentPersonal,
     {}, # StudentEligibility,
Index: WAeUP_SRP/trunk/profiles/default/layouts.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 362)
@@ -19,4 +19,5 @@
  <object name="jambcreate" meta_type="CPS Layout"/>
  <object name="student" meta_type="CPS Layout"/>
+ <object name="student_study_course" meta_type="CPS Layout"/>
  <object name="student_documents" meta_type="CPS Layout"/>
  <object name="student_eligibility" meta_type="CPS Layout"/>
Index: WAeUP_SRP/trunk/profiles/default/layouts/student.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student.xml	(revision 362)
@@ -226,56 +226,4 @@
   <property name="hidden_readonly_layout_modes"/>
  </widget>
- <table>
-  <row>
-   <cell name="adm_check_sc_id"/>
-  </row>
-  <row>
-   <cell name="adm_check_sc_pin"/>
-  </row>
-  <row>
-   <cell name="adm_check_sc_value"/>
-  </row>
-  <row>
-   <cell name="adm_check_date"/>
-  </row>
-  <row>
-   <cell name="clearance_sc_id"/>
-  </row>
-  <row>
-   <cell name="clearance_sc_pin"/>
-  </row>
-  <row>
-   <cell name="clearance_sc_value"/>
-  </row>
-  <row>
-   <cell name="clearance_date"/>
-  </row>
-  <row>
-   <cell name="accommodation"/>
-  </row>
-  <row>
-   <cell name="accommodation_sc_id"/>
-  </row>
-  <row>
-   <cell name="accommodation_sc_pin"/>
-  </row>
-  <row>
-   <cell name="accommodation_sc_value"/>
-  </row>
-  <row>
-   <cell name="accommodation_date"/>
-  </row>
-  <row>
-   <cell name="hostel_fee_sc_id"/>
-  </row>
-  <row>
-   <cell name="hostel_fee_sc_pin"/>
-  </row>
-  <row>
-   <cell name="hostel_fee_sc_value"/>
-  </row>
-  <row>
-   <cell name="hostel_fee_date"/>
-  </row>
- </table>
+ <table/>
 </object>
Index: WAeUP_SRP/trunk/profiles/default/layouts/student_personal.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student_personal.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student_personal.xml	(revision 362)
@@ -8,4 +8,5 @@
  <property name="validate_values_expr"></property>
  <widget name="birthday" meta_type="Date Widget">
+  <property name="title">Day of birth</property>
   <property name="fields">
    <element value="birthday"/>
@@ -18,4 +19,26 @@
   <property name="hidden_readonly_layout_modes"/>
  </widget>
+ <widget name="campus_address" meta_type="String Widget">
+  <property name="title">Campus Address</property>
+  <property name="fields">
+   <element value="campus_address"/>
+  </property>
+  <property name="label">Campus Address</property>
+  <property name="label_edit">Campus Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="city" meta_type="String Widget">
+  <property name="title">City</property>
+  <property name="fields">
+   <element value="city"/>
+  </property>
+  <property name="label">City</property>
+  <property name="label_edit">City</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <widget name="email" meta_type="Email Widget">
   <property name="title">Email</property>
@@ -28,4 +51,15 @@
   <property name="display_width">40</property>
  </widget>
+ <widget name="entry_reg_no" meta_type="String Widget">
+  <property name="title">Jamb Reg No</property>
+  <property name="fields">
+   <element value="entry_reg_no"/>
+  </property>
+  <property name="label">Jamb Reg No</property>
+  <property name="label_edit">Jamb Reg No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <widget name="firstname" meta_type="String Widget">
   <property name="title">First Name</property>
@@ -38,4 +72,26 @@
   <property name="display_width">40</property>
  </widget>
+ <widget name="former_surname" meta_type="String Widget">
+  <property name="title">Former Surname</property>
+  <property name="fields">
+   <element value="former_surname"/>
+  </property>
+  <property name="label">Former Surname</property>
+  <property name="label_edit">Former Surname</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fullname" meta_type="String Widget">
+  <property name="title">Fullname</property>
+  <property name="fields">
+   <element value="fullname"/>
+  </property>
+  <property name="label">Fullname</property>
+  <property name="label_edit">Fullname</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <widget name="lastname" meta_type="String Widget">
   <property name="fields">
@@ -49,4 +105,26 @@
   <property name="display_width">40</property>
  </widget>
+ <widget name="lga" meta_type="String Widget">
+  <property name="title">LGA</property>
+  <property name="fields">
+   <element value="lga"/>
+  </property>
+  <property name="label">LGA</property>
+  <property name="label_edit">LGA</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="matricel_no" meta_type="String Widget">
+  <property name="title">Matricel No</property>
+  <property name="fields">
+   <element value="matricel_no"/>
+  </property>
+  <property name="label">Matricel No</property>
+  <property name="label_edit">Matricel No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <widget name="middlename" meta_type="String Widget">
   <property name="fields">
@@ -61,4 +139,26 @@
   <property name="display_width">40</property>
  </widget>
+ <widget name="nationality" meta_type="String Widget">
+  <property name="title">Nationality</property>
+  <property name="fields">
+   <element value="nationality"/>
+  </property>
+  <property name="label">Nationality</property>
+  <property name="label_edit">Nationality</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="phone" meta_type="String Widget">
+  <property name="title">Phone</property>
+  <property name="fields">
+   <element value="phone"/>
+  </property>
+  <property name="label">Phone</property>
+  <property name="label_edit">Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <widget name="sex" meta_type="Boolean Widget">
   <property name="fields">
@@ -73,4 +173,26 @@
   <property name="label_true">female</property>
  </widget>
+ <widget name="state" meta_type="String Widget">
+  <property name="title">State</property>
+  <property name="fields">
+   <element value="state"/>
+  </property>
+  <property name="label">State</property>
+  <property name="label_edit">State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="street" meta_type="String Widget">
+  <property name="title">Street</property>
+  <property name="fields">
+   <element value="street"/>
+  </property>
+  <property name="label">Street</property>
+  <property name="label_edit">Street</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <table>
   <row>
@@ -84,11 +206,44 @@
   </row>
   <row>
+   <cell name="fullname"/>
+  </row>
+  <row>
+   <cell name="former_surname"/>
+  </row>
+  <row>
+   <cell name="sex"/>
+  </row>
+  <row>
+   <cell name="birthday"/>
+  </row>
+  <row>
+   <cell name="entry_reg_no"/>
+  </row>
+  <row>
+   <cell name="matricel_no"/>
+  </row>
+  <row>
+   <cell name="street"/>
+  </row>
+  <row>
+   <cell name="campus_address"/>
+  </row>
+  <row>
+   <cell name="city"/>
+  </row>
+  <row>
+   <cell name="nationality"/>
+  </row>
+  <row>
+   <cell name="state"/>
+  </row>
+  <row>
+   <cell name="lga"/>
+  </row>
+  <row>
+   <cell name="phone"/>
+  </row>
+  <row>
    <cell name="email"/>
-  </row>
-  <row>
-   <cell name="sex"/>
-  </row>
-  <row>
-   <cell name="birthday"/>
   </row>
  </table>
Index: WAeUP_SRP/trunk/profiles/default/schemas.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 362)
@@ -14,4 +14,5 @@
  <object name="semester" meta_type="CPS Schema"/>
  <object name="student" meta_type="CPS Schema"/>
+ <object name="student_study_course" meta_type="CPS Schema"/>
  <object name="student_accommodation" meta_type="CPS Schema"/>
  <object name="student_admission" meta_type="CPS Schema"/>
Index: WAeUP_SRP/trunk/profiles/default/schemas/student_personal.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/schemas/student_personal.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/schemas/student_personal.xml	(revision 362)
@@ -19,5 +19,5 @@
  </field>
  <field name="lga" meta_type="CPS String Field"/>
- <field name="matricel_nr" meta_type="CPS String Field"/>
+ <field name="matricel_no" meta_type="CPS String Field"/>
  <field name="middlename" meta_type="CPS String Field">
   <property name="is_searchabletext">True</property>
Index: WAeUP_SRP/trunk/profiles/default/types.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/types.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/types.xml	(revision 362)
@@ -17,4 +17,5 @@
  <object name="Semester" meta_type="CPS Flexible Type Information"/>
  <object name="Student" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentStudyCourse" meta_type="CPS Flexible Type Information"/>
  <object name="StudentDocuments" meta_type="CPS Flexible Type Information"/>
  <object name="StudentEligibility" meta_type="CPS Flexible Type Information"/>
Index: WAeUP_SRP/trunk/profiles/default/types/Student.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/types/Student.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/types/Student.xml	(revision 362)
@@ -15,4 +15,5 @@
   <element value="StudentDocuments"/>
   <element value="StudentPersonal"/>
+  <element value="StudentStudyCourse"/>
   <element value="StudyLevel"/>
  </property>
Index: WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml	(revision 362)
@@ -6,6 +6,6 @@
  <property name="content_icon">students_folder.gif</property>
  <property name="content_meta_type">StudentsFolder</property>
- <property name="product">CPSDefault</property>
- <property name="factory">addFolder</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentsFolder</property>
  <property name="immediate_view">folder_view</property>
  <property name="global_allow">True</property>
Index: WAeUP_SRP/trunk/profiles/default/workflows.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows.xml	(revision 361)
+++ WAeUP_SRP/trunk/profiles/default/workflows.xml	(revision 362)
@@ -70,5 +70,5 @@
   </type>
   <type type_id="Student">
-   <bound-workflow workflow_id="waeup_student_wf"/>
+   <bound-workflow workflow_id="section_folder_wf"/>
   </type>
   <type type_id="StudentDocuments">
