maxscore style; fix exercise: Luki
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 14 Feb 2013 10:46:03 +0000 (11:46 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 14 Feb 2013 10:46:03 +0000 (11:46 +0100)
catalogue/static/catalogue/css/exercise.css
catalogue/static/catalogue/css/exercise.scss
catalogue/static/catalogue/js/edumed.js

index dc5ab1b..05b005f 100644 (file)
@@ -41,7 +41,9 @@
     font-weight: bold; }
   .exercise .buttons .message {
     float: right;
-    margin-right: 1.25em; }
+    padding: 0 1.25em; }
+  .exercise .buttons .maxscore {
+    background: #16a487; }
   .exercise .buttons input.check {
     background: #ed7831; }
 
@@ -52,7 +54,8 @@
   z-index: 2;
   display: inline-block;
   margin: 0.313em;
-  z-index: 2; }
+  z-index: 2;
+  max-width: 38em; }
 .luki .question-piece.disabled {
   background-color: #eee;
   color: #d4d6d8; }
index 039b088..cd87f12 100755 (executable)
@@ -96,7 +96,10 @@ $px: 0.0625em;
         }
         .message {
             float: right;
-            margin-right: 20*$px;
+            padding: 0 20*$px;
+        }
+        .maxscore {
+            background: #16a487;
         }
 
         input.check {
@@ -112,6 +115,7 @@ $px: 0.0625em;
     .question-piece {
         @include bubble-drag;
         @include bubble-inline;
+        max-width: 608*$px;
     }
     .question-piece.disabled {
         @include bubble-drag-disabled;
index f720aca..b05cc9c 100644 (file)
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.3.3
 (function() {
   var $, Binding, EduModule, Exercise, Luki, PrawdaFalsz, Przyporzadkuj, Uporzadkuj, Wybor, Zastap, exercise,
     __hasProp = {}.hasOwnProperty,
@@ -40,8 +40,8 @@
       $(this.element).data("exercise-html", $(this.element).html());
       $(".check", this.element).click(function(ev) {
         _this.check();
-        $(ev.target).next(".retry").show();
-        return $(ev.target).hide();
+        $(".retry", _this.element).show();
+        return $(".check", _this.element).hide();
       });
       $(".retry", this.element).click(function(ev) {
         return _this.retry();
     Luki.prototype.check = function() {
       var all, correct,
         _this = this;
-      all = 0;
+      all = $(".placeholder", this.element).length;
       correct = 0;
       $(".placeholder + .question-piece", this.element).each(function(i, qpiece) {
         var $placeholder;
         $placeholder = $(qpiece).prev(".placeholder");
         if ($placeholder.data('solution') === $(qpiece).data('no')) {
           _this.piece_correct(qpiece);
-          correct += 1;
+          return correct += 1;
         } else {
-          _this.piece_incorrect(qpiece);
+          return _this.piece_incorrect(qpiece);
         }
-        return all += 1;
       });
       return this.show_score([correct, all]);
     };