From 9258b2e0b32269e543149412ae742ab1fe2f44a8 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Mon, 11 Feb 2013 11:40:00 +0100 Subject: [PATCH] fix prawdafalsz - thanks a lot jquery --- redakcja/static/edumed/js/edumed.coffee | 2 +- redakcja/static/edumed/js/edumed.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()); -- 2.20.1