def patched_get_children(self, usage_key_filter=None):
 def iter_children():
  'skip children not visible to students'
  for child in GET_CHILDREN(self, usage_key_filter=usage_key_filter):
   child._field_data_cache = {}
   if (not child.visible_to_staff_only):
    (yield child)
 return list(iter_children())

def patched_get_children ( self , usage_key_filter = None ) : def iter_children ( ) : for child in GET_CHILDREN ( self , usage_key_filter = usage_key_filter ) : child . _field_data_cache = { } if ( not child . visible_to_staff_only ) : ( yield child ) return list ( iter_children ( ) )
emulate system tools that mask courseware not visible to students .