diff --git a/application/helpers/qanda_helper.php b/application/helpers/qanda_helper.php index fabecb40ebf..4a4fcb4a831 100644 --- a/application/helpers/qanda_helper.php +++ b/application/helpers/qanda_helper.php @@ -5478,14 +5478,25 @@ function do_array_multiflexi($ia) /* Check the sub Q mandatory violation */ if ($ia[6]=='Y' && !empty($aMandatoryViolationSubQ)) { - //Go through each labelcode and check for a missing answer! If any are found, highlight this line - $emptyresult=0; + //Go through each labelcode and check for a missing answer! Default :If any are found, highlight this line, checkbox : if one is not found : don't highlight + // PS : we really need a better system : event for EM ! + $emptyresult=($aQuestionAttributes['multiflexible_checkbox']!=0) ? 1 : 0; foreach($labelcode as $ld) { $myfname2=$myfname.'_'.$ld; - if(in_array($myfname2, $aMandatoryViolationSubQ)) + if($aQuestionAttributes['multiflexible_checkbox']!=0) { - $emptyresult=1; + if(!in_array($myfname2, $aMandatoryViolationSubQ)) + { + $emptyresult=0; + } + } + else + { + if(in_array($myfname2, $aMandatoryViolationSubQ)) + { + $emptyresult=1; + } } } if ($emptyresult == 1) @@ -5539,7 +5550,7 @@ function do_array_multiflexi($ia) for($ii=$minvalue; ($reverse? $ii>=$maxvalue:$ii<=$maxvalue); $ii+=$stepvalue) { $answer .= '\n";