Commit 54eaabce by Anton Stupak

Merge pull request #2107 from edx/anton/fix-image-response

Fix show answer button for ImageResponse.
parents 9363dba5 95a88823
......@@ -308,11 +308,17 @@ describe 'Problem', ->
states = [
{
desc: 'rectangle is drawn correctly',
data: {'rectangle': '(10,10)-(30,30)'}
data: {
'rectangle': '(10,10)-(30,30)',
'regions': null
}
},
{
desc: 'region is drawn correctly',
data: {'regions': '[[10,10],[30,30],[70,30],[20,30]]'}
data: {
'rectangle': null,
'regions': '[[10,10],[30,30],[70,30],[20,30]]'
}
},
{
desc: 'mixed shapes are drawn correctly',
......@@ -387,7 +393,7 @@ describe 'Problem', ->
ctx.lineWidth = "2";
$.each coords, (key, value) =>
types[key](value) if types[key]?
types[key](value) if types[key]? and value
return canvas
......
......@@ -260,7 +260,7 @@ class @Problem
check: =>
if not @check_save_waitfor(@check_internal)
@check_internal()
@check_internal()
check_internal: =>
Logger.log 'problem_check', @answers
......@@ -570,7 +570,7 @@ class @Problem
$.each answers, (key, answer) =>
$.each answer, (key, value) =>
types[key](value) if types[key]?
types[key](value) if types[key]? and value
container.html(canvas)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment