From 75ad419e857a9bd5e97e6799a192c377545a3390 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 17 Jul 2015 15:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=BA=9B=E5=B0=8Fbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/courses.rb | 2 +- app/services/courses_service.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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))