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.

Comments

guptahemant created an issue. See original summary.

guptahemant’s picture

Assigned: guptahemant » Unassigned
Status: Active » Needs review
StatusFileSize
new1.17 KB

Here is a patch to resolve the mentioned issue. Please review

siddhant.bhosale’s picture

Assigned: Unassigned » siddhant.bhosale
siddhant.bhosale’s picture

I 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.

siddhant.bhosale’s picture

Assigned: siddhant.bhosale » Unassigned

  • Nigel Cunningham committed 950eb51 on 8.x-2.x
    Issue #3083916 by guptahemant: Max score from a set plugin should...
nigelcunningham’s picture

Looks good. Applied with a small tweak.

Thanks!

nigelcunningham’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.