diff --git a/BUGS.md b/BUGS.md index b533d69..556dfb1 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,9 +1,7 @@ # BUGS -- mostrar solucao na revisao de prova nas perguntas radio e checkbox. - impedir os eventos copy/paste. alunos usam isso para trazer codigo ja feito nos computadores. Obrigar a fazer reset? fazer um copy automaticamente? -- se aluno entrar com l12345 rebenta. numa funcao get_... ver imagem no ipad - a revisao do teste não mostra as imagens. - melhorar o botao de autorizar (desliga-se), usar antes um botao? e.g. retornar None quando nao ha alteracoes relativamente à última vez. @@ -64,6 +62,7 @@ ou usar push (websockets?) # FIXED +- se aluno entrar com l12345 rebenta. numa funcao get_... ver imagem no ipad - no test3 está contar 1.0 valores numa pergunta do tipo info? acontece para type: info, e não para type: information - default correct in checkbox must be 1.0, so that the pairs (right,wrong) still work with `correct` left undefined. - textarea com codemirror diff --git a/app.py b/app.py index 7c3de51..71da579 100644 --- a/app.py +++ b/app.py @@ -98,9 +98,6 @@ class App(object): # ----------------------------------------------------------------------- async def login(self, uid, try_pw): - if uid.startswith('l'): # remove prefix 'l' - uid = uid[1:] - if uid not in self.allowed and uid != '0': # not allowed logger.warning(f'Student {uid}: not allowed to login.') return False diff --git a/demo/test-tutorial.yaml b/demo/test-tutorial.yaml index 42f0851..f57bb01 100644 --- a/demo/test-tutorial.yaml +++ b/demo/test-tutorial.yaml @@ -20,6 +20,8 @@ answers_dir: demo/ans # (optional, default: False) Show points for each question, scale 0-20. show_points: True +# scale_points: True +# scale_max: 20 # (optional, default: False) Show hints if available show_hints: True @@ -27,6 +29,7 @@ show_hints: True # (optional, default: False) Show lots of information for debugging # debug: True + #----------------------------------------------------------------------------- # Base path applied to the questions files and all the scripts # including question generators and correctors. diff --git a/serve.py b/serve.py index 2d8edea..6e86bb0 100755 --- a/serve.py +++ b/serve.py @@ -89,7 +89,7 @@ class LoginHandler(BaseHandler): self.render('login.html', error='') async def post(self): - uid = self.get_body_argument('uid') + uid = self.get_body_argument('uid').lstrip('l') pw = self.get_body_argument('pw') login_ok = await self.testapp.login(uid, pw) @@ -240,6 +240,7 @@ class TestHandler(BaseHandler): @tornado.web.authenticated async def get(self): uid = self.current_user + print(uid) t = self.testapp.get_student_test(uid) # reload page returns same test if t is None: t = await self.testapp.generate_test(uid) -- libgit2 0.21.2