Changeset 1759 for WAeUP_SRP/trunk
- Timestamp:
- 8 May 2007, 21:43:38 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r1758 r1759 240 240 def get_csv_filenames(self): 241 241 "do it" 242 files = [file for file in os.listdir("%s/import/" % (i_home)) 242 files = [file for file in os.listdir("%s/import/" % (i_home)) 243 243 if file.endswith('.csv') and file.find('imported') == -1] 244 244 return files … … 352 352 clearance.getContent().edit(mapping=dc) 353 353 self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance) 354 catd = {}355 catd['id'] = sid356 catd['entry_mode']= da['entry_mode']357 catd['matric_no'] = matric_no358 catd['jamb_reg_no'] = da['jamb_reg_no']359 catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp360 catd['sex'] = dp['sex']361 catd['level'] = level362 catd['verdict'] = verdict363 if certificate_brain:364 cpath = certificate_brain.getPath().split('/')365 catd['faculty'] = cpath[-4]366 catd['department'] = cpath[-3]367 catd['course'] = certcode368 self.students_catalog.modifyRecord(**catd)354 ## catd = {} 355 ## catd['id'] = sid 356 ## catd['entry_mode']= da['entry_mode'] 357 ## catd['matric_no'] = matric_no 358 ## catd['jamb_reg_no'] = da['jamb_reg_no'] 359 ## catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp 360 ## catd['sex'] = dp['sex'] 361 ## catd['level'] = level 362 ## catd['verdict'] = verdict 363 ## if certificate_brain: 364 ## cpath = certificate_brain.getPath().split('/') 365 ## catd['faculty'] = cpath[-4] 366 ## catd['department'] = cpath[-3] 367 ## catd['course'] = certcode 368 ## self.students_catalog.modifyRecord(**catd) 369 369 # 370 370 # Study Course … … 377 377 dsc['current_level'] = level 378 378 dsc['current_verdict'] = verdict 379 dsc['current_session'] = '06' 379 380 studycourse.getContent().edit(mapping=dsc) 380 381 # … … 852 853 open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write( 853 854 '\n'.join(not_imported)) 854 em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total) 855 em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total) 855 856 logger.info(em) 856 857 return em -
WAeUP_SRP/trunk/skins/waeup_default/import_form.pt
r1756 r1759 9 9 <metal:block use-macro="here/waeup_content_master/macros/master"> 10 10 <metal:block fill-slot="main"> 11 <h3>Import Data </h3>11 <h3>Import Data!</h3> 12 12 <br /> 13 13 <form action="" id="editForm" method="post" … … 18 18 <br /> 19 19 <input type="submit" class="standalone" 20 name="import" value=" import"20 name="import" value="Import" 21 21 tal:attributes="value button" 22 22 tal:condition="not:creation" />
Note: See TracChangeset for help on using the changeset viewer.