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
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()
new EduModule($("#book-text"))
$(".exercise").each (i, el) ->
- exercise(this)
\ No newline at end of file
+ exercise(this)