Changeset 763 for WAeUP_SRP/trunk/Students.py
- Timestamp:
- 27 Oct 2006, 10:37:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r758 r763 235 235 import transaction 236 236 import random 237 wftool = self.portal_workflow 237 238 students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject() 238 239 csv_d = {'jamb_reg_no': "Matnumber", … … 285 286 logger.info(processing % jamb) 286 287 jamb_reg_no = jamb.get(csv_d['jamb_reg_no']) 287 res = self.portal_catalog({'meta_type': "StudentApplication", 288 #import pdb;pdb.set_trace() 289 res = self.portal_catalog({'portal_type': "StudentApplication", 288 290 'jamb_reg_no': jamb_reg_no }) 289 291 if res: … … 308 310 student = getattr(self,sid) 309 311 student.manage_setLocalRoles(sid, ['Owner',]) 312 student.invokeFactory('StudentPume','pume') 313 dp = {'Title': 'Pume Data'} 310 314 student.invokeFactory('StudentApplication','application') 311 315 da = {'Title': 'Application Data'} … … 320 324 'jamb_first_cos', 321 325 'jamb_second_cos', 326 ) 327 for f in da_fields: 328 da[f] = jamb.get(csv_d[f]) 329 app = student.application 330 app.getContent().edit(mapping=da) 331 #wftool.doActionFor(app,'open',dest_container=app) 332 app.manage_setLocalRoles(sid, ['Owner',]) 333 dp_fields = ( 322 334 'pume_eng_score', 323 335 'pume_tot_score', 324 336 ) 325 for daf in da_fields: 326 da[daf] = jamb.get(csv_d[daf]) 327 app = student.application 328 app_doc = app.getContent() 329 app_doc.edit(mapping=da) 330 #wftool.doActionFor(app,'open',dest_container=app) 331 app.manage_setLocalRoles(sid, ['Owner',]) 337 for f in dp_fields: 338 da[f] = jamb.get(csv_d[f]) 339 pume = student.application 340 pume.getContent().edit(mapping=da) 341 wftool.doActionFor(pume,'close',dest_container=app) 342 pume.manage_setLocalRoles(sid, ['Owner',]) 332 343 student.getContent().createSubObjects() 333 344 if len(no_import) > 1: … … 804 815 ob = StudentApplication(id, **kw) 805 816 return CPSBase_adder(container, ob, REQUEST=REQUEST) 817 ###) 806 818 807 819 … … 826 838 ob = StudentPume(id, **kw) 827 839 return CPSBase_adder(container, ob, REQUEST=REQUEST) 828 829 840 ###) 830 841
Note: See TracChangeset for help on using the changeset viewer.