From: Marcin Koziej Date: Mon, 11 Feb 2013 10:40:00 +0000 (+0100) Subject: fix prawdafalsz - thanks a lot jquery X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/9258b2e0b32269e543149412ae742ab1fe2f44a8?ds=sidebyside fix prawdafalsz - thanks a lot jquery --- diff --git a/redakcja/static/edumed/js/edumed.coffee b/redakcja/static/edumed/js/edumed.coffee index afe75d0c..9c3b3dfc 100644 --- a/redakcja/static/edumed/js/edumed.coffee +++ b/redakcja/static/edumed/js/edumed.coffee @@ -456,7 +456,7 @@ class PrawdaFalsz extends Exercise show_solutions: -> @reset() for qp in $(".question-piece", @element) - if $(qp).data('solution') == 'true' + if $(qp).data('solution') == true $(".true", qp).click() else $(".false", qp).click() diff --git a/redakcja/static/edumed/js/edumed.js b/redakcja/static/edumed/js/edumed.js index c8e37c36..1952c63f 100644 --- a/redakcja/static/edumed/js/edumed.js +++ b/redakcja/static/edumed/js/edumed.js @@ -609,7 +609,7 @@ _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { qp = _ref[_i]; - if ($(qp).data('solution') === 'true') { + if ($(qp).data('solution') === true) { _results.push($(".true", qp).click()); } else { _results.push($(".false", qp).click());