Commit 96081f71 by Zia Fazal

cherry picked commit a17d1e3

parent 73406596
......@@ -162,4 +162,10 @@ class SecureListAPIView(PermissionMixin,
"""
Inherited from ListAPIView
"""
pass
# if page_size parameter in request is zero don't paginate results
def get_paginate_by(self):
page_size = int(self.request.QUERY_PARAMS.get('page_size', 0))
if page_size == 0:
return None
else:
return super(SecureListAPIView, self).get_paginate_by()
......@@ -987,7 +987,7 @@ class ViewsTestCase(UrlResetMixin, ModuleStoreTestCase, MockRequestSetupMixin):
@patch("lms.lib.comment_client.utils.requests.request")
@override_settings(MODULESTORE=TEST_DATA_MOCK_MODULESTORE)\
@override_settings(MODULESTORE=TEST_DATA_MOCK_MODULESTORE)
@patch.dict("django.conf.settings.FEATURES", {"ENABLE_SOCIAL_ENGAGEMENT": False})
class ViewPermissionsTestCase(UrlResetMixin, ModuleStoreTestCase, MockRequestSetupMixin):
@patch.dict("django.conf.settings.FEATURES", {"ENABLE_DISCUSSION_SERVICE": True})
......
......@@ -24,9 +24,9 @@ from edx_notifications.lib.publisher import (
)
from edx_notifications.data import NotificationMessage
from courseware.courses import get_course_with_access, get_course_by_id
from course_groups.cohorts import get_cohort_id, is_commentable_cohorted, get_cohort_by_id
from course_groups.tasks import publish_course_group_notification_task
from course_groups.models import CourseUserGroup
from openedx.core.djangoapps.course_groups.cohorts import get_cohort_id, is_commentable_cohorted, get_cohort_by_id
from openedx.core.djangoapps.course_groups.tasks import publish_course_group_notification_task
from openedx.core.djangoapps.course_groups.models import CourseUserGroup
import django_comment_client.settings as cc_settings
from django_comment_client.utils import (
add_courseware_context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment