Skip to content

Commit b740936

Browse files
committed
fix descending sort of teacher activity report
closes CNVS-18629 Currently, when sorting the teacher activity report by the ungraded assignments column, for cells with multiple ungraded assignments, it will sort in 'descending order' by the most recently submitted assignment, as opposed to the oldest submitted assignment. This fixes that issue. Test plan - Create multiple ungraded assignments for several students - Go to the teacher activity report as a teacher - When sorting the table by ungraded assignments descending, the rows should sort the table by the oldest submitted assignment in each cell, as opposed to the newest. Change-Id: I88463f2888c1aa876721957b5ab4ac234f6b5513 Reviewed-on: https://gerrit.instructure.com/48917 Tested-by: Jenkins Reviewed-by: Spencer Olson <solson@instructure.com> QA-Review: Amber Taniuchi <amber@instructure.com> Product-Review: Josh Simpson <jsimpson@instructure.com>
1 parent a99c397 commit b740936

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/views/users/teacher_activity.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<% end %>
6464
<td><%= number_to_percentage(student[:enrollment].computed_current_score, :precision => 1) %></td>
6565
<td><%= number_to_percentage(student[:enrollment].computed_final_score, :precision => 1) %></td>
66-
<td data-number="<%= (student[:ungraded].map(&:submitted_at).compact.max || 1.day.from_now).to_i / 3600 %>">
66+
<td data-number="<%= (student[:ungraded].map(&:submitted_at).compact.min || 1.day.from_now).to_i / 3600 %>">
6767
<% student[:ungraded].each do |submission| %>
6868
<%= link_to(submission.assignment.title, speed_grader_course_gradebook_path(course, :assignment_id => submission.assignment.id, :anchor => { :student_id => student[:enrollment].user_id }.to_json)) %><br/>
6969
<div style="padding-bottom: 5px; margin-top: -2px; padding-left: 20px; font-size: 0.8em; color: #888;">

0 commit comments

Comments
 (0)