Changeset 3863 for WAeUP_SRP/trunk


Ignore:
Timestamp:
20 Jan 2009, 08:22:52 (16 years ago)
Author:
Henrik Bettermann
Message:

getPaymentsFolderInfo.py: resolve #600
getAccommodationInfo.py: implement disable switch
WAeUPImport.py: export student password

Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPImport.py

    r3842 r3863  
    885885        #           }
    886886
    887         sub_types = ['StudentApplication','StudentClearance','StudentPersonal']
     887        sub_types = ['StudentApplication','StudentClearance','StudentPersonal','StudentStudyCourse']
    888888        non_image_keys = {}
    889889        for i in sub_types:
     
    912912                    #headline = ','.join(fields).replace('level','current_level')
    913913                    headline = ','.join(fields)
     914                    headline = headline + ',password'
    914915                    open(export_file,"a").write(headline +'\n')
    915916                format = '"%(' + ')s","%('.join(fields) + ')s"'
     917                format = format + ',"%(password)s"'
    916918                res = self.students_catalog(id = student_id)
    917919                student = res[0]
     
    926928                    for f in toexport[k]:
    927929                        d[f] = getattr(object_doc,f,'')
     930                if hasattr(stdir, student_id):
     931                    d['password'] = self.waeup_tool.getCredential(student_id)
     932                    stdir.deleteEntry(student_id)
     933                self.waeup_tool.removePictureFolder(student_id)       
    928934                line.append(format % d)
    929935                open(export_file,"a").write('\n'.join(line) +'\n')
     
    934940                msg = "Student object not found"
    935941                break
    936             if hasattr(stdir, student_id):
    937                 stdir.deleteEntry(student_id)
    938             self.waeup_tool.removePictureFolder(student_id)           
     942     
    939943            break
    940944        return student_id,msg,mapping     
  • WAeUP_SRP/trunk/skins/waeup_accommodation/getAccommodationInfo.py

    r3784 r3863  
    1515logger = logging.getLogger('Skins.getAccommodationInfo')
    1616import DateTime
     17
     18booking_disabled = False
    1719
    1820request = context.REQUEST
     
    121123    info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
    122124    info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"
     125elif booking_disabled:
     126    info['booking_allowed'] = False
    123127
    124128d = {}
     
    147151info['student_status'] = student_status
    148152return info
    149 
  • WAeUP_SRP/trunk/skins/waeup_epayment/getPaymentsFolderInfo.py

    r3736 r3863  
    7373info['prod_id'] = '61'
    7474
     75gown_records = aq_payments(Eq('student_id',student_id)  & Eq('category','gown'))
    7576try:
    7677    level = int(student_record.level)
    7778    end_level = int(student_record.end_level)
    78     if level >= end_level:
     79    if level >= end_level and not gown_records:
    7980        info['gown'] = True
    8081except:
Note: See TracChangeset for help on using the changeset viewer.