$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")

$:_("My courses / Register for a course")
$:template_helper.call('main_menu', template_helper=template_helper) $var Column: $:ColumnF() $# Start content

$:_("Course list")

$ 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)
$course.get_name(user_manager.session_language())

$:course.get_description(user_manager.session_language())

$# Resizing logic $ count = count + 1 $if count % 2 == 0:
$if count % 3 == 0:
$if count % 4 == 0:
$if count % 5 == 0: