-// 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,
$(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]);
};