Skip to content

Commit

Permalink
Merge pull request #3338 from BTWS2/students-with-teacher-rights-higher
Browse files Browse the repository at this point in the history
Change sort order for students with teacher rights
  • Loading branch information
bmesuere authored Feb 4, 2022
2 parents b332b70 + 9baf9db commit a5d83e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/course_members_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def index
@course_memberships = apply_scopes(@course.course_memberships)
.includes(:course_labels, user: [:institution])
.order(status: :asc)
.order(Arel.sql('users.permission ASC'))
.order(Arel.sql('users.permission DESC'))
.order(Arel.sql('users.last_name ASC'), Arel.sql('users.first_name ASC'))
.where(status: statuses)
.paginate(page: parse_pagination_param(params[:page]))
Expand Down
2 changes: 1 addition & 1 deletion app/views/course_members/_members_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<td>
<% if course_membership.course_admin? %>
<i class="mdi mdi-school course-mdi-icon mdi-18" title='<%= t "users.users_table.course_admin" %>'></i>
<% elsif user.staff? %>
<% elsif user.admin? %>
<span class="mdi mdi-alert mdi-18" data-bs-toggle="tooltip" data-bs-placement="top" title="<%= t(".teacher_rights") %>"></span>
<% end %>
<% if user.username.blank? %>
Expand Down

0 comments on commit a5d83e6

Please sign in to comment.