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
4a3b8911
Commit
4a3b8911
authored
Mar 25, 2015
by
Zia Fazal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cherry picked commit c5a7ca3
parent
96081f71
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
14 deletions
+9
-14
common/djangoapps/course_groups/management/commands/revert_workgroup.py
+2
-2
common/lib/xmodule/xmodule/x_module.py
+2
-2
lms/djangoapps/django_comment_client/forum/views.py
+3
-3
lms/envs/common.py
+2
-7
No files found.
common/djangoapps/course_groups/management/commands/revert_workgroup.py
View file @
4a3b8911
...
...
@@ -6,8 +6,8 @@ from django.contrib.auth.models import User
from
xmodule.modulestore.django
import
modulestore
from
xmodule.course_module
import
CourseDescriptor
from
course_groups.models
import
CourseUserGroup
from
course_groups.cohorts
import
(
from
openedx.core.djangoapps.
course_groups.models
import
CourseUserGroup
from
openedx.core.djangoapps.
course_groups.cohorts
import
(
get_cohort
,
get_cohort_by_name
,
add_cohort
,
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
4a3b8911
...
...
@@ -1462,7 +1462,7 @@ class DiscussionService(object):
from
django_comment_client.forum.views
import
get_threads
,
make_course_settings
from
django_comment_client.permissions
import
cached_has_permission
import
django_comment_client.utils
as
utils
from
course_groups.cohorts
import
(
from
openedx.core.djangoapps.
course_groups.cohorts
import
(
is_course_cohorted
,
get_cohort_id
,
get_cohorted_commentables
,
...
...
@@ -1480,7 +1480,7 @@ class DiscussionService(object):
user_cohort_id
=
get_cohort_id
(
user
,
course_id
)
unsafethreads
,
query_params
=
get_threads
(
request
,
course_id
)
threads
=
[
utils
.
saf
e_content
(
thread
,
course_id
)
for
thread
in
unsafethreads
]
threads
=
[
utils
.
prepar
e_content
(
thread
,
course_id
)
for
thread
in
unsafethreads
]
utils
.
add_courseware_context
(
threads
,
course
)
flag_moderator
=
cached_has_permission
(
user
,
'openclose_thread'
,
course_id
)
or
has_access
(
user
,
'staff'
,
course
)
...
...
lms/djangoapps/django_comment_client/forum/views.py
View file @
4a3b8911
...
...
@@ -384,7 +384,7 @@ def single_thread(request, course_key, discussion_id, thread_id):
'sort_preference'
:
cc_user
.
default_sort_key
,
'category_map'
:
course_settings
[
"category_map"
],
'course_settings'
:
_attr_safe_json
(
course_settings
),
'cohorted_commentables'
:
(
get_cohorted_commentables
(
course_
id
))
'cohorted_commentables'
:
(
get_cohorted_commentables
(
course_
key
))
}
return
render_to_response
(
'discussion/index.html'
,
context
)
...
...
@@ -419,7 +419,7 @@ def user_profile(request, course_key, user_id):
profiled_user
=
cc
.
User
(
id
=
user_id
,
course_id
=
course_key
)
threads
,
page
,
num_pages
=
profiled_user
.
active_threads
(
query_params
)
threads
=
_set_group_names
(
course_
id
,
threads
)
threads
=
_set_group_names
(
course_
key
,
threads
)
query_params
[
'page'
]
=
page
query_params
[
'num_pages'
]
=
num_pages
user_info
=
cc
.
User
.
from_django_user
(
request
.
user
)
.
to_dict
()
...
...
@@ -499,7 +499,7 @@ def followed_threads(request, course_key, user_id):
query_params
[
'group_id'
]
=
group_id
threads
,
page
,
num_pages
=
profiled_user
.
subscribed_threads
(
query_params
)
threads
=
_set_group_names
(
course_
id
,
threads
)
threads
=
_set_group_names
(
course_
key
,
threads
)
query_params
[
'page'
]
=
page
query_params
[
'num_pages'
]
=
num_pages
user_info
=
cc
.
User
.
from_django_user
(
request
.
user
)
.
to_dict
()
...
...
lms/envs/common.py
View file @
4a3b8911
...
...
@@ -1713,14 +1713,9 @@ if FEATURES.get('AUTH_USE_CAS'):
############# CORS headers for cross-domain requests #################
if
FEATURES
.
get
(
'ENABLE_CORS_HEADERS'
):
INSTALLED_APPS
+=
(
'corsheaders'
,
'cors_csrf'
)
MIDDLEWARE_CLASSES
=
(
'corsheaders.middleware.CorsMiddleware'
,
'cors_csrf.middleware.CorsCSRFMiddleware'
,
)
+
MIDDLEWARE_CLASSES
CORS_ALLOW_CREDENTIALS
=
True
CORS_ORIGIN_WHITELIST
=
(
'devstack.local'
,
'apros.devstack.local'
)
CORS_ORIGIN_
REGEX_WHITELIST
=
(
'^http?://(
\
w+
\
.)?devstack
\
.local$'
,)
CORS_ORIGIN_WHITELIST
=
()
CORS_ORIGIN_
ALLOW_ALL
=
False
###################### Registration ##################################
...
...
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