From 458cd7d57cf2cd6394739c24ee551fa123a4d480 Mon Sep 17 00:00:00 2001 From: Miguel Barão Date: Sun, 5 Jul 2015 17:41:48 +0100 Subject: [PATCH] - minor changes --- BUGS.md | 3 +-- myauth.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/BUGS.md b/BUGS.md index adeb9d2..18e740b 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,13 +1,12 @@ # BUGS -- MathJax safe mode?? (vi referencia a isto no ipython3.2 whats new) +- fix ans directory. relative to what?? current dir? - alunos vêm nota final arredondada às decimas, mas é apenas um arredondamento visual. Pode acontecer o aluno chumbar, mas ver uma nota positiva (e.g. 9.46 mostra 9.5 e presume que esta aprovado). Mostrar 3 casas? - alunos podem entrar duas vezes em simultaneo. impedir, e permitir ao docente fazer kick-out - detectar se falta 'correct' nas perguntas. - check if script to generate questions exist before instantiation. - paths manipulation in strings is unix only ('/something'). use os.path to create paths. -- fix ans directory. relative to what?? current dir? - parece que é preciso criar à mão a pasta para as respostas (ans/...) depois apercebo-me que os caminhos no teste dizem respeito à directoria donde o teste é corrido... as respostas deveriam guardadas no directório dado. - testar regex na definicao das perguntas. como se faz rawstring em yaml? singlequote? problemas de backslash??? sim... necessário fazer \\ em varios casos, mas não é claro! e.g. \n é convertido em espaço mas \w é convertido em \\ e w. diff --git a/myauth.py b/myauth.py index 16cf5f9..5186ed3 100644 --- a/myauth.py +++ b/myauth.py @@ -27,11 +27,9 @@ def credentials_ok(uid, password, db): updated if it's initially empty. Returns the name of the student on success, otherwise returns None. ''' - # success = False - # tryhash = sha256(password.encode('utf-8')).hexdigest() - # search student in database with sqlite3.connect(db) as c: + # search student in database sql_cmd = 'SELECT name,password FROM students WHERE number=?' try: name, pwhash = c.execute(sql_cmd, [uid]).fetchone() -- libgit2 0.21.2