Changeset 2352 for WAeUP_SRP/base


Ignore:
Timestamp:
12 Oct 2007, 07:07:08 (17 years ago)
Author:
Henrik Bettermann
Message:

for Joachim

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Widgets.py

    r2350 r2352  
    13611361        datastructure[widget_id+'_b'] = b
    13621362        datastructure[widget_id+'_n'] = n
    1363         screening_type = self.REQUEST.traverse_subpath[0]
     1363        if self.REQUEST.traverse_subpath:
     1364            screening_type = self.REQUEST.traverse_subpath[0]
     1365        else:
     1366            screening_type = 'manage'
    13641367        datastructure["screening_type"] = screening_type
     1368        #import pdb;pdb.set_trace()
    13651369    ###)
    13661370
     
    14131417                break
    14141418            elif ok == -2:
    1415                 err = 'Service already is activated but with a different PIN.'
     1419                err = 'Service is already activated but with a different PIN.'
    14161420                s_logger.info('%s/%s repeatedly activated service but with different PIN %s' % (member_id,ref,pin_str))
    14171421                break
     
    14281432                screening_type = datastructure['screening_type']
    14291433                if self.isStudent():
    1430                     err = "This is only for Pume application."
     1434                    err = "You are a student!"
    14311435                    s_logger.info('%s/%s applied for screening test with PIN %s' % (member_id,ref,pin_str))
    14321436                    break
    14331437                elif datastructure.has_key('record'):
    14341438                    applicant = datastructure['record']
    1435                     if applicant.screening_type != screening_type:
    1436                         err = "Wrong screening type"
    1437                         s_logger.info('%ref has screening type %s tried to login for %s' % (ref,
    1438                                                                                            applicant.screening_type,
    1439                                                                                            screening_type))
     1439                   
     1440                    if applicant.screening_type != screening_type and screening_type != 'manage':
     1441                        err = "Wrong application form!"
     1442                        s_logger.info('%s tried to use %s application form but has applied for %s' % (ref,
     1443                                                                                           screening_type,
     1444                                                                                           applicant.screening_type))
    14401445                        break
    14411446                    if not applicant.pin:
Note: See TracChangeset for help on using the changeset viewer.