From: Aleksander Łukasz Date: Thu, 31 Oct 2013 11:56:24 +0000 (+0100) Subject: true/false exercise X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/a40e38cd047b18aa34893647322781f07cb8386f?ds=inline;hp=287810169b6e8dd5bee6d6f6704e8d7e3e8097c4 true/false exercise --- diff --git a/wtem/static/wtem/edumed.coffee b/wtem/static/wtem/edumed.coffee index d70ce8a..cb1920b 100644 --- a/wtem/static/wtem/edumed.coffee +++ b/wtem/static/wtem/edumed.coffee @@ -511,6 +511,11 @@ class PrawdaFalsz extends Exercise else $(".false", qp).click() + get_answer: (question) -> + answer = [] + $(".question-piece", @element).each (i, qpiece) => + answer.push($(qpiece).data('value') || '-') + return answer ########## diff --git a/wtem/static/wtem/edumed.js b/wtem/static/wtem/edumed.js index 2a6ddb0..18ed499 100644 --- a/wtem/static/wtem/edumed.js +++ b/wtem/static/wtem/edumed.js @@ -682,6 +682,16 @@ 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); diff --git a/wtem/templates/wtem/exercises/edumed_prawdafalsz.html b/wtem/templates/wtem/exercises/edumed_prawdafalsz.html new file mode 100644 index 0000000..a55724a --- /dev/null +++ b/wtem/templates/wtem/exercises/edumed_prawdafalsz.html @@ -0,0 +1,26 @@ +
+ +

Zadanie {{no}}

+ +
+
+ {% for para in exercise.description %} +

+ {{para}} +

+ {% endfor %} +
+ +
    + {% for statement in exercise.statements %} +
  • + + Prawda + Fałsz + + {{statement.0}} +
  • + {% endfor %} +
+
+
\ No newline at end of file