$def with (user_info, course, task, submissions, students, eval_submission, user_task, previous_taskid, next_taskid, webterm_link, input_random_list=[])
$#
$# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for
$# more information about the licensing of this file.
$#
$var title: $:task.get_name(user_manager.session_language()) - $:course.get_name(user_manager.session_language())
$ registered = user_manager.course_is_user_registered(course)
$ staff = user_manager.has_staff_rights_on_course(course)
$# Left column content
$def ColumnF():
$ tags = ""
$for tag in task.get_tags()[2]:
$if tag.is_visible_for_student() or user_manager.has_staff_rights_on_course(course):
$ tags += (_(tag.get_name()) + ", ")
$ tags = tags[:-2]
$if tags != "":
Category Tags
$tags
$ visible_tags = [tag for tag in task.get_tags()[0] if tag.is_visible_for_student() or user_manager.has_staff_rights_on_course(course)]
$ visible_misconception_tags = [tag for tag in task.get_tags()[1] if tag.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 or len(visible_misconception_tags) > 0:
$:_("Tags")
$for tag in visible_tags:
$:_(tag.get_name())
$for tag in visible_misconception_tags:
$:_(tag.get_name())
$if not is_lti() and staff:
$:_("Administration")
$if not course.is_open_to_non_staff():
$:_("This course is currently invisible for students. You can change this by modifying the \"accessible\" option in the configuration of the course.")
$if not task.get_accessible_time().after_start():
$:_("This task is currently invisible for students. You can change this by modifying the \"accessible\" option in the configuration of the task.")
$if len([method for key, method in user_manager.get_auth_methods().items() if method.allow_share()]):
$:_("Share my result")
$:_("Submission history")
$if submissions:
$for submission in submissions:
$if task.get_accessible_time().is_open() or user_manager.has_admin_rights_on_course(course):
$if task.get_evaluate() == 'student' and students == submission['username']:
$elif task.get_evaluate() == 'student':
$# This display a badge with the number of validated tags in each row of the submission history.
$# The badge is green (success style) if all tags are validated, blue (info style) otherwise.
$if (len(visible_tags) > 0):
$ tags_ok_counter = 0
$ list_tags_ok = []
$for tag in task.get_tags()[0]:
$if (tag.is_visible_for_student() or user_manager.has_staff_rights_on_course(course)):
$ class_tag = "badge alert-info"
$if "tests" in submission and tag.get_id() in submission["tests"] and submission["tests"][tag.get_id()]:
$ tags_ok_counter += 1
$list_tags_ok.append(_(tag.get_name()))
$if tags_ok_counter == len(visible_tags):
$tags_ok_counter
$else:
$tags_ok_counter
$if "grade" in submission:
$submission["submitted_on"].strftime("%d/%m/%Y %H:%M:%S") - $submission["grade"]%
$else:
$submission["submitted_on"].strftime("%d/%m/%Y %H:%M:%S")
$# Input random
$# set up some useful variable that may be used by task author
$# variable "input" has to be accessible to the eventual javascript present in the context of the task.
$:task.get_context(user_manager.session_language())
$if webterm_link:
$:_("Alternatively, you can also paste this command into your terminal:")
$else:
$:_("Paste this command into your terminal:")
$:_("The password to connect is {}").format("")
$:_("Please answer to all the questions.")$:("Internal error")$:("{} has not a valid extension.")$:("{} is too heavy.")
$:_("The raw data from the container will be displayed here, helping you to debug the task. This box is only displayed because you are an administrator of this course. It is not displayed to students.")