Changeset 3407


Ignore:
Timestamp:
2 Apr 2008, 15:54:08 (17 years ago)
Author:
joachim
Message:

check if in right form before using pin, please test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Widgets.py

    r3393 r3407  
    15021502                s_logger.info('%s/%s entered wrong data together with PIN %s' % (member_id,ref,pin_str))
    15031503        while do:
    1504             if expiration_date and DateTime(expiration_date).lessThan(DateTime()):
     1504            if self.REQUEST.traverse_subpath:
     1505                screening_type_request = self.REQUEST.traverse_subpath[0]
     1506            else:
     1507                screening_type_request = 'manage'
     1508            if datastructure.has_key('record'):
     1509                applicant = datastructure['record']
     1510                if applicant.screening_type != screening_type_request and screening_type_request != 'manage':
     1511                    err = "You are using the wrong access form!"
     1512                    s_logger.info('%s tried to use %s application form but has applied for %s' % (ref,screening_type_request,applicant.screening_type))
     1513                    break
     1514            elif expiration_date and DateTime(expiration_date).lessThan(DateTime()):
    15051515                if not pins(student=ref):
    15061516                    #import pdb;pdb.set_trace()
     
    15281538                #screening_type = self.REQUEST.form.get('screening_type','unknown')
    15291539                #screening_type = datastructure['screening_type']
    1530                 if self.REQUEST.traverse_subpath:
    1531                     screening_type_request = self.REQUEST.traverse_subpath[0]
    1532                 else:
    1533                     screening_type_request = 'manage'
    1534 
    15351540                if datastructure.has_key('record'):
    15361541                    applicant = datastructure['record']
Note: See TracChangeset for help on using the changeset viewer.