X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/7edcc61e9599f75b6ce89c75a99ce1f7724499b9..bb26a742696b7b86bb1b555a285ceaa24b5fa3b3:/redakcja/static/edumed/js/edumed.coffee diff --git a/redakcja/static/edumed/js/edumed.coffee b/redakcja/static/edumed/js/edumed.coffee index 59430a29..21cbc867 100644 --- a/redakcja/static/edumed/js/edumed.coffee +++ b/redakcja/static/edumed/js/edumed.coffee @@ -227,7 +227,7 @@ class Wybor extends Exercise else should_be_checked = solution.indexOf(piece_no) >= 0 console.log("check " + $("input[type=checkbox]", qpiece).attr("id") + " -> " + should_be_checked) - $("input[type=checkbox]", qpiece).prop 'checked', should_be_checked + $("input[type=checkbox],input[type=radio]", qpiece).prop 'checked', should_be_checked @@ -454,9 +454,9 @@ class PrawdaFalsz extends Exercise return [good, all] show_solutions: -> - reset() + @reset() for qp in $(".question-piece", @element) - if $(qp).data('solution') == 'true' + if $(qp).data('solution') == true $(".true", qp).click() else $(".false", qp).click() @@ -488,4 +488,4 @@ $(document).ready () -> new EduModule($("#book-text")) $(".exercise").each (i, el) -> - exercise(this) \ No newline at end of file + exercise(this)