Changeset 1940


Ignore:
Timestamp:
20 Jun 2007, 13:43:45 (18 years ago)
Author:
Henrik Bettermann
Message:

some more logging messages

current_level instead of level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r1939 r1940  
    203203                        logger.info(eduplicate % jamb)
    204204                        continue
    205                     # Can not happen, but anyway...   
     205                    # Can not happen, but anyway...
    206206                    except KeyError:
    207207                        pume.addRecord(**dict)
     
    897897    def exportStudents(self):
    898898        """export Studentsdata to a file"""
     899        member = self.portal_membership.getAuthenticatedMember()
    899900        logger = logging.getLogger('Students.exportStudents')
    900901        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
    901902        students_folder = self.portal_url.getPortalObject().campus.students
    902903        export_file = "%s/export/students_%s.csv" % (i_home,current)
     904       
    903905        from Products.AdvancedQuery import Eq, Between, Le,In,MatchRegexp
    904906        aq_students = self.students_catalog.evalAdvancedQuery
     
    932934                    with_lga = True
    933935                fields.append(f)
    934         headline = ','.join(fields)
     936        headline = ','.join(fields).replace('level','current_level')
    935937        open(export_file,"a").write(headline +'\n')
    936938        format = '"%(' + ')s","%('.join(fields) + ')s"'
     
    940942                                'courses_validated'))
    941943        students = aq_students(query)
     944        logger.info('%s starts exportStudents, %s student records to export' % (member,len(students)))
    942945        chunk = 100
    943946        total = 0
     
    975978        url = self.REQUEST.get('URL1')
    976979        return self.REQUEST.RESPONSE.redirect(url)
    977     ###)           
     980    ###)
    978981
    979982    security.declareProtected(ModifyPortalContent,"importResults")###(
Note: See TracChangeset for help on using the changeset viewer.