## Script (Python) "getNonImageKeys" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## info = context.waeup_tool.getAccessInfo(context) student_id = info['student_id'] if student_id is None: return None stool = context.portal_schemas ttool = context.portal_types #student_id = context.getStudentId() students_folder = context.portal_url.getPortalObject().campus.students student_obj = getattr(students_folder,student_id) student_subobject_ids = student_obj.objectIds() non_image_keys = {} for sub_obj_id in student_subobject_ids: sub_obj = getattr(student_obj,sub_obj_id) sub_pt = sub_obj.portal_type pt_ob = getattr(ttool,sub_pt) sub_schemas = pt_ob.schemas for i in sub_schemas: if i.startswith('student_'): schema_id = i schema = getattr(stool,schema_id) non_image_keys[schema_id] = [key for key in schema.keys() if schema[key].meta_type != "CPS Image Field"] return non_image_keys