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,6 +283,7 @@ class QuestionHandler(BaseHandler): | ||
| 283 | logger.debug('[QuestionHandler.post]') | 283 | logger.debug('[QuestionHandler.post]') |
| 284 | user = self.current_user | 284 | user = self.current_user |
| 285 | answer = self.get_body_arguments('answer') # list | 285 | answer = self.get_body_arguments('answer') # list |
| 286 | + logger.debug(f'user = {user}, answer = {answer}') | ||
| 286 | 287 | ||
| 287 | # --- check if browser opened different questions simultaneously | 288 | # --- check if browser opened different questions simultaneously |
| 288 | answer_qid = self.get_body_arguments('qid')[0] | 289 | answer_qid = self.get_body_arguments('qid')[0] |
| @@ -309,6 +310,8 @@ class QuestionHandler(BaseHandler): | @@ -309,6 +310,8 @@ class QuestionHandler(BaseHandler): | ||
| 309 | ans = None | 310 | ans = None |
| 310 | elif qtype != 'checkbox': # radio, text, textarea, ... | 311 | elif qtype != 'checkbox': # radio, text, textarea, ... |
| 311 | ans = answer[0] | 312 | ans = answer[0] |
| 313 | + else: | ||
| 314 | + ans = answer | ||
| 312 | 315 | ||
| 313 | # --- check answer (nonblocking) and get corrected question and action | 316 | # --- check answer (nonblocking) and get corrected question and action |
| 314 | q, action = await self.learn.check_answer(user, ans) | 317 | q, action = await self.learn.check_answer(user, ans) |