diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index db628dd67..076e0b1c7 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -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 diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 01b72317c..e4e84a7c4 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -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))