$def with (open_courses,registrable_courses,submissions,success) $# $# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for $# more information about the licensing of this file. $# $var title: $:_("My courses") $def NavbarF(): $var Navbar: $:NavbarF() $# Left column content $def ColumnF():

$:_("Last tried exercises")

$if submissions: $for submission in submissions: $submission["task"].get_course().get_name(user_manager.session_language()): $submission["task"].get_name(user_manager.session_language()) $else: $:_("No submissions")
$:template_helper.call('main_menu', template_helper=template_helper) $var Column: $:ColumnF() $# Start content

$:_("My courses")

$if len(open_courses) != 0: $ username = user_manager.session_username() $for courseid, course in open_courses.items():
$course.get_name(user_manager.session_language())
$if not course.is_open_to_non_staff(): $if course.is_lti(): $:_("LTI course") - $else: $:_("Hidden course") - $if username in course.get_admins() or user_manager.user_is_superadmin(): $:_("Administrator") $elif username in course.get_tutors(): $:_("Tutor") $elif user_manager.course_is_user_registered(course): $:_("Student")
$else: $:_("You are not registered to any course")

$if user_manager.user_is_superadmin(): $if success == True: $if success == False:
$else:

$:_("Register for a course")

$if success == True: $elif success == False: