I am using this module to provide checkboxes support, While doing so i noticed that max score from a set plugin is not working correctly for multiple options(Drupal\Core\TypedData\TraversableTypedDataInterface), and hence not serving its intended purpose of finding up the maximum from selected options in an element.


| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot 2019-12-30 at 5.28.00 PM.png | 419.59 KB | siddhant.bhosale |
| #4 | Screenshot 2019-12-30 at 5.23.20 PM.png | 993.74 KB | siddhant.bhosale |
| #4 | Screenshot 2019-12-30 at 5.31.01 PM.png | 744.21 KB | siddhant.bhosale |
| #2 | max-score-support-for-traversable-answers-3083916-2.patch | 1.17 KB | guptahemant |
Comments
Comment #2
guptahemant commentedHere is a patch to resolve the mentioned issue. Please review
Comment #3
siddhant.bhosale commentedComment #4
siddhant.bhosale commentedI have tested the patch and works for me. Attaching the screenshots below:
Giving checkboxes different weights I have added two quiz checkboxes and selected max value :
After submitting the quiz with following options :
The score is 30 as 10 from first question and 20 from 2 as max score from a set is selected.
Looks good to be merged.
Comment #5
siddhant.bhosale commentedComment #7
nigelcunningham commentedLooks good. Applied with a small tweak.
Thanks!
Comment #8
nigelcunningham commented