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
8ca12ce5
Commit
8ca12ce5
authored
Jan 03, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make combined open ended a container
parent
8e03c8f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
1 deletions
+47
-1
common/lib/xmodule/xmodule/combined_open_ended_module.py
+14
-0
common/lib/xmodule/xmodule/js/src/combinedopenended/combinedopenended.coffee
+24
-0
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+0
-0
common/lib/xmodule/xmodule/js/src/openended/display.coffee
+0
-0
common/lib/xmodule/xmodule/open_ended_module.py
+0
-1
lms/templates/combined_open_ended.html
+9
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
8ca12ce5
...
...
@@ -124,6 +124,20 @@ class CombinedOpenEndedModule(XModule):
return
True
def
get_html
(
self
):
task_html
=
self
.
get_html_base
()
#set context variables and render template
context
=
{
'items'
:
[{
'content'
:
task_html
}],
'ajax_url'
:
self
.
system
.
ajax_url
,
'allow_reset'
:
True
,
}
html
=
system
.
render_template
(
'combined_open_ended.html'
,
context
)
return
html
def
get_html_base
(
self
):
self
.
update_task_states
()
html
=
self
.
current_task
.
get_html
(
self
.
system
)
return_html
=
rewrite_links
(
html
,
self
.
rewrite_content_links
)
...
...
common/lib/xmodule/xmodule/js/src/combinedopenended/combinedopenended.coffee
0 → 100644
View file @
8ca12ce5
class
@
CombinedOpenEnded
constructor
:
(
element
)
->
@
el
=
$
(
element
).
find
(
'section.combined-open-ended'
)
@
ajax_url
=
@
el
.
data
(
'ajax-url'
)
@
reset_button
=
@
$
(
'.reset-button'
)
@
reset_button
.
click
@
reset
reset
:
(
event
)
=>
event
.
preventDefault
()
if
@
state
==
'done'
$
.
postWithPrefix
"
#{
@
ajax_url
}
/reset"
,
{},
(
response
)
=>
if
response
.
success
@
answer_area
.
val
(
''
)
@
rubric_wrapper
.
html
(
''
)
@
hint_wrapper
.
html
(
''
)
@
message_wrapper
.
html
(
''
)
@
state
=
'initial'
@
rebind
()
@
reset_button
.
hide
()
else
@
errors_area
.
html
(
response
.
error
)
else
@
errors_area
.
html
(
'Problem state got out of sync. Try reloading the page.'
)
\ No newline at end of file
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
deleted
100644 → 0
View file @
8e03c8f6
common/lib/xmodule/xmodule/js/src/openended/display.coffee
deleted
100644 → 0
View file @
8e03c8f6
common/lib/xmodule/xmodule/open_ended_module.py
deleted
100644 → 0
View file @
8e03c8f6
lms/templates/combined_open_ended.html
0 → 100644
View file @
8ca12ce5
<div
id=
"combined-open-ended"
class=
"combined-open-ended"
data-ajax-url=
"${ajax_url}"
data-allow_reset=
"${allow_reset}"
>
% for item in items:
<div
class=
"item"
>
${item['content'] | h}
</div>
% endfor
<input
type=
"button"
value=
"Reset"
class=
"reset-button"
name=
"reset"
/>
</div>
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