Changeset 2645


Ignore:
Timestamp:
13 Nov 2007, 17:33:05 (17 years ago)
Author:
joachim
Message:

listMembers includes groups,roles and email

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2643 r2645  
    296296    ###)
    297297
     298    security.declareProtected(ModifyPortalContent, 'dumpSchoolfeePayments') ###(
     299    def dumpSchoolfeePayments(self):
     300        "dump paid schoolfees"
     301        logger = logging.getLogger('WAeUPTool.dumpSchoolfees')
     302        aq_student = self.students_catalog.evalAdvancedQuery
     303        query = In('review_state',('schoolfee_paid',
     304                                   'courses_registered',
     305                                   'courses_validated',
     306                                   ))
     307        res = aq_student(query)
     308        import pdb;pdb.set_trace()
     309        l = []
     310        logger.info("start for %d" % len(res))
     311        count = 1
     312        log_after = 100
     313        for student in res:
     314            if not count % log_after:
     315                logger.info("processed %d total %d" % (log_after,count))
     316            count += 1
     317            fee_dict =self.getSchoolFee(student)
     318            fulltime = student.mode.endswith('_ft')
     319            d = {}
     320            d['student_id'] = student.id
     321            d['amount'] = fee_dict.get('new')
     322            l += d,
     323        import pdb;pdb.set_trace()
     324    ###)
     325
    298326    security.declareProtected(ManagePortal, 'listMembers') ###(
    299327    def listMembers(self):
     
    313341            d['name'] = name
    314342            d['pw'] = getattr(getattr(members,user_id),'password')
     343            d['email'] = getattr(getattr(members,user_id),'email')
     344            d['groups'] = " ".join(getattr(getattr(members,user_id),'groups'))
     345            d['roles'] = " ".join(getattr(getattr(members,user_id),'roles'))
    315346            l += d,
    316         #import pdb;pdb.set_trace()
    317347        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
    318348        export_file = "%s/export/member_list_%s.csv" % (i_home,current,)
Note: See TracChangeset for help on using the changeset viewer.