$def with (course,submissions,teams,users,myteam,msg, error) $# $# 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.get_name(user_manager.session_language()) $ username = user_manager.session_username() $# Left column content $def ColumnF(): $:template_helper.call('course_menu',course=course, template_helper=template_helper)

$:_("Current grade")

$ grade=user_manager.get_course_cache(username, course)["grade"]
$int(grade)%

$:_("Last tried exercises")

$if submissions: $for submission in submissions: $submission['taskname'] $else: $:_("No submissions")
$if course.allow_unregister(): $:include.unregister_button(course)
$var Column: $:ColumnF() $def NavbarF(): $var Navbar: $:NavbarF() $# Start content

$course.get_name(user_manager.session_language()) - $:_("Teams")

$if error: $elif msg: $if len(myteam["groups"]) > 0 and username in myteam["groups"][0]["students"]:

$:_("My team : {}").format(myteam["description"])

$if len(myteam["tutors"]) > 0:
$elif len(myteam["groups"]) == 0: $elif course.can_students_choose_group():

$:_("My team")

$else:

$:_("My team")

$if not len(teams) == 0:

$:_("All teams")

$for index, team in enumerate(teams): $if len(team["groups"])>0:

$:_("Team : {}").format(team["description"])

$ group = team["groups"][0] $if len(myteam["groups"]) == 0 or username not in myteam["groups"][0]["students"] and (group["size"]-len(group["students"])) > 0 and course.can_students_choose_group():
$else:
$if len(team["tutors"]) > 0: