Merge pull request #2107 from edx/anton/fix-image-response
Fix show answer button for ImageResponse.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user