Changeset 567
- Timestamp:
- 27 Sep 2006, 10:04:12 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Academics.py
r563 r567 90 90 return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1')) 91 91 ###) 92 93 92 94 93 security.declareProtected(ModifyPortalContent,"loadDepartmentsFromCSV")###( … … 838 837 export.append(heading) 839 838 #import pdb;pdb.set_trace() 839 fields = ("code", 840 "review_state", 841 "title", 842 "faculty_code", 843 "department_code", 844 "credits", 845 "org_code", 846 "passmark", 847 "semester", 848 "session", 849 ) 840 850 for faculty in faculties: 841 851 di = {} … … 845 855 for course in department.courses.objectValues(): 846 856 course_d = course.getContent() 847 try: 848 di['code'] = course_d.code 849 di['title'] = course_d.title 850 di['category'] = course_d.category 851 di['adm_status'] = course_d.adm_status 852 di['credits'] = course_d.credits 853 di['former_code'] = course_d.former_code 854 di['org_code'] = course_d.org_code 855 di['passmark'] = course_d.passmark 856 di['semester'] = course_d.semester 857 di['session'] = course_d.session 858 di['code'] = di['code'] or course.id 859 di['review_state'] = self.portal_workflow.getInfoFor(course,'review_state','no_state') 860 export.append(dataline % di) 861 logger.info('exporting %s %s ' % (course.id, course.title)) 862 except: 863 logger.info('could not export %s %s ' % (course.id, course.title)) 857 for f in fields: 858 di[f] = getattr(course_d,f,None) 859 ## try: 860 ## di['code'] = course_d.code 861 ## di['title'] = course_d.title 862 ## di['category'] = course_d.category 863 ## di['adm_status'] = course_d.adm_status 864 ## di['credits'] = course_d.credits 865 ## di['former_code'] = course_d.former_code 866 ## di['org_code'] = course_d.org_code 867 ## di['passmark'] = course_d.passmark 868 ## di['semester'] = course_d.semester 869 ## di['session'] = course_d.session 870 ## di['code'] = di['code'] or course.id 871 ## di['review_state'] = self.portal_workflow.getInfoFor(course,'review_state','no_state') 872 export.append(dataline % di) 873 logger.info('exporting %s %s ' % (course.id, course.title)) 874 ## except: 875 ## logger.info('could not export %s %s ' % (course.id, course.title)) 864 876 continue 865 877 open("%s/import/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
Note: See TracChangeset for help on using the changeset viewer.