Pick a better ordering field for CourseEnrollmentPagination in grades API.

This commit is contained in:
Alex Dusenbery
2018-11-27 09:41:55 -05:00
committed by Alex Dusenbery
parent 7fb51dfa16
commit 44101d656d
5 changed files with 5 additions and 7 deletions

View File

@@ -29,7 +29,7 @@ from courseware.tests.factories import (
from courseware.tests.helpers import LoginEnrollmentTestCase, masquerade_as_group_member
from lms.djangoapps.ccx.models import CustomCourseForEdX
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES, override_waffle_flag
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES
from openedx.core.lib.tests import attr
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
from student.models import CourseEnrollment

View File

@@ -45,7 +45,7 @@ from openedx.core.djangoapps.course_groups.models import CourseUserGroup
from openedx.core.djangoapps.course_groups.tests.helpers import config_course_cohorts
from openedx.core.djangoapps.course_groups.tests.test_views import CohortViewsTestCase
from openedx.core.djangoapps.util.testing import ContentGroupTestCase
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES, override_waffle_flag
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseTestConsentRequired
from student.roles import CourseStaffRole, UserBasedRole

View File

@@ -37,7 +37,7 @@ from lms.djangoapps.teams.tests.factories import CourseTeamFactory, CourseTeamMe
from lms.lib.comment_client import Thread
from openedx.core.djangoapps.course_groups.cohorts import set_course_cohorted
from openedx.core.djangoapps.course_groups.tests.helpers import CohortFactory
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES, override_waffle_flag
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES
from openedx.core.lib.tests import attr
from student.roles import CourseStaffRole, UserBasedRole
from student.tests.factories import CourseAccessRoleFactory, CourseEnrollmentFactory, UserFactory

View File

@@ -111,8 +111,8 @@ class CourseEnrollmentPagination(CursorPagination):
"""
Paginates over CourseEnrollment objects.
"""
page_size = 25
ordering = 'created'
page_size = 50
ordering = 'id'
class PaginatedAPIView(APIView):

View File

@@ -7,8 +7,6 @@ StackedConfigurationModel: A ConfigurationModel that can be overridden at site,
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import namedtuple
from django.conf import settings
from django.db import models
from django.db.models import Q, F