else
$(".false", qp).click()
+ get_answer: (question) ->
+ answer = []
+ $(".question-piece", @element).each (i, qpiece) =>
+ answer.push($(qpiece).data('value') || '-')
+ return answer
##########
return _results;
};
+ PrawdaFalsz.prototype.get_answer = function(question) {
+ var answer,
+ _this = this;
+ answer = [];
+ $(".question-piece", this.element).each(function(i, qpiece) {
+ return answer.push($(qpiece).data('value') || '-');
+ });
+ return answer;
+ };
+
return PrawdaFalsz;
})(Exercise);
--- /dev/null
+<div class="exercise prawdafalsz" data-type="prawdafalsz">
+
+ <h3>Zadanie {{no}}</h3>
+
+ <div class="question" data-no="1">
+ <div class="description">
+ {% for para in exercise.description %}
+ <p class="paragraph">
+ {{para}}
+ </p>
+ {% endfor %}
+ </div>
+
+ <ul class="lista punkt ">
+ {% for statement in exercise.statements %}
+ <li class="question-piece">
+ <span class="buttons">
+ <a href="#" data-value="true" class="true">Prawda</a>
+ <a href="#" data-value="false" class="false">Fałsz</a>
+ </span>
+ {{statement.0}}
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+</div>
\ No newline at end of file