Commit 8c6a2bf8bc7101a50da6802ed4acc3bd1b565827
1 parent
1007e396
Exists in
master
and in
1 other branch
- show student ID in the test jumbotron, so that if saved to file will contain student id.
- add update.sh script with the main commands to update perguntations - other minor changes
Showing
8 changed files
with
35 additions
and
22 deletions
Show diff stats
BUGS.md
1 | 1 | ||
2 | # BUGS | 2 | # BUGS |
3 | 3 | ||
4 | -- cookies existe um perguntations_user e um user. De onde vem o user? | ||
5 | - nao esta a mostrar imagens?? internal server error? | 4 | - nao esta a mostrar imagens?? internal server error? |
6 | -- JOBE correct async | ||
7 | -- esta a corrigir código JOBE mesmo que nao tenha respondido??? | 5 | +- guardar testes em JSON assim que sao atribuidos aos alunos (ou guardados inicialmente com um certo nome, e atribuidos posteriormente ao aluno). |
6 | +- cookies existe um perguntations_user e um user. De onde vem o user? | ||
8 | - QuestionCode falta reportar nos comments os vários erros que podem ocorrer (timeout, etc) | 7 | - QuestionCode falta reportar nos comments os vários erros que podem ocorrer (timeout, etc) |
9 | - | ||
10 | - algumas vezes a base de dados guarda o mesmo teste em duplicado. ver se dois submits dao origem a duas correcções. | 8 | - algumas vezes a base de dados guarda o mesmo teste em duplicado. ver se dois submits dao origem a duas correcções. |
11 | 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) | 9 | 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) |
12 | - 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. | 10 | - 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 | @@ -19,11 +17,12 @@ talvez a base de dados devesse ter como chave do teste um id que fosse único de | ||
19 | - a revisao do teste não mostra as imagens. | 17 | - a revisao do teste não mostra as imagens. |
20 | - Test.reset_answers() unused. | 18 | - Test.reset_answers() unused. |
21 | - teste nao esta a mostrar imagens de vez em quando.??? | 19 | - teste nao esta a mostrar imagens de vez em quando.??? |
22 | -- testar as perguntas todas no início do teste como o aprendizations. | ||
23 | - show-ref nao esta a funcionar na correccao (pelo menos) | 20 | - show-ref nao esta a funcionar na correccao (pelo menos) |
24 | 21 | ||
25 | # TODO | 22 | # TODO |
26 | 23 | ||
24 | +- JOBE correct async | ||
25 | +- esta a corrigir código JOBE mesmo que nao tenha respondido??? | ||
27 | - permitir remover alunos que estão online para poderem comecar de novo. | 26 | - permitir remover alunos que estão online para poderem comecar de novo. |
28 | - 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) | 27 | - 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) |
29 | - stress tests. use https://locust.io | 28 | - stress tests. use https://locust.io |
@@ -74,6 +73,8 @@ ou usar push (websockets?) | @@ -74,6 +73,8 @@ ou usar push (websockets?) | ||
74 | 73 | ||
75 | # FIXED | 74 | # FIXED |
76 | 75 | ||
76 | +- testar as perguntas todas no início do teste como o aprendizations. | ||
77 | +- adicionar identificacao do aluno no jumbotron inicial do teste, para que ao imprimir para pdf a identificacao do aluno venha escrita no documento. | ||
77 | - internal server error quando em --review, download csv detalhado. | 78 | - internal server error quando em --review, download csv detalhado. |
78 | - perguntas repetidas (mesma ref) dao asneira, porque a referencia é usada como chave em varios sitios e as chaves nao podem ser dupplicadas. | 79 | - perguntas repetidas (mesma ref) dao asneira, porque a referencia é usada como chave em varios sitios e as chaves nao podem ser dupplicadas. |
79 | 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. | 80 | 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. |
perguntations/templates/question-checkbox.html
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <a class="list-group-item"> | 8 | <a class="list-group-item"> |
9 | <div class="d-flex flex-row"> | 9 | <div class="d-flex flex-row"> |
10 | <div class="p-2"> | 10 | <div class="p-2"> |
11 | - <input type="checkbox" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}"> | 11 | + <input type="checkbox" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}" autocomplete="off"> |
12 | </div> | 12 | </div> |
13 | <div class="p-2"> | 13 | <div class="p-2"> |
14 | <label for="{{i}}:{{n}}">{{ md(opt) }}</label> | 14 | <label for="{{i}}:{{n}}">{{ md(opt) }}</label> |
@@ -18,4 +18,4 @@ | @@ -18,4 +18,4 @@ | ||
18 | {% end %} | 18 | {% end %} |
19 | </div> | 19 | </div> |
20 | </fieldset> | 20 | </fieldset> |
21 | -{% end %} | ||
22 | \ No newline at end of file | 21 | \ No newline at end of file |
22 | +{% end %} |
perguntations/templates/question-radio.html
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <a class="list-group-item"> | 8 | <a class="list-group-item"> |
9 | <div class="d-flex flex-row"> | 9 | <div class="d-flex flex-row"> |
10 | <div class="p-2"> | 10 | <div class="p-2"> |
11 | - <input type="radio" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}"> | 11 | + <input type="radio" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}" autocomplete="off"> |
12 | </div> | 12 | </div> |
13 | <div class="p-2"> | 13 | <div class="p-2"> |
14 | <label for="{{i}}:{{n}}">{{ md(opt) }}</label> | 14 | <label for="{{i}}:{{n}}">{{ md(opt) }}</label> |
@@ -18,4 +18,4 @@ | @@ -18,4 +18,4 @@ | ||
18 | {% end %} | 18 | {% end %} |
19 | </div> | 19 | </div> |
20 | </fieldset> | 20 | </fieldset> |
21 | -{% end %} | ||
22 | \ No newline at end of file | 21 | \ No newline at end of file |
22 | +{% end %} |
perguntations/templates/question-text.html
@@ -2,6 +2,6 @@ | @@ -2,6 +2,6 @@ | ||
2 | 2 | ||
3 | {% block answer %} | 3 | {% block answer %} |
4 | <fieldset data-role="controlgroup"> | 4 | <fieldset data-role="controlgroup"> |
5 | - <input type="text" class="form-control" id="{{i}}" name="{{i}}" value=""> | 5 | + <input type="text" class="form-control" id="{{i}}" name="{{i}}" value="" autocomplete="off"> |
6 | </fieldset> | 6 | </fieldset> |
7 | {% end %} | 7 | {% end %} |
perguntations/templates/question-textarea.html
@@ -2,6 +2,6 @@ | @@ -2,6 +2,6 @@ | ||
2 | 2 | ||
3 | {% block answer %} | 3 | {% block answer %} |
4 | 4 | ||
5 | -<textarea class="form-control" name="{{i}}">{{q['answer'] or ''}}</textarea><br /> | 5 | +<textarea class="form-control" name="{{i}}" autocomplete="off">{{q['answer'] or ''}}</textarea><br /> |
6 | 6 | ||
7 | {% end %} | 7 | {% end %} |
perguntations/templates/test.html
@@ -88,11 +88,18 @@ | @@ -88,11 +88,18 @@ | ||
88 | <div class="container"> | 88 | <div class="container"> |
89 | 89 | ||
90 | <div class="jumbotron"> | 90 | <div class="jumbotron"> |
91 | - <h1 class="display-5">{{ t['title'] }}</h1> | ||
92 | - | 91 | + <h3 class="display-5">{{ t['title'] }}</h3> |
93 | <hr> | 92 | <hr> |
94 | 93 | ||
95 | - <h5> | 94 | + <div class="row"> |
95 | + <label for="nome" class="col-sm-3">Nome:</label> | ||
96 | + <div class="col-sm-9" id="nome">{{ escape(t['student']['name']) }}</div> | ||
97 | + </div> | ||
98 | + <div class="row"> | ||
99 | + <label for="numero" class="col-sm-3">Número:</label> | ||
100 | + <div class="col-sm-9" id="numero">{{ escape(t['student']['number']) }}</div> | ||
101 | + </div> | ||
102 | + | ||
96 | <div class="row"> | 103 | <div class="row"> |
97 | <label for="duracao" class="col-sm-3">Duração:</label> | 104 | <label for="duracao" class="col-sm-3">Duração:</label> |
98 | <div class="col-sm-9" id="duracao">{{ str(t['duration'])+' minutos' if t['duration'] > 0 else 'sem limite de tempo' }}</div> | 105 | <div class="col-sm-9" id="duracao">{{ str(t['duration'])+' minutos' if t['duration'] > 0 else 'sem limite de tempo' }}</div> |
@@ -101,10 +108,9 @@ | @@ -101,10 +108,9 @@ | ||
101 | <label for="submissao" class="col-sm-3">Submissão:</label> | 108 | <label for="submissao" class="col-sm-3">Submissão:</label> |
102 | <div class="col-sm-9" id="submissao">{{ 'automática no fim do tempo' if t['autosubmit'] else 'manual' }}</div> | 109 | <div class="col-sm-9" id="submissao">{{ 'automática no fim do tempo' if t['autosubmit'] else 'manual' }}</div> |
103 | </div> | 110 | </div> |
104 | - </h5> | ||
105 | </div> | 111 | </div> |
106 | 112 | ||
107 | - <form action="/" method="post" id="test" autocomplete="off"> | 113 | + <form action="/" method="post" id="test"> |
108 | {% module xsrf_form_html() %} | 114 | {% module xsrf_form_html() %} |
109 | 115 | ||
110 | {% for i, q in enumerate(t['questions']) %} | 116 | {% for i, q in enumerate(t['questions']) %} |
perguntations/testfactory.py
@@ -234,7 +234,7 @@ class TestFactory(dict): | @@ -234,7 +234,7 @@ class TestFactory(dict): | ||
234 | 234 | ||
235 | if question['type'] in ('code', 'textarea'): | 235 | if question['type'] in ('code', 'textarea'): |
236 | if 'tests_right' in question: | 236 | if 'tests_right' in question: |
237 | - for i, right_answer in enumerate(question['tests_right']): | 237 | + for tnum, right_answer in enumerate(question['tests_right']): |
238 | try: | 238 | try: |
239 | question.set_answer(right_answer) | 239 | question.set_answer(right_answer) |
240 | question.correct() | 240 | question.correct() |
@@ -243,11 +243,11 @@ class TestFactory(dict): | @@ -243,11 +243,11 @@ class TestFactory(dict): | ||
243 | raise TestFactoryException(msg) from exc | 243 | raise TestFactoryException(msg) from exc |
244 | 244 | ||
245 | if question['grade'] == 1.0: | 245 | if question['grade'] == 1.0: |
246 | - logger.info(' test %i Ok', i) | 246 | + logger.info(' test %i Ok', tnum) |
247 | else: | 247 | else: |
248 | - logger.error(' TEST %i IS WRONG!!!', i) | 248 | + logger.error(' TEST %i IS WRONG!!!', tnum) |
249 | elif 'tests_wrong' in question: | 249 | elif 'tests_wrong' in question: |
250 | - for i, wrong_answer in enumerate(question['tests_wrong']): | 250 | + for tnum, wrong_answer in enumerate(question['tests_wrong']): |
251 | try: | 251 | try: |
252 | question.set_answer(wrong_answer) | 252 | question.set_answer(wrong_answer) |
253 | question.correct() | 253 | question.correct() |
@@ -256,9 +256,9 @@ class TestFactory(dict): | @@ -256,9 +256,9 @@ class TestFactory(dict): | ||
256 | raise TestFactoryException(msg) from exc | 256 | raise TestFactoryException(msg) from exc |
257 | 257 | ||
258 | if question['grade'] < 1.0: | 258 | if question['grade'] < 1.0: |
259 | - logger.info(' test %i Ok', i) | 259 | + logger.info(' test %i Ok', tnum) |
260 | else: | 260 | else: |
261 | - logger.error(' TEST %i IS WRONG!!!', i) | 261 | + logger.error(' TEST %i IS WRONG!!!', tnum) |
262 | else: | 262 | else: |
263 | try: | 263 | try: |
264 | question.set_answer('') | 264 | question.set_answer('') |