h5p / h5p-multi-choice

10 stars 98 forks source link

Display of minus / plus one points is not correct when H5P Multiple Choice is used in H5P Question Sets #148

Closed osa-freiburg closed 1 year ago

osa-freiburg commented 2 years ago

https://github.com/h5p/h5p-multi-choice/blob/88f3105b6462608764d84de527061da3ba9f0493/js/multichoice.js#L500

I am not sure for what that line to "remove of plus or minus one indicators" is good for. The "show score points" behavioural setting seems to work just fine when solution is shown, independently of this line of code.

This line of code seems to destroy the display of plus or minus one indicators when H5P multi choice is used in H5P Question Sets. At least in my test settings (with H5P plugin in WordPress) I can reproduce this. In H5P Question Sets the indicators are not shown, despite of selecting "show score points" in the behavioural settings.

This issue was opened a year ago without resolving.

By removing this line as follows the display of minus and plus indicators works as it should - no matter if used in Question Sets or not: change }).find('.h5p-question-plus-one, .h5p-question-minus-one').remove(); to });

Maybe it is necessary for another scenario. Could anybody confirm this? Thanks!

fnoks commented 1 year ago

I believe this is intentional. I.e: the minus/plus points are not shown in solution mode if it is a standalone Multiple Choice either. I.e: it seems to be consistent. Are you seeing something else?

fnoks commented 1 year ago

I believe this is according to the specification (from 2017): https://h5ptechnology.atlassian.net/browse/HFP-1260

osa-freiburg commented 1 year ago

Thank you very much for your answer and helpful link to atlassian.net, I really appreciate that!

I see the difference now between standalone Multiple Choice and in Question Set - only the latter has the "show solution" option. And then it is indeed intentional "Points are hidden in show solutions mode."

But why? Maybe because in Question Set there could be other H5P tasks without the show score points option and it could be confusing in solution mode to see these minus/plus points only in specific tasks.

You will understand my concern if you will have the time and interest to compare the difference between my sort of standalone Multiple Choice with that in Question Set:

https://www.osa.uni-freiburg.de/anglistik/aufgaben/linguistics/exercise1/

=> after clicking on "check" you'll see the minus/plus points as expected.

And in Question Set (5 Multiple Choices - sorry, only in German, but for the technical aspects it doesn't matter):

https://www.osa.uni-freiburg.de/anglistik/studienalltag/quiz/

=> after clicking on "Beenden / Finish" AND (!!!) "Lösung anzeigen / Show solution" you will see the minus/plus points in each task as well - but only due to my hack (mentioned in August).

So for my scenario an additional option in Question Set (!) would be perfect: not only "show results" and "show solution" but also - if the latter is checked - "show score points (if they are shown in a multiple choice task)". But I understand now that my request is quite specific and at least I could solve it for my needs. I am grateful for your hints nevertheless, thank you once again! :)

osa-freiburg commented 1 year ago

And finally a tiny improvement in my little hack - so that each task will be taken into account (each option of "show score points"): // remove plus and minus indicators (+1 / -1) depending on settings in multiple choice option 'show score points'

if (params.behaviour.showScorePoints === false) {
  $myDom.find(".h5p-question-plus-one, .h5p-question-minus-one").remove();
}