Changeset 2695 for WAeUP_SRP


Ignore:
Timestamp:
17 Nov 2007, 17:24:56 (17 years ago)
Author:
joachim
Message:

implement updateRoleMappingsFor and use in clearance_edit

Location:
WAeUP_SRP/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2683 r2695  
    8080    ###)
    8181
     82    def addtodict(self,d,key,item): ###(
     83        d[key].append(item)
     84        return d[key]
     85    ###)
     86
    8287    def sleep(self,secs): ###(
    8388        "sleep"
     
    8893###)
    8994
     95    security.declareProtected(View,'updateRoleMappingsFor') ###(
     96    def updateRoleMappingsFor(self,wf_definition,ob):
     97        "do so for public"
     98        wf_def = getattr(self.portal_workflow,wf_definition)
     99        wf_def.updateRoleMappingsFor(ob)
     100    ###)
     101   
    90102    security.declareProtected(ModifyPortalContent,'openLog') ###(
    91103    def openLog(self,name):
     
    276288        ##if letter not in ('ABCDEFGIHKLMNOPQRSTUVWXY'):
    277289        if letter == '?':
    278             letter= r.choice('ABCDEFGHKLMNPQRSTUVWXYZ')
     290            letter= r.choice('ABCDEFGHKLMNPQRSTUVWXY')
    279291        sid = "%c%d" % (letter,r.randint(99999,1000000))
    280292        students = self.portal_url.getPortalObject().campus.students
     
    739751            return
    740752        pin_parts = brain.pin.split('-')
    741         if pin_parts and len(pin_parts) != 3:
    742             logger.info('invalid pin %s for %s, record not imported' % (brain.pin,brain.reg_no))
     753        if len(pin_parts) != 3:
     754            logger.info('invalid pin %s for %s' % (brain.pin,brain.reg_no))
    743755            return
    744756        student_id = self.generateStudentId('?')
  • WAeUP_SRP/base/skins/waeup_student/clearance_edit.py

    r2676 r2695  
    7979
    8080    if clear_doc.firstname and clear_doc.lastname:
     81        context.waeup_tool.updateRoleMappingsFor('waeup_studet_subobject_wf',info['per'])
    8182        if info['per_review_state'] != 'opened':
    8283            wftool.doActionFor(info['per'],'open')
Note: See TracChangeset for help on using the changeset viewer.