Commit 458cd7d57cf2cd6394739c24ee551fa123a4d480
1 parent
2dc466cf
Exists in
master
and in
1 other branch
- minor changes
Showing
2 changed files
with
2 additions
and
5 deletions
Show diff stats
BUGS.md
1 | 1 | ||
2 | # BUGS | 2 | # BUGS |
3 | 3 | ||
4 | -- MathJax safe mode?? (vi referencia a isto no ipython3.2 whats new) | 4 | +- fix ans directory. relative to what?? current dir? |
5 | - 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? | 5 | - 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? |
6 | - alunos podem entrar duas vezes em simultaneo. impedir, e permitir ao docente fazer kick-out | 6 | - alunos podem entrar duas vezes em simultaneo. impedir, e permitir ao docente fazer kick-out |
7 | - detectar se falta 'correct' nas perguntas. | 7 | - detectar se falta 'correct' nas perguntas. |
8 | - check if script to generate questions exist before instantiation. | 8 | - check if script to generate questions exist before instantiation. |
9 | - paths manipulation in strings is unix only ('/something'). use os.path to create paths. | 9 | - paths manipulation in strings is unix only ('/something'). use os.path to create paths. |
10 | -- fix ans directory. relative to what?? current dir? | ||
11 | - 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. | 10 | - 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. |
12 | - 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. | 11 | - 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. |
13 | 12 |
myauth.py
@@ -27,11 +27,9 @@ def credentials_ok(uid, password, db): | @@ -27,11 +27,9 @@ def credentials_ok(uid, password, db): | ||
27 | updated if it's initially empty. | 27 | updated if it's initially empty. |
28 | Returns the name of the student on success, otherwise returns None. | 28 | Returns the name of the student on success, otherwise returns None. |
29 | ''' | 29 | ''' |
30 | - # success = False | ||
31 | - # tryhash = sha256(password.encode('utf-8')).hexdigest() | ||
32 | 30 | ||
33 | - # search student in database | ||
34 | with sqlite3.connect(db) as c: | 31 | with sqlite3.connect(db) as c: |
32 | + # search student in database | ||
35 | sql_cmd = 'SELECT name,password FROM students WHERE number=?' | 33 | sql_cmd = 'SELECT name,password FROM students WHERE number=?' |
36 | try: | 34 | try: |
37 | name, pwhash = c.execute(sql_cmd, [uid]).fetchone() | 35 | name, pwhash = c.execute(sql_cmd, [uid]).fetchone() |