Changeset 1802 for WAeUP_SRP/trunk
- Timestamp:
- 21 May 2007, 14:32:59 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r1801 r1802 215 215 ###) 216 216 217 218 217 security.declareProtected(ModifyPortalContent,"createStudents")###( 219 218 def createStudents(self): 220 """load Studentdata from CSV values""" 219 """ 220 load addmitted Studentdata from CSV values and create Studentobjects. 221 This is the current method to create new addmitted Students. 222 Before running the eventservice for the students_catalog must be disabled. 223 """ 221 224 import transaction 222 225 import random 223 226 #from pdb import set_trace 224 227 wftool = self.portal_workflow 225 students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 228 #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 229 students_folder = self.portal_url.getPortalObject().campus.students 226 230 #entry_levels = {'ume_ft':'100', 227 231 # 'de_ft': '200', … … 395 399 #import pdb;pdb.set_trace() 396 400 self.students_catalog.addRecord(**catalog_entry) 397 if tr_count > 10 :401 if tr_count > 1000: 398 402 if len(no_import) > 0: 399 403 open("%s/import/%s_not_imported.csv" % (i_home,name),"a").write( … … 418 422 wftool = self.portal_workflow 419 423 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 420 students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()421 #students_folder = self.portal_url().getPortalObject().campus.students424 #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 425 students_folder = self.portal_url.getPortalObject().campus.students 422 426 tr_count = 1 423 427 total = 0 … … 500 504 ###) 501 505 502 503 506 security.declareProtected(ModifyPortalContent,"fixAllNames")###( 504 507 def fixAllNames(self): … … 600 603 ###) 601 604 602 603 604 605 security.declareProtected(ModifyPortalContent,"updateReturningStudents")###( 605 606 def updateReturningStudents(self): … … 610 611 wftool = self.portal_workflow 611 612 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 612 students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 613 #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 614 students_folder = self.portal_url.getPortalObject().campus.students 613 615 tr_count = 1 614 616 total = 0 … … 704 706 wftool = self.portal_workflow 705 707 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 706 students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 708 #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 709 students_folder = self.portal_url.getPortalObject().campus.students 707 710 tr_count = 1 708 711 total = 0 … … 793 796 ###) 794 797 795 796 798 security.declareProtected(ModifyPortalContent,"updateStudyCourse")###( 797 799 def updateStudyCourse(self): … … 801 803 from pdb import set_trace 802 804 wftool = self.portal_workflow 803 students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 805 #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 806 students_folder = self.portal_url.getPortalObject().campus.students 804 807 csv_d = {'jamb_reg_no': "RegNumber", 805 808 'jamb_lastname': "Name",
Note: See TracChangeset for help on using the changeset viewer.