$def with (course,task,submission,to_display) $# $# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for $# more information about the licensing of this file. $# $ username = submission['username'][0] $ user_realname= user_manager.get_user_realname(username) $var title: $:task.get_name(user_manager.session_language()) - $:user_realname - $:course.get_name(user_manager.session_language()) $var Column: $:template_helper.call('course_admin_menu',course=course,current='students') $ is_admin = user_manager.has_admin_rights_on_course(course) $ course_tags = course.get_tags() $ task_categories = task.get_categories() $def NavbarF(): $var Navbar: $:NavbarF()

$:_("Submission {}").format(str(submission['_id'])[0:10]) - "$:task.get_name(user_manager.session_language())" - $user_realname ($username)

$:_("This page show what was shown to the student when (s)he made his/her submission.")
$if "result" in submission: $if is_admin:
$if is_admin:
$:task.get_context(user_manager.session_language())
$ visible_tags = [course_tags[category] for category in task_categories if course_tags[category].is_visible_for_student() or user_manager.has_staff_rights_on_course(course)] $# Auto tags may appear for admins. So we force the h3 title even if there is not predefined tags $# We do not show the tag header for students if they can not get tags $if len(visible_tags) > 0 :

$:_("Tags")

$for tag in visible_tags: $if tag.get_type() == 0: $:tag.get_name(user_manager.session_language()) $elif tag.get_type() == 1:
$ task_problems = {problem.get_id(): problem for problem in task.get_problems()} $for key, problem in enumerate(to_display):
Question ${key+1}: $problem["name"]
$if problem["id"] in task_problems: $:task_problems[problem["id"]].show_input(template_helper, user_manager.session_language(), username) $elif not problem["defined"]: $:_("This problem id is not defined in the task.") $else: $:_("This problem is not present in the submission.")