Index: WAeUP_SRP/base/WAeUPTool.py
===================================================================
--- WAeUP_SRP/base/WAeUPTool.py	(revision 2513)
+++ WAeUP_SRP/base/WAeUPTool.py	(revision 2514)
@@ -633,4 +633,82 @@
 ###)
 
+    security.declarePublic('admitOneStudent') ###(
+    def admitOneStudent(self,brain):
+        "create Datastructure for an admitted Student"
+        #import pdb;pdb.set_trace()
+        students_folder = self.portal_url.getPortalObject().campus.students
+        logger = logging.getLogger('WAeUPTool.admitStudent')
+        if brain.status != "admitted":
+            logger.info('status of %s is %s' % (brain.reg_no,brain.status))
+        pin_parts = brain.pin.split('-')
+        if len(pin_parts) != 3:
+            logger.info('invalid pin %s for %s' % (brain.pin,brain.reg_no))
+        student_id = self.generateStudentId(letter)
+        students_folder.invokeFactory('Student', student_id)
+        student_object = getattr(students_folder,student_id)
+        password = pin_parts[2]
+        self.makeStudentMember(student_id,password = password)
+        student.manage_setLocalRoles(sid, ['Owner',])
+        logger.info("creating %s reg_no %s" % (student_id,brain.reg_no))
+        #
+        # application
+        #
+        student_obj.invokeFactory('StudentApplication','application')
+        application = student_obj.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
+        da['jamb_sex'] = brain.sex
+        da['jamb_lga'] = brain.lga
+        da['app_email'] = brain.email
+        da['app_mobile'] = brain.phone_nr
+        application.getContent().edit(mapping=da)
+        self.portal_workflow.doActionFor(application,'close',dest_container=application)
+        #
+        # personal
+        #
+        student_obj.invokeFactory('StudentPersonal','personal')
+        personal = student_obj.personal
+        self.portal_workflow.doActionFor(personal,'open',dest_container=personal)
+        dp = {'Title': 'Personal Data'}
+        dp['sex'] = brain.sex
+        dp['email'] = brain.email
+        dp['phone'] = brain.phone_nr
+        dp['lastname'] = brain.lastname
+        personal.getContent().edit(mapping=dp)
+        #
+        # clearance
+        #
+        student_obj.invokeFactory('StudentClearance','clearance')
+        clearance = student_obj.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)
+        #
+        # study Course
+        #
+        student_obj.invokeFactory('StudentStudyCourse','study_course')
+        studycourse = student_obj.study_course
+        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
+        studycourse.getContent().edit(mapping=dsc)
+        #
+        # payments folder
+        student_obj.invokeFactory('PaymentsFolder','payments')
+        payments = getattr(student_obj,'payments')
+        dpay = {}
+        dpay['Title'] = 'Payments'
+        payments.getContent().edit(mapping=dpay)
+        wftool.doActionFor(payments,'open')
+        return student_id
+    ###)
+
     security.declarePublic('makeStudentLevel') ###(
     def makeStudentLevel(self,student_id):
@@ -1132,4 +1210,25 @@
         c.getContent().edit(mapping=mapping)
         return certificate_id,''
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'mass_create_applicant') ###(
+    def mass_create_applicant(self,mapping):
+        #import pdb;pdb.set_trace()
+        try:
+            self.applicants_catalog.addRecord(**mapping)
+        except ValueError:
+            return '', "applicant already exists: %s" % mapping.get('reg_no')
+        return key,''
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'mass_edit_applicant') ###(
+    def mass_edit_applicant(self,mapping):
+        #import pdb;pdb.set_trace()
+        reg_no = mapping.get('reg_no')
+        try:
+            self.applicants_catalog.modifyRecord(**mapping)
+        except KeyError:
+            return '', "applicant does not exists: %s" % reg_no
+        return reg_no,''
     ###)
 
@@ -1527,5 +1626,4 @@
                                      for id,widget in layout.objectItems()
                                      if widget.is_required]
-                    #import pdb;pdb.set_trace()
                     if not set(required_keys).issubset(set(import_keys)):
                         diff2import = set(required_keys).difference(set(import_keys))
Index: WAeUP_SRP/base/skins/waeup_utilities/moveCourseResults.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_utilities/moveCourseResults.py	(revision 2513)
+++ WAeUP_SRP/base/skins/waeup_utilities/moveCourseResults.py	(revision 2514)
@@ -47,8 +47,8 @@
 cocount = 0
 commit_after = 20
+moved_sids = context.course_results.uniqueValuesFor('student_id')
 for brain in brains:
     count += 1    
-    already_moved = aq_results(Eq('student_id',brain.id))
-    if len(already_moved) > 0:
+    if brain.id in moved_sids:
         continue
     try:
@@ -71,7 +71,7 @@
             context.waeup_tool.doCommit()
             logger.info("Committing %s transactions, total %s" % (commit_after,count))
-            #cocount += 1
-            #if cocount > 3:
-            #    break
+            cocount += 1
+            if cocount > 2:
+                break
 
 msg = "finished moving results of %d students" % (moved)
