def _accessible_courses_list(request):
 def course_filter(course):
  '\n        Filter out unusable and inaccessible courses\n        '
  if isinstance(course, ErrorDescriptor):
   return False
  if isinstance(course.id, CCXLocator):
   return False
  if (course.location.course == 'templates'):
   return False
  return has_studio_read_access(request.user, course.id)
 courses = filter(course_filter, modulestore().get_courses())
 in_process_course_actions = get_in_process_course_actions(request)
 return (courses, in_process_course_actions)

def _accessible_courses_list ( request ) : def course_filter ( course ) : if isinstance ( course , ErrorDescriptor ) : return False if isinstance ( course . id , CCXLocator ) : return False if ( course . location . course == 'templates' ) : return False return has_studio_read_access ( request . user , course . id ) courses = filter ( course_filter , modulestore ( ) . get_courses ( ) ) in_process_course_actions = get_in_process_course_actions ( request ) return ( courses , in_process_course_actions )
list all courses available to the logged in user by iterating through all the courses .