Skip to content

Commit

Permalink
Fixed issue #6035: Insertans not working in multiple options with com…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
c-schmitz committed Apr 20, 2012
1 parent 01b314b commit 0e69577
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -2396,7 +2396,7 @@ private function setVariableAndTokenMappingsForExpressionManager($surveyid,$forc
'jsName'=>'',
'readWrite'=>'N',
);

foreach ($attrs as $key)
{
if (preg_match('/^(firstname|lastname|email|usesleft|token|attribute_\d+)$/',$key))
Expand Down Expand Up @@ -6380,10 +6380,13 @@ private function _GetVarAttribute($name,$attr,$default,$gseq,$qseq)
break;
case 'M': //Multiple choice checkbox
case 'P': //Multiple choice with comments checkbox + text
if ($code == 'Y' && isset($var['question']))
if ($code == 'Y' && isset($var['question']) && !preg_match('/comment$/',$sgqa))
{
$shown = $var['question'];
}
elseif (preg_match('/comment$/',$sgqa) && isset($_SESSION[$sgqa])) {
$shown = $_SESSION[$sgqa];
}
else
{
$shown = $default;
Expand Down

0 comments on commit 0e69577

Please sign in to comment.