Commit 2a25e542058362e7222f4036e4227394bd3ef384
1 parent
8a91c25b
Exists in
master
and in
1 other branch
fix regression introduced in the last 2 versions 2019.07.dev1 and dev2
which affects checkbox questions.
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
aprendizations/serve.py
| ... | ... | @@ -283,6 +283,7 @@ class QuestionHandler(BaseHandler): |
| 283 | 283 | logger.debug('[QuestionHandler.post]') |
| 284 | 284 | user = self.current_user |
| 285 | 285 | answer = self.get_body_arguments('answer') # list |
| 286 | + logger.debug(f'user = {user}, answer = {answer}') | |
| 286 | 287 | |
| 287 | 288 | # --- check if browser opened different questions simultaneously |
| 288 | 289 | answer_qid = self.get_body_arguments('qid')[0] |
| ... | ... | @@ -309,6 +310,8 @@ class QuestionHandler(BaseHandler): |
| 309 | 310 | ans = None |
| 310 | 311 | elif qtype != 'checkbox': # radio, text, textarea, ... |
| 311 | 312 | ans = answer[0] |
| 313 | + else: | |
| 314 | + ans = answer | |
| 312 | 315 | |
| 313 | 316 | # --- check answer (nonblocking) and get corrected question and action |
| 314 | 317 | q, action = await self.learn.check_answer(user, ans) | ... | ... |