Index: /WAeUP_SRP/base/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/base/WAeUPTool.py	(revision 2574)
+++ /WAeUP_SRP/base/WAeUPTool.py	(revision 2575)
@@ -640,5 +640,5 @@
 
     security.declareProtected(ModifyPortalContent,'admitOneStudent') ###(
-    def admitOneStudent(self,brain):
+    def admitOneStudent(self,brain,entry_session):
         "create Datastructure for an admitted Student"
         #import pdb;pdb.set_trace()
@@ -655,6 +655,7 @@
         students_folder.invokeFactory('Student', student_id)
         student_object = getattr(students_folder,student_id)
-        password = pin_parts[2]
-        self.makeStudentMember(student_id,password = password)
+        #password = pin_parts[2]
+        #self.makeStudentMember(student_id,password = password)
+        self.makeStudentMember(student_id)
         student_object.manage_setLocalRoles(student_id, ['Owner',])
         #logger.info("creating %s reg_no %s" % (student_id,brain.reg_no))
@@ -664,22 +665,48 @@
         student_object.invokeFactory('StudentApplication','application')
         application = student_object.application
-        self.portal_workflow.doActionFor(application,'open',dest_container=application)
+        #self.portal_workflow.doActionFor(application,'open',dest_container=application)
         da = {'Title': 'Application Data'}
         da['jamb_reg_no'] = brain.reg_no
-        da['entry_mode'] = brain.entry_mode
-        da['jamb_lastname'] = brain.lastname
+        
         sex = 'M'
         if brain.sex:
             sex = 'F'
         da['jamb_sex'] = sex
-        da['app_ac_pin'] = brain.pin
-        state_lga = brain.lga.split('_')
-        da['state_lga'] = state_lga[0]
-        da['jamb_lga'] = state_lga[-1]
-        #da['jamb_score'] = brain.????
+        #da['app_ac_pin'] = brain.pin
+        #if brain.lga:
+        #    state_lga = brain.lga.split('_')
+        #    da['state_lga'] = state_lga[0]
+        #    da['jamb_lga'] = state_lga[-1]
+        da['state_lga'] = brain.jamb_lga
+        da['jamb_lga'] = brain.jamb_state
+        da['jamb_score'] = brain.aggregate
         da['app_email'] = brain.email
         da['app_mobile'] = brain.phone
+        if brain.entry_mode:
+            da['entry_mode'] = brain.entry_mode
+        elif brain.screening_type == 'pume':
+            da['entry_mode'] = 'ume_ft'
+        elif brain.screening_type == 'pde':
+            da['entry_mode'] = 'de_ft'
+        else:
+            da['entry_mode'] = brain.screening_type
+        da['entry_session'] = entry_session
+        da['jamb_lastname'] = brain.lastname
+        da['jamb_middlename'] = brain.middlenames   # different field names!
+        da['firstname'] = brain.firstname
+        da['screening_application_date'] = brain.application_date
+        da['date_of_birth'] = brain.date_of_birth
+        da['jamb_first_cos'] = brain.course1
+        da['jamb_second_cos'] = brain.course2
+        da['course3'] = brain.course3
+        da['screening_type'] = brain.screening_type
+        da['screening_score'] = brain.screening_score
+        da['screening_date'] = brain.screening_date
+        da['hq_type'] = brain.hq_type
+        da['hq_grade'] = brain.hq_grade
+        da['aos'] = brain.aos
+        
         application.getContent().edit(mapping=da)
-        self.portal_workflow.doActionFor(application,'close',dest_container=application)
+        #self.portal_workflow.doActionFor(application,'close',dest_container=application)
         #
         # personal
@@ -687,5 +714,5 @@
         student_object.invokeFactory('StudentPersonal','personal')
         personal = student_object.personal
-        self.portal_workflow.doActionFor(personal,'open',dest_container=personal)
+        #self.portal_workflow.doActionFor(personal,'open',dest_container=personal)
         dp = {'Title': 'Personal Data'}
         dp['sex'] = brain.sex
