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
335a36f1
Commit
335a36f1
authored
Dec 16, 2013
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address comments.
parent
887eea30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
19 deletions
+13
-19
common/lib/xmodule/xmodule/js/fixtures/imageinput.html
+11
-7
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
+2
-12
No files found.
common/lib/xmodule/xmodule/js/fixtures/imageinput.html
View file @
335a36f1
...
...
@@ -2,7 +2,7 @@
<!-- ${width} = 300 -->
<!-- ${height} = 400 -->
<
span
>
<
div
class=
"imageinput capa_inputtype"
id=
"inputtype_12345"
>
<input
type=
"hidden"
class=
"imageinput"
...
...
@@ -12,13 +12,17 @@
value=
""
/>
<div
id=
"imageinput_12345"
style=
"width: 300px; height: 400px; position: relative; left: 0; top: 0; visibility: hidden;"
>
<!-- image will go here -->
<div
style=
"position:relative;"
>
<div
id=
"imageinput_12345"
style=
"width: 300px; height: 400px; position: relative; left: 0; top: 0; visibility: hidden;"
>
<!-- image will go here -->
</div>
<div
id=
"answer_12345"
data-width=
"100"
data-height=
"100"
></div>
</div>
<!-- status == 'unsubmitted' -->
<span
class=
"unanswered"
...
...
@@ -28,4 +32,4 @@
>
<span
class=
"sr"
>
Status: unanswered
</span>
</span>
</
span
>
</
div
>
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
View file @
335a36f1
...
...
@@ -304,17 +304,7 @@ describe 'Problem', ->
expect
(
$
(
'input#1_2_1'
).
attr
(
'disabled'
)).
not
.
toEqual
(
'disabled'
)
describe
'imageinput'
,
->
imageinput_html
=
'''
<section class="problem">
<div class="imageinput capa_inputtype" id="inputtype_1_2_1">
<input class="imageinput" type="hidden" name="input_1_2_1" id="input_1_2_1">
<div style="position:relative;">
<div id="imageinput_1_2_1">test</div>
<div id="answer_1_2_1" data-width="100" data-height="100"></div>
</div>
</div>
</section>
'''
imageinput_html
=
readFixtures
(
'imageinput.html'
)
states
=
[
{
desc
:
'rectangle is drawn correctly'
,
...
...
@@ -342,7 +332,7 @@ describe 'Problem', ->
stubRequest
=
(
data
)
=>
spyOn
(
$
,
'postWithPrefix'
).
andCallFake
(
url
,
callback
)
->
callback
answers
:
"1
_2_1
"
:
data
callback
answers
:
"1
2345
"
:
data
getImage
=
(
coords
,
c_width
,
c_height
)
=>
types
=
...
...
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