## Script (Python) "folder_rename_items"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
# $Id: academics_rename_items.py 805 2006-11-09 09:38:29Z joachim $
"""
Get the list of renameable objects from REQUEST's 'ids' list.
"""

# This is bad but we want to keep CMF 1.4's API for now
REQUEST = context.REQUEST

ids = REQUEST.get('ids', [])

objects = []
for id in ids:
    ob = getattr(context.academics, id, None)
    if ob is None:
        continue
    if not ob.cb_isMoveable():
        continue
    objects.append(ob)

return objects
