Revert "temporarily raise default_per_page on list courses"

This reverts commit 7dd4e4855dd37b05b86164ae0b01d5e0e36175fe.

Change-Id: I6a44be89838f539b032a18c239ee0d01b89874ac
Reviewed-on: https://gerrit.instructure.com/31210
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
This commit is contained in:
Jacob Fugal 2014-03-03 17:08:15 -07:00
parent 19ec47eba5
commit 630963e671
1 changed files with 1 additions and 3 deletions

View File

@ -291,9 +291,7 @@ class CoursesController < ApplicationController
hash = []
enrollments_by_course = enrollments.group_by(&:course_id).values
# TODO temporary! remove this default_per_page parameter once dependent
# applications have had a chance to start honoring the pagination
enrollments_by_course = Api.paginate(enrollments_by_course, self, api_v1_courses_url, default_per_page: Api.max_per_page) if api_request?
enrollments_by_course = Api.paginate(enrollments_by_course, self, api_v1_courses_url) if api_request?
enrollments_by_course.each do |course_enrollments|
course = course_enrollments.first.course
hash << course_json(course, @current_user, session, includes, course_enrollments)