Skip to content

Commit 634995b

Browse files
committed
Sort courses by title instead of name
1 parent 5b6ecfb commit 634995b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/controllers/organizations_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class OrganizationsController < ApplicationController
88
skip_authorization_check only: %i[index new]
99

1010
def index
11-
ordering = 'hidden, LOWER(name)'
11+
ordering = 'hidden, LOWER(title)'
1212
@organizations = Organization
1313
.accepted_organizations
1414
.order(ordering)
@@ -29,7 +29,7 @@ def index
2929

3030
def show
3131
add_organization_breadcrumb
32-
ordering = 'hidden, disabled_status, LOWER(courses.name)'
32+
ordering = 'hidden, disabled_status, LOWER(courses.title)'
3333
@my_courses = Course.participated_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
3434
@my_assisted_courses = Course.assisted_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
3535
@ongoing_courses = @organization
@@ -55,7 +55,7 @@ def all_courses
5555
return respond_access_denied('Submissions for this exercise are no longer accepted.') unless current_user.administrator?
5656
add_organization_breadcrumb
5757
add_breadcrumb 'All Courses'
58-
ordering = 'hidden, disabled_status, LOWER(courses.name)'
58+
ordering = 'hidden, disabled_status, LOWER(courses.title)'
5959
@my_courses = Course.participated_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
6060
@my_assisted_courses = Course.assisted_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
6161
@ongoing_courses = @organization.courses.ongoing.order(ordering).select { |c| c.visible_to?(current_user) }

0 commit comments

Comments
 (0)