Ignore:
Timestamp:
6 Jul 2007, 21:24:51 (17 years ago)
Author:
Henrik Bettermann
Message:

strange, strange, see my inline comments:

## No idea why the following lines were still active until July 6.
## The code does not make any sense. When editing the clearance object
## as admin, always the PIN HOS-1-4921190317
## was filled in. This was the only PIN ever used by admin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py

    r1862 r1996  
    9494    if cpsdocument_edit_button or result_edit_button:
    9595        psm = "Content changed!"
    96         logger.info('%s edited clearance of %s' % (member_id,student_id ))
    97         if clear_doc.clr_ac_pin == "":
    98             res = context.portal_pins(student=member_id)
    99             if res:
    100                 p = res[0].pin
    101                 if len(p) > 10:
    102                     pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
    103                 else:
    104                     pin = p
    105                 clear_doc.edit(mapping={'clr_ac_pin': pin})
     96        logger.info('%s edited clearance object of %s' % (member_id,student_id ))
     97
     98        ## No idea why the following lines were still active until July 6.
     99        ## The code does not make any sense. When editing the clearance object
     100        ## as admin, always the PIN HOS-1-4921190317
     101        ## was filled in. This was the only PIN ever used by admin.
     102       
     103        #if clear_doc.clr_ac_pin == "":
     104        #    res = context.portal_pins(student=member_id)
     105        #    if res:
     106        #        p = res[0].pin
     107        #        if len(p) > 10:
     108        #            pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
     109        #        else:
     110        #            pin = p
     111        #        clear_doc.edit(mapping={'clr_ac_pin': pin})
     112
     113        ## simple method to remove the wrong PIN
     114       
     115        #if clear_doc.clr_ac_pin.startswith('HOS'):
     116        #    pin=''
     117        #    clear_doc.edit(mapping={'clr_ac_pin': pin})
     118
     119
    106120    elif cpsdocument_edit_and_view_button:
    107121        if acknowledge and info['review_state'] == "clearance_pin_entered":
     
    134148    psm = "Please correct your errors!"
    135149    args = getFormUidUrlArg(REQUEST)
    136     logger.info('%s got error when editing %s' % (member_id,student_id))
     150    logger.info('%s got error when editing the clearance object of %s' % (member_id,student_id))
    137151
    138152args['portal_status_message'] = psm
Note: See TracChangeset for help on using the changeset viewer.