$def with (open_courses, user_info)
$#
$# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for
$# more information about the licensing of this file.
$#
$var title: $:_("Course list")
$def NavbarF():
$var Navbar: $:NavbarF()
$# Left column content
$def ColumnF():
$if not user_manager.session_logged_in():
$:include.signin_button()
$else:
$:_("Public courses")
$:_("This page lists all the courses that are available now. If you are a course administrator, go to your 'My courses' page to see all of them.")
$ username = user_manager.session_username()
$ count = 0
$for courseid, course in open_courses.items():
$ no_display_filter = not user_manager.course_is_user_registered(course, username) and not course.allow_preview()
$ no_display_lti_filter = course.lti_send_back_grade() or no_display_filter
$ no_display = (no_display_lti_filter if course.is_lti() else no_display_filter) and not user_manager.has_admin_rights_on_course(course)