作业列表降序排序
This commit is contained in:
parent
0d292d8ee6
commit
ae27e4062f
|
@ -5,7 +5,7 @@ class HomeworkCommonController < ApplicationController
|
|||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
|
||||
|
||||
def index
|
||||
homeworks = @course.homework_commons
|
||||
homeworks = @course.homework_commons.order("created_at desc")
|
||||
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
|
||||
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
|
||||
@homeworks = paginateHelper homeworks,20
|
||||
|
|
Loading…
Reference in New Issue