Skip to content
Browse files

hide rubric results from students for muted assignments

refs #7633

test plan
 * make an assignment with rubric used for grading
 * make the assignment muted
 * grade the assignment
 * rubric results should not be visible to the student

Change-Id: I6a41e49fcb8cadc02111e19b0708cdc4ddb0b01d
Reviewed-on: https://gerrit.instructure.com/9271
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
  • Loading branch information...
1 parent e765a8e commit 99bd21d414d7e0623005db01ed2350d5a70fb17f @roor0 roor0 committed with codekitchen Mar 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/views/gradebooks/grade_summary.html.erb
View
4 app/views/gradebooks/grade_summary.html.erb
@@ -123,7 +123,7 @@
# so this wouldn't hit the query cache)
submission.assignment = assignment if submission
visible_rubric_assessments = []
- visible_rubric_assessments = submission.rubric_assessments.select{|a| a.grants_rights?(@current_user, :read)[:read]}.sort_by{|a| [a.assessment_type == 'grading' ? '0' : '1', a.assessor_name] } if submission
+ visible_rubric_assessments = submission.rubric_assessments.select{|a| a.grants_rights?(@current_user, :read)[:read]}.sort_by{|a| [a.assessment_type == 'grading' ? '0' : '1', a.assessor_name] } if submission && !assignment.muted?
%>
<tr class="student_assignment <%= 'assignment_graded' if submission && submission.grade && !assignment.muted? %> <%= assignment.special_class ? ("hard_coded " + assignment.special_class) : "editable" %>" data-muted="<%= assignment.muted? %>" id="<%= "submission_" + assignment.id.to_s %>">
<td class="title">
@@ -197,7 +197,7 @@
</span>
<%= image_tag "grading_icon.png", :style => "opacity: 0.5;" %>
</a>
- <a href="#" class="toggle_rubric_assessments_link tooltip" title="<%= t 'titles.view_rubric_evaluation', 'View Rubric Evaluation' %>" style="<%= 'visibility: hidden;' if visible_rubric_assessments.empty? || assignment.muted? %>">
+ <a href="#" class="toggle_rubric_assessments_link tooltip" title="<%= t 'titles.view_rubric_evaluation', 'View Rubric Evaluation' %>" style="<%= 'visibility: hidden;' if visible_rubric_assessments.empty? %>">
<span class="tooltip_wrap right">
<span class="tooltip_text"><%= t(:see_rubric_results, "See rubric results") %></span>
</span>

0 comments on commit 99bd21d

Please sign in to comment.
Something went wrong with that request. Please try again.