fix solving wybor with radio buttons
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Mon, 11 Feb 2013 17:12:09 +0000 (18:12 +0100)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Mon, 11 Feb 2013 17:12:09 +0000 (18:12 +0100)
lib/librarian
redakcja/static/edumed/js/edumed.coffee
redakcja/static/edumed/js/edumed.js

index a1e43b7..b25d910 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a1e43b7bba2a0c7cf33280143bb49af3fef5d0d0
+Subproject commit b25d910280f7c8573560bbe9ca2718332c438ec3
index 9c3b3df..21cbc86 100644 (file)
@@ -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)
       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
 
 
 
 
 
 
index 1952c63..b4912dd 100644 (file)
           should_be_checked = solution.indexOf(piece_no) >= 0;
         }
         console.log("check " + $("input[type=checkbox]", qpiece).attr("id") + " -> " + should_be_checked);
           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);
       });
     };
 
       });
     };