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
045e0bde
Commit
045e0bde
authored
Jan 23, 2015
by
Syed Hassan Raza
Committed by
David Baumgold
Feb 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quote the starts with expression id^
TNL-1240
parent
5f8d384e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletions
+36
-1
common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html
+22
-0
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
+13
-0
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+1
-1
No files found.
common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html
0 → 100644
View file @
045e0bde
<h2
class=
"problem-header"
>
Problem Header
</h2>
<div
class=
'problem-progress'
></div>
<div
class=
"problem"
>
<p>
${_("Problem Content")}
</p>
<div
class=
"action"
>
<input
type=
"hidden"
name=
"problem_id"
value=
"1"
>
<input
type=
"text"
name=
"input_example_1.Test"
id=
"input_example_1.Test"
value=
""
class=
"math"
/>
<span
id=
"display_example_1"
></span>
<span
id=
"input_example_1_dynamath"
></span>
<input
class=
"check"
type=
"button"
value=
"Check"
>
<input
class=
"reset"
type=
"button"
value=
"Reset"
>
<input
class=
"save"
type=
"button"
value=
"Save"
>
<button
class=
"show"
><span
class=
"show-label"
>
Show Answer(s)
</span>
<span
class=
"sr"
>
(for question(s) above - adjacent to each field)
</span></button>
<a
href=
"/courseware/6.002_Spring_2012/${ explain }"
class=
"new-page"
>
Explanation
</a>
<div
class=
"submission_feedback"
></div>
</div>
</div>
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
View file @
045e0bde
...
...
@@ -78,6 +78,19 @@ describe 'Problem', ->
[
@
problem
.
updateMathML
,
@
stubbedJax
,
$
(
'#input_example_1'
).
get
(
0
)]
]
describe
'bind_with_custom_input_id'
,
->
beforeEach
->
spyOn
window
,
'update_schematics'
MathJax
.
Hub
.
getAllJax
.
andReturn
[
@
stubbedJax
]
@
problem
=
new
Problem
(
$
(
'.xblock-student_view'
))
$
(
@
).
html
readFixtures
(
'problem_content_1240.html'
)
it
'bind the check button'
,
->
expect
(
$
(
'div.action input.check'
)).
toHandleWith
'click'
,
@
problem
.
check_fd
it
'bind the show button'
,
->
expect
(
$
(
'div.action button.show'
)).
toHandleWith
'click'
,
@
problem
.
show
describe
'renderProgressState'
,
->
beforeEach
->
@
problem
=
new
Problem
(
$
(
'.xblock-student_view'
))
...
...
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
045e0bde
...
...
@@ -25,7 +25,7 @@ class @Problem
window
.
update_schematics
()
problem_prefix
=
@
element_id
.
replace
(
/problem_/
,
''
)
@
inputs
=
@
$
(
"[id^=
input_
#{
problem_prefix
}
_
]"
)
@
inputs
=
@
$
(
"[id^=
'input_
#{
problem_prefix
}
_'
]"
)
@
$
(
'div.action input:button'
).
click
@
refreshAnswers
@
checkButton
=
@
$
(
'div.action input.check'
)
@
checkButtonCheckText
=
@
checkButton
.
val
()
...
...
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