Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
c5b6f57dea
|
@ -485,7 +485,7 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
|
||||
def homework
|
||||
if @course.is_public != 0 || User.current.member_of_course?(@course)
|
||||
if @course.is_public != 0 || User.current.member_of_course?(@course) || User.current.admin?
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
@bids = @course.homeworks.order('deadline DESC')
|
||||
@bids = @bids.like(params[:name]) if params[:name].present?
|
||||
|
|
Loading…
Reference in New Issue