Commit a7f56a04ee8173534aea229eb5a0deaf67d041a7
1 parent
cd56848f
Exists in
master
and in
1 other branch
- review of an unexisting test returns http error code 404 not found.
- questions are numbered from 1, and not counting information panels.
Showing
5 changed files
with
12 additions
and
12 deletions
Show diff stats
BUGS.md
1 | 1 | |
2 | 2 | # BUGS |
3 | 3 | |
4 | -- markdown no teste nao funciona | |
5 | -- numeracao das perguntas do teste esta a contar com paineis informativos... | |
4 | +- qual a diferenca entre md_to_html e md_to_html_review, parece desnecessario haver dois. | |
6 | 5 | - servir imagens das perguntas |
7 | 6 | - como alterar configuracao para mostrar logs de debug? |
8 | 7 | - hints nao funciona |
9 | 8 | - uniformizar question.py com a de aprendizations... |
10 | -- Review de um teste que foi apagado rebenta. | |
11 | 9 | - permitir eliminar teste a decorrer de modo a que o aluno possa recomeçar (e.g. noutro browser) |
12 | 10 | - servidor nao esta a lidar com eventos scroll/resize. ignorar? |
13 | 11 | |
... | ... | @@ -19,11 +17,8 @@ |
19 | 17 | node_modules/mathjax-node-cli/bin/tex2svg '\sqrt{x}' |
20 | 18 | usar isto para gerar svg que passa a fazer parte do texto da pergunta (markdown suporta tags svg?) |
21 | 19 | |
22 | - | |
23 | - | |
24 | 20 | - Gerar pdf's com todos os testes no final (pdfkit). |
25 | 21 | - manter registo dos unfocus durante o teste e de qual a pergunta visivel nesse momento |
26 | - | |
27 | 22 | - permitir varios testes, aluno escolhe qual o teste que quer fazer. |
28 | 23 | - se ocorrer um erro na correcçao avisar aluno para contactar o professor. |
29 | 24 | - abrir o teste numa janela maximizada e que nao permite que o aluno a redimensione/mova? |
... | ... | @@ -38,6 +33,9 @@ |
38 | 33 | |
39 | 34 | # FIXED |
40 | 35 | |
36 | +- Review de um teste que foi apagado rebenta. | |
37 | +- numeracao das perguntas do teste esta a contar com paineis informativos... | |
38 | +- markdown no teste nao funciona | |
41 | 39 | - review de um teste nao funciona (hardcoded...) |
42 | 40 | - testar SSL |
43 | 41 | - text-numeric não está a gerar a pergunta. faltam templates? | ... | ... |
serve.py
... | ... | @@ -186,9 +186,11 @@ class ReviewHandler(BaseHandler): |
186 | 186 | self.redirect('/') # FIXME 404 not found? |
187 | 187 | |
188 | 188 | test_id = self.get_query_argument('test_id', None) |
189 | - # FIXME if test_id does not exist... | |
189 | + try: | |
190 | + fname = self.testapp.get_json_filename_of_test(test_id) | |
191 | + except: | |
192 | + raise tornado.web.HTTPError(404, 'Test ID not found.') | |
190 | 193 | |
191 | - fname = self.testapp.get_json_filename_of_test(test_id) | |
192 | 194 | try: |
193 | 195 | f = open(path.expanduser(fname)) |
194 | 196 | except FileNotFoundError: # FIXME EnvironmentError? | ... | ... |
templates/question.html
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | {% block question %} |
4 | 4 | <div class="card border-dark mb-3"> |
5 | 5 | <h5 class="card-header text-white bg-dark"> |
6 | - {{ i+1 }}. {{ q['title'] }} | |
6 | + {{ q['number'] }}. {{ q['title'] }} | |
7 | 7 | <div class="pull-right"> |
8 | 8 | <small>Classificar </small> |
9 | 9 | <input type="checkbox" class="question_disabler" data-size="mini" name="answered-{{i}}" id="answered-{{i}}" checked=""> | ... | ... |
templates/review-question-checkbox.html
templates/review-question.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <div class="card border-dark mb-3"> |
5 | 5 | |
6 | 6 | <h5 class="card-header text-white bg-dark"> |
7 | - {{ i+1 }}. {{ q['title'] }} | |
7 | + {{ q['number'] }}. {{ q['title'] }} | |
8 | 8 | <div class="pull-right"> |
9 | 9 | <small>Classificar </small> |
10 | 10 | {% if q['answer'] is not None %} |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | |
18 | 18 | <div class="card-body"> |
19 | 19 | <p id="text"> |
20 | - {{ q['text'] }} | |
20 | + {{ md(q['text'], q) }} | |
21 | 21 | </p> |
22 | 22 | |
23 | 23 | {% block answer %}{% end %} | ... | ... |