2018-08-22 15:26:24 +00:00
|
|
|
<p data-search-info></p>
|
|
|
|
|
2018-06-28 23:05:17 +00:00
|
|
|
<table class="w3-table w3-striped w3-bordered" style="margin: auto">
|
2017-10-22 18:56:44 +00:00
|
|
|
<tr>
|
|
|
|
<th>Lecturer</th>
|
|
|
|
<th>Lecture</th>
|
|
|
|
<th>Grade</th>
|
2019-02-21 21:54:26 +00:00
|
|
|
<th>Submission</th>
|
2017-10-22 18:56:44 +00:00
|
|
|
<th>Comment</th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% @grades.each do |grade| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= grade.lecture.lecturer.login %></td>
|
|
|
|
<td><%= grade.lecture.name %></td>
|
|
|
|
<td><%= grade.grade %></td>
|
|
|
|
<td>
|
2019-02-21 21:54:26 +00:00
|
|
|
<% if grade.submission.attached? %>
|
|
|
|
<%= link_to grade.submission.filename.to_s, rails_blob_url(grade.submission, disposition: "attachment") %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
2017-10-22 18:56:44 +00:00
|
|
|
<% if grade.comment %>
|
|
|
|
<%= grade.comment.html_safe %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2018-06-28 23:05:17 +00:00
|
|
|
<td><%= link_to 'Comment', edit_grade_path(grade), :class => "w3-button w3-light-blue" %></td>
|
2017-10-22 18:56:44 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
2019-02-21 21:54:26 +00:00
|
|
|
|
|
|
|
<div class="w3-center">
|
|
|
|
<%= link_to "Generate Report", {controller: "reports", action: "create"}, :method => :post, :class => "w3-button w3-light-blue" %>
|
|
|
|
</div>
|
|
|
|
|
2018-06-28 23:05:17 +00:00
|
|
|
<%= form_tag(grades_url, method: "get", class: "w3-margin") do %>
|
|
|
|
<div class="w3-right" style="width: 10%">
|
|
|
|
<%= submit_tag("Filter", class: "w3-button w3-light-blue") %>
|
|
|
|
</div>
|
|
|
|
<%= text_field_tag(:lecturer, "", class: "w3-input w3-border w3-round", placeholder: "Filter by lecturer...", style: "width: 90%") %>
|
2017-10-22 18:56:44 +00:00
|
|
|
<% end %>
|
2019-02-21 21:54:26 +00:00
|
|
|
|
|
|
|
<div class="w3-center w3-margin">
|
|
|
|
<%= link_to 'New Submission', new_grade_path, :class => "w3-button w3-light-blue" %>
|
|
|
|
</div>
|