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
7559cd90
Commit
7559cd90
authored
Apr 30, 2013
by
Alexander Kryklia
Committed by
Vasyl Nakvasiuk
May 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separates xfields that descriptor use and module use
parent
36d2dd63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
common/lib/xmodule/xmodule/word_cloud_module.py
+6
-3
No files found.
common/lib/xmodule/xmodule/word_cloud_module.py
View file @
7559cd90
...
...
@@ -24,13 +24,16 @@ def pretty_bool(value):
return
value
in
BOOL_DICT
class
WordCloudFields
(
object
):
class
WordCloud
Descriptor
Fields
(
object
):
# Name of poll to use in links to this poll
display_name
=
String
(
help
=
"Display name for this module"
,
scope
=
Scope
.
settings
)
num_inputs
=
Integer
(
help
=
"Number of inputs"
,
scope
=
Scope
.
settings
,
default
=
5
)
num_top_words
=
Integer
(
help
=
"Number of max words, which will be displayed."
,
scope
=
Scope
.
settings
,
default
=
250
)
display_student_percents
=
Boolean
(
help
=
"Dispaly usage percents for each word."
,
scope
=
Scope
.
settings
,
default
=
True
)
class
WordCloudFields
(
object
):
submitted
=
Boolean
(
help
=
"Whether this student has posted words to the cloud"
,
scope
=
Scope
.
user_state
,
default
=
False
)
student_words
=
List
(
help
=
"Student answer"
,
scope
=
Scope
.
user_state
,
default
=
[])
...
...
@@ -38,7 +41,7 @@ class WordCloudFields(object):
top_words
=
Object
(
help
=
"Top N words for word cloud"
,
scope
=
Scope
.
content
)
class
WordCloudModule
(
WordCloudFields
,
XModule
):
class
WordCloudModule
(
WordCloudFields
,
WordCloudDescriptorFields
,
XModule
):
"""WordCloud Module"""
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/javascript_loader.coffee'
)],
...
...
@@ -169,7 +172,7 @@ class WordCloudModule(WordCloudFields, XModule):
return
self
.
content
class
WordCloudDescriptor
(
WordCloudFields
,
RawDescriptor
):
class
WordCloudDescriptor
(
WordCloud
Descriptor
Fields
,
RawDescriptor
):
module_class
=
WordCloudModule
template_dir_name
=
'word_cloud'
...
...
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