|
1 | 1 | <% |
2 | | - jammit_js :grade_summary |
| 2 | + jammit_js :grade_summary, :rubric_assessment |
3 | 3 | jammit_css :grade_summary |
4 | 4 | content_for :page_title, "Grades for #{@student.name} - #{@context.name}" |
5 | 5 | %> |
|
18 | 18 | <b>NOTE</b>: This is NOT your official score.<br/> |
19 | 19 | <a href="#" class="button revert_all_scores_link"><%= image_tag "back.png" %> Revert to Actual Score</a> |
20 | 20 | </div> |
| 21 | + <div class="show_all_details" style="font-size: 0.8em; margin-top: 10px;"> |
| 22 | + <a href="#" class="button" id="show_all_details_link">Show All Details</a> |
| 23 | + </div> |
21 | 24 | <div style="margin-top: 10px;"> |
22 | 25 | <%= render :partial => "courses/sidebar_weighting", :object => @groups %> |
23 | 26 | <div style="font-size: 0.8em;"> |
|
68 | 71 | <% turnitin_enabled = @context.turnitin_enabled? && @assignments.any?(&:turnitin_enabled) %> |
69 | 72 | <% @assignments.each do |assignment| %> |
70 | 73 | <% submission = @submissions.find {|s| s.assignment_id == assignment.id} %> |
| 74 | + <% visible_rubric_assessments = [] %> |
| 75 | + <% 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 %> |
71 | 76 | <tr class="student_assignment <%= 'assignment_graded' if submission && submission.grade %> <%= assignment.special_class ? ("hard_coded " + assignment.special_class) : "editable" %>" id="<%= "submission_" + assignment.id.to_s %>"> |
72 | 77 | <td class="title"> |
73 | 78 | <% if assignment.class.to_s == "Assignment" %> |
|
123 | 128 | <td class="possible points_possible" <%= "colspan='2'" if assignment.special_class %>><%= assignment.points_possible %></td> |
124 | 129 | <% if !assignment.special_class %> |
125 | 130 | <td style="padding-left: 10px; white-space: nowrap;"> |
126 | | - <a href="#" class="toggle_comments_link tooltip" title="View comments and scoring details" style="<%= 'visibility: hidden;' unless submission && submission.submission_comments && !submission.submission_comments.empty? %>"> |
| 131 | + <% has_comments = submission && submission.submission_comments && !submission.submission_comments.empty? %> |
| 132 | + <a href="#" class="toggle_comments_link tooltip" title="View comments and scoring details" style="<%= 'visibility: hidden;' unless has_comments %>"> |
127 | 133 | <span class="tooltip_wrap right"> |
128 | 134 | <span class="tooltip_text"><%= pluralize(submission && submission.submission_comments && submission.submission_comments.count, "comment") %></span> |
129 | 135 | </span> |
130 | 136 | <%= image_tag "word_bubble.png" %> |
131 | 137 | </a> |
132 | | - <a href="#" class="toggle_comments_link tooltip" title="View Scoring Details" style="<%= 'visibility: hidden;' unless submission && submission.score && assignment.points_possible && assignment.points_possible > 0 %>"> |
| 138 | + <% has_scoring_details = submission && submission.score && assignment.points_possible && assignment.points_possible > 0 %> |
| 139 | + <a href="#" class="toggle_comments_link tooltip" title="View Scoring Details" style="<%= 'visibility: hidden;' unless has_scoring_details %>"> |
133 | 140 | <span class="tooltip_wrap right"> |
134 | 141 | <span class="tooltip_text">See scoring details</span> |
135 | 142 | </span> |
136 | 143 | <%= image_tag "grading_icon.png", :style => "opacity: 0.5;" %> |
137 | 144 | </a> |
138 | | - <a class="tooltip" title="View Rubric Evaluation" href="<%= context_url(assignment.context, :context_assignment_submission_url, assignment.id, submission ? submission.user_id : "{{ user_id }}") %>#rubric" style="<%= 'visibility: hidden;' unless submission && submission.rubric_assessment %>"> |
| 145 | + <a href="#" class="toggle_rubric_assessments_link tooltip" title="View Rubric Evaluation" style="<%= 'visibility: hidden;' if visible_rubric_assessments.empty? %>"> |
139 | 146 | <span class="tooltip_wrap right"> |
140 | 147 | <span class="tooltip_text">See rubric results</span> |
141 | 148 | </span> |
|
168 | 175 | </td> |
169 | 176 | <% end %> |
170 | 177 | </tr> |
171 | | - <% if !assignment.special_class %> |
| 178 | + <% if !assignment.special_class && (has_comments || has_scoring_details) %> |
172 | 179 | <tr class="comments <%= 'assignment_graded' if submission && submission.grade %>" style="display: none;"> |
173 | 180 | <td colspan="5" style="padding-bottom: 20px;"> |
174 | 181 | <% if assignment && assignment.points_possible && assignment.points_possible > 0 %> |
|
250 | 257 | <% end %> |
251 | 258 | </td> |
252 | 259 | </tr> |
| 260 | + <% unless visible_rubric_assessments.empty? %> |
| 261 | + <tr class="rubric_assessments <%= 'assignment_graded' if submission && submission.grade %>" style="display: none;"> |
| 262 | + <td colspan="5"> |
| 263 | + <% visible_rubric_assessments.each do |assessment| %> |
| 264 | + <div id="assessor" style="text-align: right; margin-bottom: 5px">Assessment by <%= assessment.assessor_name %></span> |
| 265 | + <%= render :partial => "shared/rubric", :object => assessment.rubric, :locals => { :assessment => assessment } %> |
| 266 | + <% end %> |
| 267 | + </td> |
| 268 | + </tr> |
| 269 | + <% end %> |
253 | 270 | <% end %> |
254 | 271 | <% end %> |
255 | 272 | </table> |
|
259 | 276 | end |
260 | 277 | %> |
261 | 278 | <div id="total_groups_weight" style="display: none;"><%= total_weight %></div> |
| 279 | +<%= render :partial => "shared/rubric_criterion_dialog" %> |
262 | 280 | <input type="text" style="width: 40px; display: none;" id="grade_entry"/> |
263 | 281 | <a href="#" id="revert_score_template" class="revert_score_link" title="Revert to original score"><%= image_tag "back.png" %></a> |
264 | 282 | <a href="<%= context_url(@context, :context_assignment_submission_url, "{{ assignment_id }}", @student.id) %>" class="update_submission_url" style="display: none;"> </a> |
0 commit comments