Hoping someone can help me, I am trying to create a short answer question with multiple correct answers that can be given in any order as follows:
Q - What are the 4 main risk areas identified when working with chemicals?
A - Absorption, Ingestion, Inhalation, Explosion
All 4 risks in any order should give one full mark.
3 risks in any order 0.75
2 risks in any order 0.50
1 risks in any order 0.25
I'm pulling my hair out, I have tried wild cards with no joy.
Thanks in advance
I think you can probalby do it with Marcus's 'gapfill' question type https://moodle.org/plugins/qtype_gapfill, if you are able to install add-ons.
Hi Michael,
What you want to achieve is much more complicated than you think.
You want to achieve a partial permutation. A partial permutation of k items out of n consist in the list of all possible permutation of each combination of k out of n. You can try this for yourself on this webpage: https://www.dcode.fr/partial-k-permutations
What you want to achieve would yield:
permutations 4 -> 24
permutations 3 -> 24
permutations 2 -> 12
permutations 1 -> 4
TOTAL 64 combinations!
I have managed to achieve it in my own REGEXP question type and you can test it on my moodle test site at http://www.rezeau.org/moodle
log in as student01 and go to test course 01 (the only one) and go to Quiz for Michael Kiff
Joseph
Hello to all,
Michael's question is so simple that it's surprising that you can't do it in Moodle.
We could easily do it with a small script, for example the one below that I sketched in a few minutes. The question is where to place this script?
The Formulas question allows to include some programming and we could use it to do Michael's question if it were not that the Formulas question does not deal with strings (except for algebraic expressions). Processing string answers in the Formulas question is on my wish list.
if (answer_1 == "string_1" || answer_1 == "string_2" || answer_1 == "string_3" || answer_1 == "string_4") { mark = 0.25; } if (answer_2 == "string_1" || answer_2 == "string_2" || answer_2 == "string_3" || answer_2 == "string_4" && answer_2 != answer_1) { mark = mark + 0.25; } if (answer_3 == "string_1" || answer_3 == "string_2" || answer_3 == "string_3" || answer_3 == "string_4" && answer_3 != answer_1 && answer_3 != answer_2) { mark = mark + 0.25; } if (answer_4 == "string_1" || answer_4 == "string_2" || answer_4 == "string_3" || answer_4 == "string_4" && answer_4 != answer_1 && answer_4 != answer_2 && answer_4 != answer_3) { mark = mark + 0.25; }
Hi Michael
If you go to
https://m.vledevelop.co.uk/course/view.php?id=4
And login with credentials
username
s1
password
Password1
And take the Risks with Chemicals quiz, you will find it has a single question which may address your requirements.