Skip to content

Commit

Permalink
Fixed issue #06165: unable to implement affirmative exclusive non-ans…
Browse files Browse the repository at this point in the history
…wer in array_filter_exclude

Fixed issue #06079: sub-question filtering broken if "other" or "no answer" option is given
Dev Array_filter and array_filter_exclude now handle mismatched lists of sub-questions gracefully.  Values in list B that are not in list A will not be filtered, and will not throw errors.
Dev This lets authors support exclusive options like "none of the above" in array filtered questions
  • Loading branch information
TMSWhite committed Jun 3, 2012
1 parent 29a8e28 commit a2b96ed
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -1038,23 +1038,39 @@ public function _CreateSubQLevelRelevanceAndValidationEqns($onlyThisQseq=NULL)
foreach ($cascadedAF as $_caf)
{
$sgq = ((isset($this->qcode2sgq[$_caf])) ? $this->qcode2sgq[$_caf] : $_caf);
$af_names[] = $sgq . substr($sq['sqsuffix'],1);;
$sgq .= substr($sq['sqsuffix'],1);
if (isset($this->knownVars[$sgq]))
{
$af_names[] = $sgq . '.NAOK';
}
}
foreach ($cascadedAFE as $_cafe)
{
$sgq = ((isset($this->qcode2sgq[$_cafe])) ? $this->qcode2sgq[$_cafe] : $_cafe);
$afe_names[] = $sgq . substr($sq['sqsuffix'],1);;
$sgq .= substr($sq['sqsuffix'],1);
if (isset($this->knownVars[$sgq]))
{
$afe_names[] = $sgq . '.NAOK';
}
}
}
else
{
foreach ($cascadedAF as $_caf)
{
$af_names[] = $_caf . $sq['sqsuffix'];
$sgq = $_caf . $sq['sqsuffix'];
if (isset($this->knownVars[$sgq]))
{
$af_names[] = $sgq . '.NAOK';
}
}
foreach ($cascadedAFE as $_cafe)
{
$afe_names[] = $_cafe . $sq['sqsuffix'];
$sgq = $_cafe . $sq['sqsuffix'];
if (isset($this->knownVars[$sgq]))
{
$afe_names[] = $sgq . '.NAOK';
}
}
}
break;
Expand Down

0 comments on commit a2b96ed

Please sign in to comment.