Quiz is configured to show quiz feedback after quiz. Quiz feedback is configured and has content. No quiz feedback is shown after the quiz is finished.
Install and configure 6.0.0-alpha7 to display quiz feedback after quiz.
Inspecting the content.summary variable in the quiz-result.html.twig template shows nothing renderable, but I'm not even sure that that is what we're looking for. No feedback variable at all is being passed to the template.
There are so many issues relating to feedback in the issue queue that I can't tell whether any of them are related, this is apparently a weak spot for this module.
I'm testing as user 1, so permissions should not be affecting this issue for me.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | Screenshot_20220711_125501.png | 18.69 KB | djdevin |
| #18 | Screenshot_2022-07-11_09-50-29.png | 9.36 KB | stephenplatz |
| #10 | Peek 2022-07-07 16-26.mp4 | 1.55 MB | djdevin |
| #10 | Screenshot_20220707_161001.png | 33.9 KB | djdevin |
Comments
Comment #2
stephenplatz commentedComment #3
stephenplatz commentedComment #4
djdevinActually as user 1 you are considered a quiz scorer so you may see different feedback, but it's not the default.
On /admin/quiz/config/quiz if "Override administrator review options" is set then those will be shown instead of the ones configured on the quiz.
If that isn't the case, please provide more detailed steps to reproduce (how the quiz was configured, where you configured the feedback).
I just tested this and could not reproduce. The automated feedback tests are currently passing (QuizFeedbackTest).
Comment #5
stephenplatz commentedI do not have the "Override administrator review options" set on /admin/quiz/config/quiz. I'm configuring the feedback on the Quiz feedback tab on quiz/1/edit. On the Question feedback tab, I currently have every option checked under After the quiz. I'm happy to provide more info, but I'm not sure what other configuration options would be relevant here.
Comment #6
stephenplatz commentedI don't think QuizFeedbackTest tests quiz feedback, it looks like it only tests question feedback.
Comment #7
djdevinAh, it's QuizResultTest::testPassRateSummary
That seems to be passing as it's showing the Quiz feedback (pass/fail text) at the end of the quiz, so I'm not quite sure what the issue is.
Comment #8
stephenplatz commentedWe want to show the result options, not the pass/fail options. I wonder if there is something I step through during runtime to get a better picture of what's happening, I think the tests are a little inconclusive in this case.
Comment #9
djdevinQuizResultTest::testPassRateSummary tests both the generic pass/fail text and the result options (grade range feedback).
Comment #10
djdevinTry a clean install of D9 and see if you can reproduce the issue there, here is what it should look like
I attached a video of what the setup looks like in a clean D9.
Comment #11
stephenplatz commentedThanks for the video, that definitely helps to confirm that my configuration is correct. I'm afraid that testing this on a fresh Drupal installation won't help to uncover what's happening in this case, where the module is living in a complex application together with other modules, which is of course a normal use for it. The site where this is failing is a multi-lingual site, and although I'm not seeing anything logged with regard to the quiz results or feedback, I am able to throw an error here /admin/quiz/reports/results
Drupal\Core\Entity\Sql\SqlContentEntityStorageException: Table information not available for the 'langcode' field. in Drupal\Core\Entity\Sql\DefaultTableMapping->getFieldTableName() (line 391 of /app/web/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php).I don't think this is related, but I started to think that there may be something else that is conflicting with showing the feedback. The important thing for me to really look at is where the possible places could be that would prevent the feedback from being passed finally to the template. In fact, with only Quiz feedback checked for after the quiz, only the fieldsets using quiz-question-score.html.twig are displayed, which are empty of any results.
Comment #12
stephenplatz commentedI noticed that the
getRangeFeedbackmethod on the theQuizResultViewBuilderclass was not returning values, because the$scorevariable was always 50, well outside of the ranges that are set in config. In fact, the combined max score of the questions is only 8, so I need to track down where the score is getting set to 50.Comment #13
djdevinIt's possible that the issue is language related but I'm not sure what it could be.
Regarding the score, Quiz will scale the final score based on maximum points to give it an N/100 score.
Comment #14
stephenplatz commentedThat's definitely going to be a problem, since the
getRangeFeedbackmethod is comparing an N/100 value with straight range values i.e. 1, 2, 3 etc.Comment #15
djdevinI don't think so, the score passed to getRangeFeedback is between 0-100 and it's comparing the score (not points) entered on the quiz configuration.
Where are you seeing it passed the raw point values?
Comment #16
stephenplatz commentedThe $range['from'] and $range['to'] values are 0-1, or similar, not calculated based on a score that is N/100. If you step through the script, you will see the same.
Comment #17
stephenplatz commentedI can see now after re-watching your video, that you have entered percentages for range values on the form, but there isn't any indication to users that these values should be percentages of 100%. For the passing rate, that's indicated, so maybe this can be corrected by simply updating the form to indicate that ranges should be entered as percentages.
Comment #18
stephenplatz commentedComment #19
djdevinAh, yes that would be it. We can add some help text.
In the D7 version it looked like this:
Comment #20
stephenplatz commentedI agree, that's much more clear on the Drupal 7 form.
Comment #21
djdevin