修改一些小bug
This commit is contained in:
parent
44a2e23d14
commit
75ad419e85
|
@ -340,7 +340,7 @@ module Mobile
|
|||
get ':course_id/student_works_list' do
|
||||
cs = CoursesService.new
|
||||
student_works = cs.student_work_list params,current_user
|
||||
present :data,student_works.all,with:Mobile::Entities::StudentWork
|
||||
present :data,student_works,with:Mobile::Entities::StudentWork
|
||||
present :status,0
|
||||
end
|
||||
|
||||
|
|
|
@ -654,9 +654,9 @@ class CoursesService
|
|||
return
|
||||
end
|
||||
if current_user == @user || current_user.admin?
|
||||
membership = @user.coursememberships.page(1).per(5)
|
||||
membership = @user.coursememberships.page(1).per(15)
|
||||
else
|
||||
membership = @user.coursememberships.page(1).per(5).all(:conditions => Course.visible_condition(current_user))
|
||||
membership = @user.coursememberships.page(1).per(15).all(:conditions => Course.visible_condition(current_user))
|
||||
end
|
||||
if membership.nil? || membership.count == 0
|
||||
raise l(:label_no_courses, :locale => get_user_language(current_user))
|
||||
|
|
Loading…
Reference in New Issue