Commit 92d262e82ab0dfab2e70a60204b569f39c3c4be8
1 parent
353a8d29
Exists in
master
and in
1 other branch
- abort with error message if directory "logs" does not exist in the
current directory.
Showing
5 changed files
with
14 additions
and
12 deletions
Show diff stats
BUGS.md
1 | 1 | |
2 | 2 | # BUGS |
3 | 3 | |
4 | -- se directorio logs não existir no directorio actual (não perguntations) rebenta. | |
4 | +- servidor nao esta a lidar com eventos scroll/resize. ignorar? | |
5 | +- testar SSL | |
5 | 6 | |
6 | 7 | # TODO |
7 | 8 | |
8 | -- SSL | |
9 | +- permitir varios testes, aluno escolhe qual o teste que quer fazer. | |
9 | 10 | - usar thread.Lock para aceder a variaveis de estado? |
10 | -- servidor nao esta a lidar com eventos scroll/resize | |
11 | 11 | - se ocorrer um erro na correcçao avisar aluno para contactar o professor. |
12 | -- implementar practice mode. | |
13 | -- usar http://wtfforms.com para radio e checkboxes | |
14 | -- abrir o teste numa janela maximizada e que nao permite que o aluno a redimensione/mova. | |
12 | +- implementar practice mode? | |
13 | +- abrir o teste numa janela maximizada e que nao permite que o aluno a redimensione/mova? | |
15 | 14 | - detectar scroll e enviar posição para servidor (analise de scroll para detectar copianço? ou simplesmente para analisar como os alunos percorrem o teste) |
16 | 15 | - single page web no teste/correcçao. Página construída em javascript, obter perguntas com ajax (para practice?). |
17 | 16 | - aviso na pagina principal para quem usa browser da treta |
18 | -- permitir varios testes, aluno escolhe qual o teste que quer fazer. | |
19 | 17 | - criar perguntas de outros tipos, e.g. associação, ordenação, varios textinput |
20 | 18 | - perguntas para professor corrigir mais tarde. |
21 | 19 | - fazer uma calculadora javascript e por no menu. surge como modal |
22 | 20 | - GeoIP? |
23 | -- alunos online têm acesso a /correct e servidor rebenta. (não é fácil impedir...) | |
24 | 21 | - enviar logs para web? |
25 | 22 | |
26 | 23 | # FIXED |
27 | 24 | |
25 | +- se directorio "logs" não existir no directorio actual aborta com mensagem de erro. | |
28 | 26 | - se um teste tiver a mesma pergunta repetida (ref igual), rebenta na correcçao. As respostas são agregadas numa lista para cada ref. Ex: {'ref1': 'resposta1', 'ref2': ['resposta2a', 'resposta2b']} |
29 | 27 | - usar http://fontawesome.io/examples/ em vez dos do bootstrap3 |
30 | 28 | - se pergunta tiver 'type:' errado, rebenta. | ... | ... |
config/server.conf
serve.py
... | ... | @@ -310,14 +310,19 @@ if __name__ == '__main__': |
310 | 310 | filename = path.abspath(path.expanduser(arg.testfile[0])) |
311 | 311 | |
312 | 312 | # --- Setup logging |
313 | - logging.config.dictConfig(load_yaml(LOGGER_CONF)) | |
313 | + try: | |
314 | + logging.config.dictConfig(load_yaml(LOGGER_CONF)) | |
315 | + except: | |
316 | + print('An error ocurred while setting up the logging system.') | |
317 | + print('Common causes:\n - inexistent directory "logs"?\n - write permission to "logs" directory?') | |
318 | + sys.exit(1) | |
314 | 319 | |
315 | 320 | # --- start application |
316 | 321 | from app import App |
317 | 322 | |
318 | 323 | try: |
319 | 324 | app = App(filename, vars(arg)) |
320 | - except Exception as e: | |
325 | + except: | |
321 | 326 | logging.critical('Can\'t start application.') |
322 | 327 | sys.exit(1) |
323 | 328 | |
... | ... | @@ -328,7 +333,6 @@ if __name__ == '__main__': |
328 | 333 | |
329 | 334 | # --- site wide configuration (valid for all apps) |
330 | 335 | cherrypy.tools.secureheaders = cherrypy.Tool('before_finalize', secureheaders, priority=60) |
331 | - | |
332 | 336 | cherrypy.config.update(arg.conf) # configuration file in /config |
333 | 337 | conf = { |
334 | 338 | '/': { | ... | ... |
static/bootstrap-3.3.7/.DS_Store
No preview for this file type
static/bootstrap-3.3.7/css/.DS_Store
No preview for this file type