Skip to content

Commit

Permalink
Add score column for manage submission sheet (#1408)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverli authored Nov 4, 2021
1 parent 8afeaec commit 7fa1758
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/assets/javascripts/manage_submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $(document).ready(function() {
// if not filtered, return all the rows
return true;
} else {
var isSubmissionLatest = data[7]; // use data for the age column
var isSubmissionLatest = data[8]; // use data for the age column
return (isSubmissionLatest == "true");
}
}
Expand Down Expand Up @@ -37,12 +37,12 @@ $(document).ready(function() {
'<span>Show only latest</span></label>'
},
"columnDefs": [{
"targets": [7],
"targets": [8],
"visible": false,
// "searchable": false
}],
"aaSorting": [
[3, "desc"]
[4, "desc"]
]
});

Expand Down
5 changes: 4 additions & 1 deletion app/views/submissions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<% end %>
</div>
<table class="prettyBorder" id="submissions">
<% headers = ["Submitted By", "Version", "Submission Date (YYYY-MM-DD)", "File", "IP Address", "Actions", "isLatest"] %>
<% headers = ["Submitted By", "Version", "Score", "Submission Date (YYYY-MM-DD)", "File", "IP Address", "Actions", "isLatest"] %>
<% if @assessment.has_custom_form then %>
<% if @assessment.getLanguages.size > 0 then %>
<% headers.push("Language") %>
Expand Down Expand Up @@ -107,6 +107,9 @@
%></td>
<!-- TODO: for now, until rewrite -->
<td style="<%= ignored_submission_style submission %>"><%= submission.version %></td>

<td><%= computed_score { submission.final_score(@cud) } %></td>

<td><span class="moment-date-time"><%= submission.created_at.in_time_zone.to_s %></span></td>
<!-- TODO: for now, until rewrite -->
<td style="<%= ignored_submission_style submission %>">
Expand Down

0 comments on commit 7fa1758

Please sign in to comment.