+ if (!minimum) {
+ all = $(".subjects .question-piece", question).length;
+ }
+ _ref = $(".predicate [data-predicate]", question);
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ pred = _ref[_i];
+ pn = $(pred).attr('data-predicate');
+ if (minimum != null) {
+ all += minimum;
+ }
+ _ref1 = $(".question-piece", pred);
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ qp = _ref1[_j];
+ v = this.get_value_optional_list(qp, 'solution');
+ mandatory = v[0];
+ optional = v[1];
+ if (mandatory.indexOf(pn) >= 0 || (minimum && optional.indexOf(pn) >= 0)) {
+ count += 1;
+ this.piece_correct(qp);
+ } else {
+ this.piece_incorrect(qp);
+ }
+ }
+ }
+ return [count, all];
+ };
+
+ Przyporzadkuj.prototype.solve_question = function(question) {
+ var $ph, $pr, draggables, m, mandatory, minimum, optional, qp, v, _i, _len, _ref, _results;
+ minimum = $(question).data("min");
+ _ref = $(".subject .question-piece", question);
+ _results = [];