diff --git a/BUGS.md b/BUGS.md index cc4fe1d..a9558a7 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,12 +1,10 @@ # BUGS -- cookies existe um perguntations_user e um user. De onde vem o user? - nao esta a mostrar imagens?? internal server error? -- JOBE correct async -- esta a corrigir código JOBE mesmo que nao tenha respondido??? +- guardar testes em JSON assim que sao atribuidos aos alunos (ou guardados inicialmente com um certo nome, e atribuidos posteriormente ao aluno). +- cookies existe um perguntations_user e um user. De onde vem o user? - QuestionCode falta reportar nos comments os vários erros que podem ocorrer (timeout, etc) - - algumas vezes a base de dados guarda o mesmo teste em duplicado. ver se dois submits dao origem a duas correcções. talvez a base de dados devesse ter como chave do teste um id que fosse único desse teste particular (não um auto counter, nem ref do teste) - em caso de timeout na submissão (e.g. JOBE ou script nao responde) a correcção não termina e o teste não é guardado. @@ -19,11 +17,12 @@ talvez a base de dados devesse ter como chave do teste um id que fosse único de - a revisao do teste não mostra as imagens. - Test.reset_answers() unused. - teste nao esta a mostrar imagens de vez em quando.??? -- testar as perguntas todas no início do teste como o aprendizations. - show-ref nao esta a funcionar na correccao (pelo menos) # TODO +- JOBE correct async +- esta a corrigir código JOBE mesmo que nao tenha respondido??? - permitir remover alunos que estão online para poderem comecar de novo. - guardar nota final grade truncado em zero e sem ser truncado (quando é necessário fazer correcções à mão às perguntas, é necessário o valor não truncado) - stress tests. use https://locust.io @@ -74,6 +73,8 @@ ou usar push (websockets?) # FIXED +- testar as perguntas todas no início do teste como o aprendizations. +- adicionar identificacao do aluno no jumbotron inicial do teste, para que ao imprimir para pdf a identificacao do aluno venha escrita no documento. - internal server error quando em --review, download csv detalhado. - perguntas repetidas (mesma ref) dao asneira, porque a referencia é usada como chave em varios sitios e as chaves nao podem ser dupplicadas. da asneira pelo menos na funcao get_questions_csv. na base de dados tem de estar registado tb o numero da pergunta, caso contrario é impossível saber a qual corresponde. diff --git a/perguntations/templates/question-checkbox.html b/perguntations/templates/question-checkbox.html index 7c2ee25..e1cfd1a 100644 --- a/perguntations/templates/question-checkbox.html +++ b/perguntations/templates/question-checkbox.html @@ -8,7 +8,7 @@
- +
@@ -18,4 +18,4 @@ {% end %}
-{% end %} \ No newline at end of file +{% end %} diff --git a/perguntations/templates/question-radio.html b/perguntations/templates/question-radio.html index e57eb89..f68ba7a 100644 --- a/perguntations/templates/question-radio.html +++ b/perguntations/templates/question-radio.html @@ -8,7 +8,7 @@
- +
@@ -18,4 +18,4 @@ {% end %}
-{% end %} \ No newline at end of file +{% end %} diff --git a/perguntations/templates/question-text.html b/perguntations/templates/question-text.html index dfbb295..535e2f9 100644 --- a/perguntations/templates/question-text.html +++ b/perguntations/templates/question-text.html @@ -2,6 +2,6 @@ {% block answer %}
- +
{% end %} diff --git a/perguntations/templates/question-textarea.html b/perguntations/templates/question-textarea.html index 1216286..d6afa28 100644 --- a/perguntations/templates/question-textarea.html +++ b/perguntations/templates/question-textarea.html @@ -2,6 +2,6 @@ {% block answer %} -
+
{% end %} diff --git a/perguntations/templates/test.html b/perguntations/templates/test.html index 6a02285..6dbb116 100644 --- a/perguntations/templates/test.html +++ b/perguntations/templates/test.html @@ -88,11 +88,18 @@
-

{{ t['title'] }}

- +

{{ t['title'] }}


-
+
+ +
{{ escape(t['student']['name']) }}
+
+
+ +
{{ escape(t['student']['number']) }}
+
+
{{ str(t['duration'])+' minutos' if t['duration'] > 0 else 'sem limite de tempo' }}
@@ -101,10 +108,9 @@
{{ 'automática no fim do tempo' if t['autosubmit'] else 'manual' }}
-
-
+ {% module xsrf_form_html() %} {% for i, q in enumerate(t['questions']) %} diff --git a/perguntations/testfactory.py b/perguntations/testfactory.py index ad92d28..79ef45b 100644 --- a/perguntations/testfactory.py +++ b/perguntations/testfactory.py @@ -234,7 +234,7 @@ class TestFactory(dict): if question['type'] in ('code', 'textarea'): if 'tests_right' in question: - for i, right_answer in enumerate(question['tests_right']): + for tnum, right_answer in enumerate(question['tests_right']): try: question.set_answer(right_answer) question.correct() @@ -243,11 +243,11 @@ class TestFactory(dict): raise TestFactoryException(msg) from exc if question['grade'] == 1.0: - logger.info(' test %i Ok', i) + logger.info(' test %i Ok', tnum) else: - logger.error(' TEST %i IS WRONG!!!', i) + logger.error(' TEST %i IS WRONG!!!', tnum) elif 'tests_wrong' in question: - for i, wrong_answer in enumerate(question['tests_wrong']): + for tnum, wrong_answer in enumerate(question['tests_wrong']): try: question.set_answer(wrong_answer) question.correct() @@ -256,9 +256,9 @@ class TestFactory(dict): raise TestFactoryException(msg) from exc if question['grade'] < 1.0: - logger.info(' test %i Ok', i) + logger.info(' test %i Ok', tnum) else: - logger.error(' TEST %i IS WRONG!!!', i) + logger.error(' TEST %i IS WRONG!!!', tnum) else: try: question.set_answer('') diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..daf771c --- /dev/null +++ b/update.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +git pull +npm update +pip install -U . + -- libgit2 0.21.2