h5p / h5p-blanks

9 stars 67 forks source link

Allow to add alternative that are not displayed when solution appears #84

Open DegrangeM opened 3 years ago

DegrangeM commented 3 years ago

The answer of one of my input was 0.5, however, as in french we use comma instead of dot, I used both solution so I set the answer to 0,5/0.5.

However, when showing solution, student thought it was a fraction and not a list of solution and where confused.

It would be nice to allow to not display some alternative. A possibility could be to add a global option, but an other possibility could be to set for each alternative if it should be displayed as solution or not.

Maybe using double slash could be the way to do that ? So i could write 0,5//0.5 and the 0.5 solution would not be displayed.

I am able to develop this, but I wanted to know what people think of this before.

DegrangeM commented 3 years ago

An issue with that solution is that it doesn't allow empty solution. There is probably some teacher that are using fill in the blank in situation where the answer might be empty like : I eat** an apple and he eat*s* an orange.

So it need an other way to set a solution as not displayed.

Maybe \ ? Or maybe it should be triple slash /// ? Or maybe a character after the slash to add ?

sr258 commented 3 years ago

I think the global option would be the most user friendly one (less markup) and it won't cause any issues with existing content, as you can easily add an upgrade script that always disables the option.

However, before jumping into the code, you should make sure that Joubel will actually accept a PR. There are already many PRs stacked up and I fear yours will suffer the same fate. You can always use your fork on your private installations, however.

DegrangeM commented 3 years ago

Yes after thinking the global option is probably the better. I will probably waiy for joubel opinion on this.