Commit 585e31fa36f1cc7777a171632dc4f7e40868f8c6
1 parent
c8e2e8e6
Exists in
master
and in
1 other branch
- fixed internal error when student uses prefix 'l' in the number
Showing
4 changed files
with
6 additions
and
6 deletions
Show diff stats
BUGS.md
| 1 | 1 | |
| 2 | 2 | # BUGS |
| 3 | 3 | |
| 4 | -- mostrar solucao na revisao de prova nas perguntas radio e checkbox. | |
| 5 | 4 | - impedir os eventos copy/paste. alunos usam isso para trazer codigo ja feito nos computadores. Obrigar a fazer reset? fazer um copy automaticamente? |
| 6 | -- se aluno entrar com l12345 rebenta. numa funcao get_... ver imagem no ipad | |
| 7 | 5 | - a revisao do teste não mostra as imagens. |
| 8 | 6 | - melhorar o botao de autorizar (desliga-se), usar antes um botao? |
| 9 | 7 | e.g. retornar None quando nao ha alteracoes relativamente à última vez. |
| ... | ... | @@ -64,6 +62,7 @@ ou usar push (websockets?) |
| 64 | 62 | |
| 65 | 63 | # FIXED |
| 66 | 64 | |
| 65 | +- se aluno entrar com l12345 rebenta. numa funcao get_... ver imagem no ipad | |
| 67 | 66 | - no test3 está contar 1.0 valores numa pergunta do tipo info? acontece para type: info, e não para type: information |
| 68 | 67 | - default correct in checkbox must be 1.0, so that the pairs (right,wrong) still work with `correct` left undefined. |
| 69 | 68 | - textarea com codemirror | ... | ... |
app.py
| ... | ... | @@ -98,9 +98,6 @@ class App(object): |
| 98 | 98 | |
| 99 | 99 | # ----------------------------------------------------------------------- |
| 100 | 100 | async def login(self, uid, try_pw): |
| 101 | - if uid.startswith('l'): # remove prefix 'l' | |
| 102 | - uid = uid[1:] | |
| 103 | - | |
| 104 | 101 | if uid not in self.allowed and uid != '0': # not allowed |
| 105 | 102 | logger.warning(f'Student {uid}: not allowed to login.') |
| 106 | 103 | return False | ... | ... |
demo/test-tutorial.yaml
| ... | ... | @@ -20,6 +20,8 @@ answers_dir: demo/ans |
| 20 | 20 | |
| 21 | 21 | # (optional, default: False) Show points for each question, scale 0-20. |
| 22 | 22 | show_points: True |
| 23 | +# scale_points: True | |
| 24 | +# scale_max: 20 | |
| 23 | 25 | |
| 24 | 26 | # (optional, default: False) Show hints if available |
| 25 | 27 | show_hints: True |
| ... | ... | @@ -27,6 +29,7 @@ show_hints: True |
| 27 | 29 | # (optional, default: False) Show lots of information for debugging |
| 28 | 30 | # debug: True |
| 29 | 31 | |
| 32 | + | |
| 30 | 33 | #----------------------------------------------------------------------------- |
| 31 | 34 | # Base path applied to the questions files and all the scripts |
| 32 | 35 | # including question generators and correctors. | ... | ... |
serve.py
| ... | ... | @@ -89,7 +89,7 @@ class LoginHandler(BaseHandler): |
| 89 | 89 | self.render('login.html', error='') |
| 90 | 90 | |
| 91 | 91 | async def post(self): |
| 92 | - uid = self.get_body_argument('uid') | |
| 92 | + uid = self.get_body_argument('uid').lstrip('l') | |
| 93 | 93 | pw = self.get_body_argument('pw') |
| 94 | 94 | login_ok = await self.testapp.login(uid, pw) |
| 95 | 95 | |
| ... | ... | @@ -240,6 +240,7 @@ class TestHandler(BaseHandler): |
| 240 | 240 | @tornado.web.authenticated |
| 241 | 241 | async def get(self): |
| 242 | 242 | uid = self.current_user |
| 243 | + print(uid) | |
| 243 | 244 | t = self.testapp.get_student_test(uid) # reload page returns same test |
| 244 | 245 | if t is None: |
| 245 | 246 | t = await self.testapp.generate_test(uid) | ... | ... |