Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/assets/javascripts/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ var initializeAnnotationsForCode = function () {
function getProblemNameWithId(problem_id) {
var problem_id = parseInt(problem_id, 10);
var problem = _.findWhere(problems, { "id": problem_id });
if (problem == undefined) return "General";
if (problem == undefined) return "Deleted Problem(s)";
return problem.name;
}

Expand Down
3 changes: 3 additions & 0 deletions app/models/annotation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def update_non_autograded_score
submission_id, problem_id
)

# Associated problem was deleted
return if score.problem_id && score.problem.nil?

# Ensure that problem is non-autograded
return if score.grader_id == 0

Expand Down
4 changes: 2 additions & 2 deletions app/views/assessments/viewFeedback.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
</div>
<pre><%= @score.feedback %></pre>
</div>
<% if @submission.annotations.count > 0 and @problemReleased %>
<% if @submission.annotations.count > 0 and (@cud.instructor? or @cud.course_assistant? or @problemReleased) %>
<div class="result-pane">
<div class="feedback-header">
<h2 style="margin-top: 1em">Remarks</h2>
</div>
<% subs_by_problem = @submission.annotations.group_by(&:problem)
subs_by_problem.each do |problem, annotations| %>
<b> <%= problem.name %> </b>
<b> <%= problem.nil? ? "Deleted Problem(s)" : problem.name %> </b>
<ul class="collection">
<%# use custom sort b/c using ordering doesn't work with autograder output, archived files %>
<%
Expand Down