@@ -693,4 +720,6 @@
         dp['phone'] = brain.phone
         dp['lastname'] = brain.lastname
+        dp['middlename'] = brain.middlenames   # different field names!
+        dp['firstname'] = brain.firstname        
         personal.getContent().edit(mapping=dp)
         #
@@ -699,9 +728,9 @@
         student_object.invokeFactory('StudentClearance','clearance')
         clearance = student_object.clearance
-        self.portal_workflow.doActionFor(clearance,'open',dest_container=clearance)
+        #self.portal_workflow.doActionFor(clearance,'open',dest_container=clearance)
         dc = {'Title': 'Clearance/Eligibility Record'}
         dc['lga'] = brain.lga
         clearance.getContent().edit(mapping=dc)
-        self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance)
+        #self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance)
         #
         # study Course
@@ -709,9 +738,14 @@
         student_object.invokeFactory('StudentStudyCourse','study_course')
         studycourse = student_object.study_course
-        self.portal_workflow.doActionFor(studycourse,'open',dest_container=studycourse)
+        #self.portal_workflow.doActionFor(studycourse,'open',dest_container=studycourse)
         dsc = {}
         dsc['study_course'] = brain.course_admitted
         dsc['current_verdict'] = ''
-        dsc['current_mode'] = brain.entry_mode
+        dsc['current_mode'] = da['entry_mode']
+        if da['entry_mode'].startswith('de'):
+            dsc['current_level'] = '200'
+        else:
+            dsc['current_level'] = '100'
+        dsc['current_session'] = entry_session
         studycourse.getContent().edit(mapping=dsc)
         #
Index: /WAeUP_SRP/base/skins/waeup_student/admitStudents.py
===================================================================
--- /WAeUP_SRP/base/skins/waeup_student/admitStudents.py	(revision 2574)
+++ /WAeUP_SRP/base/skins/waeup_student/admitStudents.py	(revision 2575)
@@ -22,4 +22,5 @@
     return
 
+entry_session = '07'
 
 import logging
@@ -36,5 +37,5 @@
     response.write("%s<br>\n\r" % s)
 
-brains = aq_applicants(In('status',('admitted'),)) 
+brains = aq_applicants(In('status',('admitted'),))
 total = len(brains)
 logger.info("found %d students" % (total))
@@ -51,9 +52,9 @@
         logger.info("Committing %s transactions, total %s" % (commit_after,count))
         cocount += 1
-        if cocount > 3:
+        if cocount > 1:
             break
     brain = aq_applicants(Eq('reg_no',reg_no))[0]
     #logger.info("start creating  objects of student %s" % (brain.reg_no))
-    sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain)
+    sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain,entry_session)
     if sid is not None:
         d['reg_no'] = reg_no
@@ -63,5 +64,5 @@
     else:
         logger.info("could not create  objects of student %s with pin " % (reg_no,brain.pin))
-        
+
 msg = "finished admitting %d students" % (admitted)
 logger.info(msg)
Index: /WAeUP_SRP/base/skins/waeup_student/application_edit_form.pt
===================================================================
--- /WAeUP_SRP/base/skins/waeup_student/application_edit_form.pt	(revision 2574)
+++ /WAeUP_SRP/base/skins/waeup_student/application_edit_form.pt	(revision 2575)
@@ -7,5 +7,5 @@
                       layout_mode='edit',
                       schema_id = 'student_application',
-                      layout_id = 'student_application_fe',
+                      layout_id = 'student_application',
                       request=request, 
                       use_session=True,);
Index: /WAeUP_SRP/base/skins/waeup_student/application_slip.pt
===================================================================
--- /WAeUP_SRP/base/skins/waeup_student/application_slip.pt	(revision 2574)
+++ /WAeUP_SRP/base/skins/waeup_student/application_slip.pt	(revision 2575)
@@ -12,5 +12,5 @@
               tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
               layout_mode='view_slip', 
-              layout_id='student_application_fe')" 
+              layout_id='student_application')" 
               />
       </span>
