修改一些小bug

This commit is contained in:
lizanle 2015-07-17 15:19:28 +08:00
parent 44a2e23d14
commit 75ad419e85
2 changed files with 3 additions and 3 deletions

View File

@ -340,7 +340,7 @@ module Mobile
get ':course_id/student_works_list' do get ':course_id/student_works_list' do
cs = CoursesService.new cs = CoursesService.new
student_works = cs.student_work_list params,current_user 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 present :status,0
end end

View File

@ -654,9 +654,9 @@ class CoursesService
return return
end end
if current_user == @user || current_user.admin? if current_user == @user || current_user.admin?
membership = @user.coursememberships.page(1).per(5) membership = @user.coursememberships.page(1).per(15)
else 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 end
if membership.nil? || membership.count == 0 if membership.nil? || membership.count == 0
raise l(:label_no_courses, :locale => get_user_language(current_user)) raise l(:label_no_courses, :locale => get_user_language(current_user))