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
5ae92a19
Commit
5ae92a19
authored
Aug 29, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #592 from MITx/feature/arjun/fix_discussions_in_sequences
Fix discussions in xmodules
parents
a29991e8
5d6bed86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
common/lib/xmodule/xmodule/discussion_module.py
+6
-0
common/lib/xmodule/xmodule/js/src/discussion/display.coffee
+4
-0
lms/static/coffee/src/discussion/main.coffee
+0
-3
No files found.
common/lib/xmodule/xmodule/discussion_module.py
View file @
5ae92a19
from
lxml
import
etree
from
pkg_resources
import
resource_string
,
resource_listdir
from
xmodule.x_module
import
XModule
from
xmodule.raw_module
import
RawDescriptor
...
...
@@ -6,6 +7,11 @@ from xmodule.raw_module import RawDescriptor
import
json
class
DiscussionModule
(
XModule
):
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/time.coffee'
),
resource_string
(
__name__
,
'js/src/discussion/display.coffee'
)]
}
js_module_name
=
"InlineDiscussion"
def
get_html
(
self
):
context
=
{
'discussion_id'
:
self
.
discussion_id
,
...
...
common/lib/xmodule/xmodule/js/src/discussion/display.coffee
0 → 100644
View file @
5ae92a19
class
@
InlineDiscussion
constructor
:
(
element
)
->
@
el
=
$
(
element
).
find
(
'.discussion-module'
)
@
view
=
new
DiscussionModuleView
(
el
:
@
el
)
lms/static/coffee/src/discussion/main.coffee
View file @
5ae92a19
...
...
@@ -3,9 +3,6 @@ $ ->
window
.
$
$contents
=
{}
window
.
$
$discussions
=
{}
$
(
".discussion-module"
).
each
(
index
,
elem
)
->
view
=
new
DiscussionModuleView
(
el
:
elem
)
$
(
"section.discussion"
).
each
(
index
,
elem
)
->
discussionData
=
DiscussionUtil
.
getDiscussionData
(
$
(
elem
).
attr
(
"_id"
))
discussion
=
new
Discussion
()
...
...
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