We've been playing around with the pattern match OU question type trying to get it to match reponses against a list of answers and award a score based on how many the student gets right. For example we have a list of seven animals. If a student entered all seven correctly they should be awarded 100%. If they answer six correctly they would get 85% (5 = 71% etc...).
Getting 100% is the easy part, this seems to work ok:
match_any (
match_mow (cat dog pidgeon zebra goat lion fox)
)
Grade: 100%
The partial answers are proving really tricky though. We've read through the documentation of pattern match and the only way seems to be to provide all the possible combinations of words and grade them accordingly. There are way too many combinations when you're dealing with seven answers.
I'm thinking something along these lines would be a better solution (match_any 6 in the example below is just wishful thinking and doesn't appear to be valid syntax):
match_any 6 (
match_mow (cat)
match_mow (dog)
match_mow (pidgeon)
match_mow (zebra)
match_mow (goat)
match_mow (lion)
match_mow (fox)
)
Grade: 85%
Is there something in pattern match we're missing that would make this easier than providing all the valid combination, possibly something along the lines of the second piece of pattern match above?