<commit_before>{% extends '::layout.html.twig' %}

{% block title %}List Grades{% endblock %}

{% block nav_page_admin %}active{% endblock %}
{% block nav_page_admin_assignments %}active{% endblock %}

{% block content %}
	<div class="panel panel-default">
		<div class="panel-heading">{{ assignment.name }}</div>

		<table class="table table-hover">
			<thead>
			<tr>
				<th>#</th>
				<th>Username</th>
				<th>Real Name</th>
				<th>Repository</th>
				<th>Grade</th>
				<th>Reason</th>
				<th>Actions</th>
			</tr>
			</thead>
			<tbody>
			{% for grade in assignment.submissions %}
				{% set class = '' %}
				{% if grade.grade is null %}
					{% set class = '' %}
				{% elseif grade.grade == 0 %}
					{% set class = 'danger' %}
				{% else %}
					{% set class = 'success' %}
				{% endif %}

				<tr class="{{ class }}">
					<td>{{ loop.index }}</td>
					<td>{{ grade.user.username }}</td>
					<td>{{ grade.user.realName }}</td>
					<td>{{ grade.user.repository }}</td>
					<td>
						{% if assignment.submissions|length > 0 and assignment.submissions[0].grade != null %}
							<div class="dropdown">
								<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
									{{ assignment.submissions[0].grade }}
									<span class="caret"></span>
								</button>
								<ul class="dropdown-menu">
									<li>{{ assignment.submissions[0].gradeExtendedReason|nl2br }}</li>
								</ul>
							</div>
						{% else %}
							{{ 'Not Graded'|trans }}
						{% endif %}
					</td>
					<td>{{ grade.gradeReason }}</td>
					<td>
						<a class="btn btn-primary"
						   href="{{ path( 'cs585_grader_submission_grade_edit',
						                  { 'assignment': assignment.name, 'user': grade.user.id } ) }}">
							{{ 'Edit'|trans }}
						</a>
					</td>
				</tr>
			{% endfor %}
			</tbody>
		</table>
	</div>
{% endblock %}
<commit_msg>Fix grade list template<commit_after>{% extends '::layout.html.twig' %}

{% block title %}List Grades{% endblock %}

{% block nav_page_admin %}active{% endblock %}
{% block nav_page_admin_assignments %}active{% endblock %}

{% block content %}
	<div class="panel panel-default">
		<div class="panel-heading">{{ assignment.name }}</div>

		<table class="table table-hover">
			<thead>
			<tr>
				<th>#</th>
				<th>Username</th>
				<th>Real Name</th>
				<th>Repository</th>
				<th>Grade</th>
				<th>Reason</th>
				<th>Actions</th>
			</tr>
			</thead>
			<tbody>
			{% for grade in assignment.submissions %}
				{% set class = '' %}
				{% if grade.grade is null %}
					{% set class = '' %}
				{% elseif grade.grade == 0 %}
					{% set class = 'danger' %}
				{% else %}
					{% set class = 'success' %}
				{% endif %}

				<tr class="{{ class }}">
					<td>{{ loop.index }}</td>
					<td>{{ grade.user.username }}</td>
					<td>{{ grade.user.realName }}</td>
					<td>{{ grade.user.repository }}</td>
					<td>
						<div class="dropdown">
							<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
								{{ grade.grade }}
								<span class="caret"></span>
							</button>
							<ul class="dropdown-menu">
								<li>{{ grade.gradeExtendedReason|nl2br }}</li>
							</ul>
						</div>
					</td>
					<td>{{ grade.gradeReason }}</td>
					<td>
						<a class="btn btn-primary"
						   href="{{ path( 'cs585_grader_submission_grade_edit',
						                  { 'assignment': assignment.name, 'user': grade.user.id } ) }}">
							{{ 'Edit'|trans }}
						</a>
					</td>
				</tr>
			{% endfor %}
			</tbody>
		</table>
	</div>
{% endblock %}

{'fraction_non_alphanumeric': 0.2086230876216968, 'fraction_numerical': 0.003894297635605007, 'mean_word_length': 2.4280266920877027, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 112, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3230689', 'n_tokens_mistral': 1733, 'n_tokens_neox': 1194, 'n_words': 259}