- Timestamp:
- 20 Jun 2007, 13:43:45 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r1939 r1940 203 203 logger.info(eduplicate % jamb) 204 204 continue 205 # Can not happen, but anyway... 205 # Can not happen, but anyway... 206 206 except KeyError: 207 207 pume.addRecord(**dict) … … 897 897 def exportStudents(self): 898 898 """export Studentsdata to a file""" 899 member = self.portal_membership.getAuthenticatedMember() 899 900 logger = logging.getLogger('Students.exportStudents') 900 901 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 901 902 students_folder = self.portal_url.getPortalObject().campus.students 902 903 export_file = "%s/export/students_%s.csv" % (i_home,current) 904 903 905 from Products.AdvancedQuery import Eq, Between, Le,In,MatchRegexp 904 906 aq_students = self.students_catalog.evalAdvancedQuery … … 932 934 with_lga = True 933 935 fields.append(f) 934 headline = ','.join(fields) 936 headline = ','.join(fields).replace('level','current_level') 935 937 open(export_file,"a").write(headline +'\n') 936 938 format = '"%(' + ')s","%('.join(fields) + ')s"' … … 940 942 'courses_validated')) 941 943 students = aq_students(query) 944 logger.info('%s starts exportStudents, %s student records to export' % (member,len(students))) 942 945 chunk = 100 943 946 total = 0 … … 975 978 url = self.REQUEST.get('URL1') 976 979 return self.REQUEST.RESPONSE.redirect(url) 977 ###) 980 ###) 978 981 979 982 security.declareProtected(ModifyPortalContent,"importResults")###(
Note: See TracChangeset for help on using the changeset viewer.