Skip to content

Commit

Permalink
Fixed issue #15348: Ranking question does not save answers when array
Browse files Browse the repository at this point in the history
filter and max columns are used

Dev: As suggested by Denis on github
  • Loading branch information
olleharstedt committed Oct 4, 2019
1 parent 07bfced commit c4309bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -6273,7 +6273,7 @@ public function _ValidateQuestion($questionSeq,$force=false)
// Relevance of subquestion for ranking question depend of the count of relevance of answers.
$iCountRank=(isset($iCountRank) ? $iCountRank+1 : 1);
// Relevant count is : Total answers less Unrelevant answers. subQrelInfo give only array with relevance equation, not this without any relevance.
$iCountRelevant=isset($iCountRelevant) ? $iCountRelevant : count($sgqas)-count(array_filter($LEM->subQrelInfo[$qid],function($sqRankAnwsers){ return !$sqRankAnwsers['result']; }));
$iCountRelevant=isset($iCountRelevant) ? $iCountRelevant : count($LEM->subQrelInfo[$qid])-count(array_filter($LEM->subQrelInfo[$qid],function($sqRankAnwsers){ return !$sqRankAnwsers['result']; }));
if($iCountRank > $iCountRelevant)
{
$irrelevantSQs[] = $sgqa;
Expand Down

0 comments on commit c4309bd

Please sign in to comment.