Changeset 7957 for WAeUP_SRP/trunk


Ignore:
Timestamp:
22 Mar 2012, 11:19:10 (13 years ago)
Author:
Henrik Bettermann
Message:

Open clearance object and close application object in state clearance_pin_entered - fix for Uniben

This makes the login even slower.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/cps_custom/logged_in.py

    r5784 r7957  
    1919        pass
    2020import DateTime
    21 import os 
     21import os
    2222current = DateTime.DateTime()
    2323import logging
     
    5858        student_app = getattr(student,'application',None)
    5959        student_per = getattr(student,'personal',None)
    60      
     60
    6161
    6262        #########################################################
     
    104104        else:
    105105            app_doc = student_app.getContent()
    106        
     106
    107107        res = context.students_catalog(id = member_id)
    108108        matric_no = res[0].matric_no
     
    112112        level = res[0].level
    113113        has_level = level
    114         has_verdict = verdict and not verdict == 'N/A'     
     114        has_verdict = verdict and not verdict == 'N/A'
    115115
    116116        #########################################################
     
    145145
    146146        #########################################################
    147        
     147
    148148        # look for passport pictures of transfer students
    149149
     
    159159                        logger.info('%s (%s on transfer), %s' % (member,s_review_state,msg))
    160160
    161         #########################################################       
     161        #########################################################
    162162
    163163        # look for passport pictures of new students
     
    231231                        pin = "%s-%s-%s" % (p[:4],p[4:5],p[5:])
    232232                    else:
    233                         pin = "%s-%s-%s" % (p[:3],p[3:-10],p[-10:])                 
     233                        pin = "%s-%s-%s" % (p[:3],p[3:-10],p[-10:])
    234234                else:
    235235                    pin = p
     
    244244            wftool.doActionFor(student_per,'open')
    245245
     246        # 4. open clearance object and close application object in state clearance_pin_entered
     247
     248        elif s_review_state == "clearance_pin_entered":
     249            student_clr = getattr(student,'clearance',None)
     250            clr_review_state = wftool.getInfoFor(student_clr,'review_state',None)
     251            if a_review_state != 'closed':
     252                wftool.doActionFor(student_app,'close')
     253            if clr_review_state != 'opened':
     254                wftool.doActionFor(student_clr,'open')
    246255
    247256        #########################################################
     
    315324
    316325response.redirect(redirect_url)
    317 
Note: See TracChangeset for help on using the changeset viewer.