From: Aleksander Łukasz Date: Thu, 31 Oct 2013 10:57:03 +0000 (+0100) Subject: wip: file upload exercise X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/dd0b1138bec01e917fb3105be5ba41325370aa41 wip: file upload exercise --- diff --git a/wtem/static/wtem/wtem.js b/wtem/static/wtem/wtem.js index f87ad42..f7dccdc 100644 --- a/wtem/static/wtem/wtem.js +++ b/wtem/static/wtem/wtem.js @@ -1,6 +1,7 @@ $(function() { - $('#submit_answers').click(function() { + $('#submit_answers').click(function(e) { + e.preventDefault(); var to_submit = []; $('.exercise').each(function() { var exercise = $(this).data('exercise'); diff --git a/wtem/templates/wtem/exercises/file_upload.html b/wtem/templates/wtem/exercises/file_upload.html new file mode 100644 index 0000000..44b78e6 --- /dev/null +++ b/wtem/templates/wtem/exercises/file_upload.html @@ -0,0 +1,15 @@ +
+ +

Zadanie {{no}}

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

+ {{para}} +

+ {% endfor %} +
+ + + +
\ No newline at end of file diff --git a/wtem/templates/wtem/main.html b/wtem/templates/wtem/main.html index ccb6023..e7ce29a 100644 --- a/wtem/templates/wtem/main.html +++ b/wtem/templates/wtem/main.html @@ -9,6 +9,8 @@ {% block body %} +
+ {% for exercise in exercises %} {% with 'wtem/exercises/'|add:exercise.type|add:'.html' as template_name %} {% include template_name with exercise=exercise no=forloop.counter %} @@ -19,4 +21,6 @@
+
+ {% endblock %} \ No newline at end of file