Skip to content

Commit

Permalink
Correctly display PDF annotations on viewFeedback page (#1901)
Browse files Browse the repository at this point in the history
Special handling for pdf annotations
  • Loading branch information
damianhxy authored May 21, 2023
1 parent b905d62 commit 03d3a54
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/views/assessments/_remarks_panel.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@
<span>
<b><%= annotation.value? ? sprintf("(%+.2f)", annotation.value.round(2)) : "" %></b>
<% if annotation.global_comment? %>
<%= link_to "Global Annotation", [:view, @course, @assessment, @submission] %>
<%= link_to "Global Annotation", view_course_assessment_submission_path(@course, @assessment, @submission) %>
<% elsif annotation.coordinate.present? %>
<%# note: does not have a line number %>
<%= link_to filename.to_s, view_course_assessment_submission_path(@course, @assessment, @submission, header_position: annotation.position) %>
<% else %>
<%# line + 1 because line numbers start from 1 %>
<%= link_to filename.to_s + ":" + (annotation.line + 1).to_s, [:view, @course, @assessment, @submission, header_position: annotation.position] %>
<%= link_to filename.to_s + ":" + (annotation.line + 1).to_s, view_course_assessment_submission_path(@course, @assessment, @submission, header_position: annotation.position) %>
<% end %>
</span>
</li>
Expand Down

0 comments on commit 03d3a54

Please sign in to comment.