Skip to content

fix issues in oral quizzing and sentence quizzing

Fixes: #355 & #328

This MR will solve the following issues in oral quizzing:

  • word to be pronounced not displayed

The question in Oral quizzing was not displayed and there were errors in console because the quiz-oral.html file was missing a few id attributes: quiz-oral-area, quiz-oral-done and quiz-oral-result-show. Once these id attributes were added, the quiz started working again!

  • color indicating the correctness of user pronunciation not removed for the next question

After the user pronounces the word and clicks the Done button followed by the Next button, the next question is displayed. However, the background color of the textarea indicating the correctness of his previous response still persisted. This was fixed by: document.getElementById('messageUserSpeechID').style.background = 'none';

  • translation for next question shown automatically when show translation clicked for previous question

If a user doesn't know the word to pronounce in their target language, they press the Show Translation button which displays the word to be pronounced in target language. However, having done this on one question, the target language translations are automatically shown in all following questions. This is not good in the learning aspect as we expect the user to use the Show Translation button only when he doesn't know the word himself. So, showTranslation=false was used to hide translations for following questions. The Show Translation button was also disabled once the user presses Done button.

  • pressing done button multiple times yields multiple anki and next buttons

This was fixed by disabling the Done button after it was clicked once.

  • confusing message for anki feedback

The original message for Anki feedback Please select the difficulty level of the quiz: might be mis-interpreted by some users. They could think that we are asking what difficulty of the quiz they want next. So it was replaced with the more clearer message: How difficult was this quiz? .

  • textarea was made readonly so that users don't copy paste target language translation into textarea to get correct answer.

Issues solved in sentence quizzing:

  • keep Done button disabled even when new answer options are selected, preventing user pressing the Done button multiple times yielding multiple anki and next buttons (#328)

doneButtonCtrl was used to keep the Done button disabled after it is clicked once.

  • confusing message for anki feedback

Same reason as mentioned above.

Video portraying changes:

Untitled__Feb_10_2020_9_16_PM

Edit 1:

Video portraying working of Clear button in Oral Quiz:

Untitled__Feb_13__2020_12_07_AM

Edit 2:

The latest commit enables Sentence Quiz and Oral Quiz to display a proper error message when a translation pattern has not been created.

Oral Quiz when there is no translation pattern: Screenshot_from_2020-02-16_14-49-23

Sentence Quiz when there is no translation pattern: Screenshot_from_2020-02-16_14-49-27

Edited by Chidambaranathan Anirudh

Merge request reports