From: Marcin Koziej Date: Mon, 11 Feb 2013 17:12:09 +0000 (+0100) Subject: fix solving wybor with radio buttons X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/bb26a742696b7b86bb1b555a285ceaa24b5fa3b3 fix solving wybor with radio buttons --- diff --git a/lib/librarian b/lib/librarian index a1e43b7b..b25d9102 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit a1e43b7bba2a0c7cf33280143bb49af3fef5d0d0 +Subproject commit b25d910280f7c8573560bbe9ca2718332c438ec3 diff --git a/redakcja/static/edumed/js/edumed.coffee b/redakcja/static/edumed/js/edumed.coffee index 9c3b3dfc..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 diff --git a/redakcja/static/edumed/js/edumed.js b/redakcja/static/edumed/js/edumed.js index 1952c63f..b4912dd0 100644 --- a/redakcja/static/edumed/js/edumed.js +++ b/redakcja/static/edumed/js/edumed.js @@ -269,7 +269,7 @@ should_be_checked = solution.indexOf(piece_no) >= 0; } console.log("check " + $("input[type=checkbox]", qpiece).attr("id") + " -> " + should_be_checked); - return $("input[type=checkbox]", qpiece).prop('checked', should_be_checked); + return $("input[type=checkbox],input[type=radio]", qpiece).prop('checked', should_be_checked); }); };