diff --git a/BUGS.md b/BUGS.md index ce818f8..52d821e 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,6 +1,8 @@ # BUGS +- esta a permitir 2 logins em simultaneo do mesmo user. fica tudo baralhado... +- shift-enter não está a funcionar - falha intermitent no file handler quando o browser envia 2 GET requests ao mesmo tempo (porquê?) - nos topicos learn.yaml, qd falha acrescenta no fim. nao faz sentido. - ocorreu uma vez o sqlalchemy dar mesg erro a indicar que as threads sao diferents quando se faz o get da primeira pergunta do topico. Muitas vezes nao mostar erro, mas a pagina da erro ou fica em branco... diff --git a/static/MDB b/static/MDB new file mode 120000 index 0000000..671f269 --- /dev/null +++ b/static/MDB @@ -0,0 +1 @@ +libs/MDB-Free_4/ \ No newline at end of file diff --git a/static/js/topic.js b/static/js/topic.js index 810471c..6a97ba8 100644 --- a/static/js/topic.js +++ b/static/js/topic.js @@ -24,6 +24,9 @@ function updateQuestion(response) { var method = response["method"]; var params = response["params"]; + $('#right').hide(); + $('#wrong').hide(); + switch (method) { case "new_question": new_question(params["type"], params["question"], params["tries"], params["progress"]); @@ -58,13 +61,15 @@ function new_question(type, question, tries, progress) { $('#question_div').animateCSS('bounceInDown'); - // enable shift+enter to submit - $("input:text, input:radio, input:checkbox").keydown(function (e) { - if (e.keyCode == 13) { - e.preventDefault(); - if (e.shiftKey) postQuestion(); - return false; - }}); + // enable shift+enter to submit + // $("input:text, input:radio, input:checkbox").keydown(function (e) { + // if (e.keyCode == 13) { + // e.preventDefault(); + // if (e.shiftKey) { + // $("#submit").click(); + // } + // return false; + // }}); } // =========================================================================== @@ -96,10 +101,11 @@ function getFeedback(response) { switch (method) { case "right": + $('#right').show(); + $('#wrong').hide(); $('#comments').html(params['comments']); MathJax.Hub.Queue(["Typeset", MathJax.Hub, "#comments"]); $("#submit").html("Continuar"); - // $("#submit").toggleClass("btn-info btn-primary"); $("#submit").off(); $("#submit").click(getQuestion); break; @@ -113,13 +119,16 @@ function getFeedback(response) { break; case "wrong": - $('#question_div').animateCSS('shake'); + $('#right').hide(); + $('#wrong').show(); + // $('#question_div').animateCSS('shake'); $('#topic_progress').css('width', (100*params["progress"])+'%').attr('aria-valuenow', 100*params["progress"]); $("#tries").html(params["tries"]); $('#comments').html(params['comments']); MathJax.Hub.Queue(["Typeset", MathJax.Hub, "#comments"]); $('#solution').html(params['solution']); MathJax.Hub.Queue(["Typeset", MathJax.Hub, "#solution"]); + $('#solution').animateCSS('flipInX'); $("fieldset").attr("disabled", "disabled"); $("#submit").html("Continuar"); $("#submit").off(); diff --git a/templates/comments-right.html b/templates/comments-right.html index b96c61a..229bfb1 100644 --- a/templates/comments-right.html +++ b/templates/comments-right.html @@ -1,9 +1,7 @@ {% autoescape %} +{% if comments %}
- Certo! - {% if comments %} -
- {{ md(comments) }} - {% end %} + {{ md(comments) }}
+{% end %} diff --git a/templates/comments.html b/templates/comments.html index c8279bf..efa92e2 100644 --- a/templates/comments.html +++ b/templates/comments.html @@ -1,7 +1,7 @@ {% autoescape %} {% if comments %} -
- {{ md(comments) }} +
+ {{ md(comments) }}
{% end %} diff --git a/templates/login.html b/templates/login.html index 7d0ddf4..5b98b84 100644 --- a/templates/login.html +++ b/templates/login.html @@ -16,6 +16,9 @@ + + + @@ -24,23 +27,31 @@
-
+
-
-

Identificação:

- +
diff --git a/templates/maintopics-table.html b/templates/maintopics-table.html index 9e1f54a..8a4630e 100644 --- a/templates/maintopics-table.html +++ b/templates/maintopics-table.html @@ -21,6 +21,9 @@ + + + @@ -60,8 +63,7 @@ Tópico - - Exercícios + Nível @@ -79,11 +81,6 @@
{% end %} - - - @@ -100,22 +97,13 @@ {{ t['name'] }} {% end %} - - - {% if t['level'] < 0.01 %} - - - + {% elif t['type']=='chapter' %}
- -
{% else %}
diff --git a/templates/question-checkbox.html b/templates/question-checkbox.html index 1851958..0be69f3 100644 --- a/templates/question-checkbox.html +++ b/templates/question-checkbox.html @@ -3,20 +3,17 @@ {% block answer %}
- +
+ {% for n,opt in enumerate(question['options']) %} + +
+ + +
+
+ {% end %} +
+ {% end %} \ No newline at end of file diff --git a/templates/question-radio.html b/templates/question-radio.html index b50d834..3a8e0c3 100644 --- a/templates/question-radio.html +++ b/templates/question-radio.html @@ -3,20 +3,17 @@ {% block answer %}
-
- {% for n,opt in enumerate(question['options']) %} - -
-
- -
-
- -
-
-
- {% end %} -
+
+ {% for n,opt in enumerate(question['options']) %} + +
+ + +
+
+ {% end %} +
+ {% end %} \ No newline at end of file diff --git a/templates/question-text.html b/templates/question-text.html index 82af314..0c71825 100644 --- a/templates/question-text.html +++ b/templates/question-text.html @@ -2,11 +2,11 @@ {% block answer %}
- {% if question['answer'] %} - - {% else %} - - {% end %} + {% if question['answer'] %} + + {% else %} + + {% end %}

{% end %} diff --git a/templates/topic.html b/templates/topic.html index 7409621..c24fe74 100644 --- a/templates/topic.html +++ b/templates/topic.html @@ -1,94 +1,119 @@ - iLearn - + iLearn + - - - + + + - - + + - - - - - + + + + + - - - - - + + + + + + + + + + - -
-
+
+
-
+
-
-
- {% module xsrf_form_html() %} -
-
+ +
+
+
+
+ {% module xsrf_form_html() %} +
+
-
-
+
+
-
-
+
-
-
- -
-
+
+
+ + + + +
+
+ +
-- libgit2 0.21.2