Changeset 2596 for WAeUP_SRP/base/skins


Ignore:
Timestamp:
8 Nov 2007, 15:44:45 (17 years ago)
Author:
joachim
Message:

close subobjects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/deactivate_students.py

    r2571 r2596  
    1919
    2020import logging
    21 logger = logging.getLogger('Skins.remove_students')
     21logger = logging.getLogger('Skins.deactivate_students')
    2222from Products.AdvancedQuery import Eq, Between, Le,In
    2323#aq_portal = context.portal_catalog_real.evalAdvancedQuery
     
    4545        for student_id in ids:
    4646            student = getattr(students_folder,student_id,None)
    47             set_trace()
    4847            if student is not None:
     48                for object in student.objectValues():
     49                    if context.portal_workflow.getInfoFor(object,'review_state',None) == "open":
     50                        context.portal_workflow.doActionFor(object,'close')
    4951                context.portal_workflow.doActionFor(student,'deactivate')
    5052                logger.info("%s deactivated student  %s" % (member,student_id))
     53                deleted_list.append(student_id)
    5154            else:
    5255                logger.info("Student object %s not found" % (student_id))
Note: See TracChangeset for help on using the changeset viewer.