Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
96081f71
Commit
96081f71
authored
Mar 24, 2015
by
Zia Fazal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cherry picked commit a17d1e3
parent
73406596
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
lms/djangoapps/api_manager/permissions.py
+7
-1
lms/djangoapps/django_comment_client/base/tests.py
+1
-1
lms/djangoapps/django_comment_client/base/views.py
+3
-3
No files found.
lms/djangoapps/api_manager/permissions.py
View file @
96081f71
...
...
@@ -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
()
lms/djangoapps/django_comment_client/base/tests.py
View file @
96081f71
...
...
@@ -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
})
...
...
lms/djangoapps/django_comment_client/base/views.py
View file @
96081f71
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment