Skip to content

Commit 9fd2fc8

Browse files
committed
Always show attempted exercises in points list
1 parent 51cba91 commit 9fd2fc8

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

app/controllers/points_controller.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@ def show
7171
@exercises = Exercise.course_gdocs_sheet_exercises(@course, @sheetname, current_user.administrator?).includes(:available_points).order!(:name)
7272
@users_to_points = AwardedPoint.per_user_in_course_with_sheet(@course, @sheetname, show_timestamps: show_timestamps, hidden: current_user.administrator?)
7373

74-
@users = if params[:show_attempted]
75-
@course.users.includes(:user_field_values)
76-
else
77-
User.course_sheet_students(@course, @sheetname).includes(:organizations).includes(:user_field_values)
78-
end
74+
@users = @course.users.includes(:user_field_values)
7975
if params[:sort_by] == 'points'
8076
@users = @users.sort_by do |u|
8177
[-@users_to_points[u.login].size, u.login.downcase]

app/views/points/show.html.erb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
<% if can? :refresh_gdocs_spreadsheet, @course %>
1515
<% link_to 'Refresh Google Docs worksheet', refresh_gdocs_organization_course_point_path(@organization, @course, @sheetname), class: "btn btn-primary" %>
1616
<% end %>
17-
18-
<% if can?(:teach, @organization )%>
19-
<% if params[:show_attempted].nil? %>
20-
<%= link_to('Show students without any points', organization_course_point_path(@organization, @course, @sheetname, show_attempted: 1, sort_by: params[:sort_by]), class: "btn btn-primary") %>
21-
<% else %>
22-
<%= link_to('Hide students without any points', organization_course_point_path(@organization, @course, @sheetname, sort_by: params[:sort_by]), class: "btn btn-primary") %>
23-
<% end %>
24-
<% end %>
2517
</div>
2618
</div>
2719

0 commit comments

Comments
 (0)