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
17427752
Commit
17427752
authored
Aug 13, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added configuration parameter to turn on / off discussion service
parent
d6f34929
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
9 deletions
+16
-9
lms/envs/common.py
+2
-0
lms/templates/course_navigation.html
+1
-1
lms/templates/discussion/_inline.html
+1
-2
lms/urls.py
+12
-6
No files found.
lms/envs/common.py
View file @
17427752
...
...
@@ -37,6 +37,7 @@ COURSEWARE_ENABLED = True
ASKBOT_ENABLED
=
True
GENERATE_RANDOM_USER_CREDENTIALS
=
False
PERFSTATS
=
False
DISCUSSION_SERVICE_ENABLED
=
True
# Features
MITX_FEATURES
=
{
...
...
@@ -52,6 +53,7 @@ MITX_FEATURES = {
'ENABLE_TEXTBOOK'
:
True
,
'ENABLE_DISCUSSION'
:
True
,
'ENABLE_DISCUSSION_SERVICE'
:
True
,
'ENABLE_SQL_TRACKING_LOGS'
:
False
,
'ENABLE_LMS_MIGRATION'
:
False
,
...
...
lms/templates/course_navigation.html
View file @
17427752
...
...
@@ -17,7 +17,7 @@ def url_class(url):
% if settings.MITX_FEATURES.get('ENABLE_TEXTBOOK'):
<li
class=
"book"
><a
href=
"${reverse('book', args=[course.id])}"
class=
"${url_class('book')}"
>
Textbook
</a></li>
% endif
% if settings.MITX_FEATURES.get('ENABLE_DISCUSSION'):
% if settings.MITX_FEATURES.get('ENABLE_DISCUSSION
_SERVICE
'):
<li
class=
"discussion"
><a
href=
"${reverse('django_comment_client.forum.views.forum_form_discussion', args=[course.id, course.id.replace('/', '_').replace('.', '_')])}"
class=
"${url_class('discussion')}"
>
Discussion
</a></li>
<li
class=
"news"
><a
href=
"${reverse('news', args=[course.id])}"
class=
"${url_class('news')}"
>
News
</a></li>
% endif
...
...
lms/templates/discussion/_inline.html
View file @
17427752
...
...
@@ -3,8 +3,7 @@
<section
class=
"discussion inline-discussion"
_id=
"${discussion_id}"
>
<div
class=
"discussion-non-content discussion-local"
>
</div>
<div
class=
"discussion-non-content discussion-local"
></div>
<div
class=
"threads"
>
% for thread in threads:
...
...
lms/urls.py
View file @
17427752
...
...
@@ -136,17 +136,22 @@ if settings.COURSEWARE_ENABLED:
'courseware.views.profile'
,
name
=
"profile"
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/profile/(?P<student_id>[^/]*)/$'
,
'courseware.views.profile'
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/news$'
,
'courseware.views.news'
,
name
=
"news"
),
# discussion
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/discussion/'
,
include
(
'django_comment_client.urls'
)),
# For the instructor
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/gradebook$'
,
'courseware.views.gradebook'
),
)
# discussion forums live within courseware, so courseware must be enabled first
if
settings
.
DISCUSSION_SERVICE_ENABLED
:
urlpatterns
+=
(
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/news$'
,
'courseware.views.news'
,
name
=
"news"
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/discussion/'
,
include
(
'django_comment_client.urls'
))
)
# Multicourse wiki
if
settings
.
WIKI_ENABLED
:
urlpatterns
+=
(
...
...
@@ -167,6 +172,7 @@ if settings.ASKBOT_ENABLED:
)
if
settings
.
DEBUG
:
## Jasmine
urlpatterns
=
urlpatterns
+
(
url
(
r'^_jasmine/'
,
include
(
'django_jasmine.urls'
)),)
...
...
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