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
b4fe3c89
Commit
b4fe3c89
authored
Oct 27, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #286 from open-craft/discussion-integration
Discussion integration
parents
d0f84762
a4e16c5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
common/djangoapps/util/request.py
+3
-0
common/lib/xmodule/xmodule/x_module.py
+1
-1
No files found.
common/djangoapps/util/request.py
View file @
b4fe3c89
...
@@ -42,6 +42,9 @@ def course_id_from_url(url):
...
@@ -42,6 +42,9 @@ def course_id_from_url(url):
if
'/'
in
url
:
if
'/'
in
url
:
deprecated
=
True
deprecated
=
True
# Ignore query string
url
=
url
.
split
(
'?'
)[
0
]
if
deprecated
:
if
deprecated
:
COURSE_REGEX
=
re
.
compile
(
r'^.*/courses/(?P<course_id>[^/]+/[^/]+/[^/]+)'
)
COURSE_REGEX
=
re
.
compile
(
r'^.*/courses/(?P<course_id>[^/]+/[^/]+/[^/]+)'
)
key_generator
=
SlashSeparatedCourseKey
.
from_deprecated_string
key_generator
=
SlashSeparatedCourseKey
.
from_deprecated_string
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
b4fe3c89
...
@@ -1266,7 +1266,7 @@ class DiscussionService(object):
...
@@ -1266,7 +1266,7 @@ class DiscussionService(object):
user_cohort_id
=
get_cohort_id
(
user
,
course_id
)
user_cohort_id
=
get_cohort_id
(
user
,
course_id
)
unsafethreads
,
query_params
=
get_threads
(
request
,
course_id
)
unsafethreads
,
query_params
=
get_threads
(
request
,
course_id
)
threads
=
[
utils
.
safe_content
(
thread
)
for
thread
in
unsafethreads
]
threads
=
[
utils
.
safe_content
(
thread
,
course_id
)
for
thread
in
unsafethreads
]
flag_moderator
=
cached_has_permission
(
user
,
'openclose_thread'
,
course_id
)
or
\
flag_moderator
=
cached_has_permission
(
user
,
'openclose_thread'
,
course_id
)
or
\
has_access
(
user
,
'staff'
,
course
)
has_access
(
user
,
'staff'
,
course
)
...
...
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