Changeset 1714


Ignore:
Timestamp:
26 Apr 2007, 13:39:35 (18 years ago)
Author:
joachim
Message:

ckeck for done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_utilities/setNewEntryMode.py

    r1713 r1714  
    1717    def set_trace():
    1818        pass
     19from Products.AdvancedQuery import Eq, Between, Le,In
     20aq_students = context.students_catalog.evalAdvancedQuery
    1921
    2022request = context.REQUEST
     
    2224response = request.RESPONSE
    2325setheader = request.RESPONSE.setHeader
    24 students = context.portal_url.getPortalObject().campus.students
     26#students = context.portal_url.getPortalObject().campus.students
    2527import logging
    2628logger = logging.getLogger('Skins.setNewEntryMode')
     
    3537#set_trace()
    3638logger.info('setNewEntryMode start')
     39#progress_log = context.waeup_tool.openLog('test')
     40#context.waeup_tool.writeLog(progress_log,"Start \n")
     41umede = aq_students(In('entry_mode',('DE','UME')))
     42umede_ids = [r.getId for r in umede]
    3743for brain in brains:
    38     if not brain.entry_mode in ('UME','DE'):
     44    if brain.getId not in umede_ids:
    3945        continue
    4046    stud_obj = brain.getObject()
     
    4349    except:
    4450        continue
     51    em = getattr(app_doc,'entry_mode',None)
     52    if em not in ('UME','DE'):
     53        continue
    4554    try:
    4655        sc_doc = stud_obj.study_course.getContent()
    4756    except:
    4857        sc_doc = None
    49     em = getattr(app_doc,'entry_mode',None)
    5058    if em in ('ume_ft','de_ft'):
    5159        new_em = em
Note: See TracChangeset for help on using the changeset viewer.