Skip to content

Commit

Permalink
eh
Browse files Browse the repository at this point in the history
  • Loading branch information
stgm committed Jun 3, 2015
1 parent 1472852 commit e1cd48f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/course_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def change_user_name
#
def grades_for_group
if params[:group].present?
@users = Group.find_by_name(params[:group]).users.includes(:submits => [:pset, :grade])
@users = Group.find_by_name(params[:group]).users.includes(:submits => [:pset, :grade]).order(:name)
else
if Group.count > 0
@users = Group.order(:name).first.users
@users = Group.order(:name).first.users.order(:name)]
end
end
@psets = Pset.order(:order).all
Expand Down
2 changes: 1 addition & 1 deletion app/views/course/grades.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div class="tab-content">
<section class="tab-pane active">
<%= render partial: 'table', locals: { users: @users.order(:name), psets: @psets, schedules: Schedule.all } %>
<%= render partial: 'table', locals: { users: @users, psets: @psets, schedules: Schedule.all } %>
</section>
</div>

Expand Down

0 comments on commit e1cd48f

Please sign in to comment.