From 88efac09a80df2f4b6a31740f9b3b77ecc7949e1 Mon Sep 17 00:00:00 2001 From: Miguel Barao Date: Wed, 11 Apr 2018 16:31:21 +0100 Subject: [PATCH] - fixed path of correct script in textarea questions --- BUGS.md | 2 ++ questions.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/BUGS.md b/BUGS.md index 41aa4e8..46a942a 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,6 +1,8 @@ # BUGS +- questions.py textarea has a abspath which does not make sense! why is it there? not working for perguntations, but seems to work for aprendizations +- erro na password com ./initdb.py --db debug.db -u 1 "Miguel Barao" --pw q - initdb está a inicializar com passwords iguais aos numeros. deveria ser vazio para alunos definirem. - servir imagens das perguntas não funciona. Necessario passar a ref da pergunta no link para poder ajustar o path no FileHandler. Tem o problema do teste em JSON não conter a imagem. - o eventloop está a bloquear. correção do teste é blocking. usar threadpoolexecutor? diff --git a/questions.py b/questions.py index 4bf44a2..5ac8d16 100644 --- a/questions.py +++ b/questions.py @@ -332,8 +332,8 @@ class QuestionTextArea(Question): 'correct': '' # trying to execute this will fail => grade 0.0 }) - # self['correct'] = path.join(self['path'], self['correct']) - self['correct'] = path.abspath(path.normpath(path.join(self['path'], self['correct']))) + self['correct'] = path.join(self['path'], self['correct']) + # self['correct'] = path.abspath(path.normpath(path.join(self['path'], self['correct']))) # abspath will prepend cwd, which is plain wrong... #------------------------------------------------------------------------ # can return negative values for wrong answers -- libgit2 0.21.2