Repository navigation
Adds word cloud xblock extracting from edx-platform repo #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3e22510
feat: Adds word cloud xblock extracting from edx-platform repo
farhan a491a25
chore: Adds default value of global variable in case of absence
farhan f77739f
chore: Adds index_dictionary method
farhan 1b9057e
chore: Revert ajax impementation to xmodule mixin pattern to fix list…
farhan 99f852a
chore: move x_module utils within code package
farhan 16eee50
chore: Update element_id to fix test case
farhan 40084b1
chore: Add data class attribute to pass the test cases
farhan 5b49c6f
chore: Drop Xmodule mixin, update ajax to latest pattern
farhan 7261df6
chore: Optimizations
farhan 2d89b92
chore: Optimization as per test case
farhan c225551
chore: Update block identifier and element class assignment
farhan fe2cb5c
chore: Adds support of i18n
farhan e632fb3
chore: remove unrequired code
farhan 6e70ecb
chore: update word cloud identifier
farhan d167964
chore: Add package in html div tag for differentiation
farhan e1bc265
chore: Update release version
farhan c46a60a
chore: Address PR change request
farhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,9 @@ | |
| __pycache__ | ||
| .pytest_cache | ||
|
|
||
| ### Editor and IDE artifacts | ||
| .idea/ | ||
|
|
||
| # C extensions | ||
| *.so | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| """ | ||
| Init for the WordCloudBlock. | ||
| """Word cloud is ungraded xblock used by students to generate and view word cloud. | ||
| """ | ||
|
|
||
| from .word_cloud import WordCloudBlock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| This static directory is for files that should be included in your kit as plain | ||
| static files. | ||
|
|
||
| You can ask the runtime for a URL that will retrieve these files with: | ||
|
|
||
| url = self.runtime.local_resource_url(self, "static/js/lib.js") | ||
|
|
||
| The default implementation is very strict though, and will not serve files from | ||
| the static directory. It will serve files from a directory named "public". | ||
| Create a directory alongside this one named "public", and put files there. | ||
| Then you can get a url with code like this: | ||
|
|
||
| url = self.runtime.local_resource_url(self, "public/js/lib.js") | ||
|
|
||
| The sample code includes a function you can use to read the content of files | ||
| in the static directory, like this: | ||
|
|
||
| frag.add_javascript(self.resource_string("static/js/my_block.js")) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,29 @@ | ||
| /* CSS for WordCloudBlock */ | ||
|
|
||
| .word_cloud .count { | ||
| font-weight: bold; | ||
| @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700"); | ||
|
|
||
| .input-cloud { | ||
| margin: calc((var(--baseline, 20px) / 4)); | ||
| } | ||
|
|
||
| .result_cloud_section { | ||
| display: none; | ||
| width: 0; | ||
| height: 0; | ||
| } | ||
|
|
||
| .result_cloud_section.active { | ||
| display: block; | ||
| width: 100%; | ||
| height: auto; | ||
| margin-top: 1em; | ||
| } | ||
|
|
||
| .result_cloud_section.active h3 { | ||
| font-size: 100%; | ||
| } | ||
|
|
||
| .word_cloud p { | ||
| cursor: pointer; | ||
| .your_words { | ||
| font-size: 0.85em; | ||
| display: block; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.