Skip to content

Commit

Permalink
Fixed issue 'other' status flag missing from Show Logic File
Browse files Browse the repository at this point in the history
Dev also fixed minor issue with Show Logic file - it was not showing the preg (regular expression validation) message
  • Loading branch information
TMSWhite committed Jun 6, 2012
1 parent f8ea028 commit ceb9fd6
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions application/helpers/expressions/em_manager_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7708,10 +7708,20 @@ static public function ShowSurveyLogicFile($sid, $gid=NULL, $qid=NULL,$LEMdebugL
// SHOW QUESTION ATTRIBUTES THAT ARE PROCESSED BY EM
//////
$attrTable = '';
if (isset($LEM->qattr[$qid]) && count($LEM->qattr[$qid]) > 0) {
$attrTable = "<hr/><table border='1'><tr><th>" . $LEM->gT("Question attribute") . "</th><th>" . $LEM->gT("Value"). "</th></tr>\n";

$attrs = (isset($LEM->qattr[$qid]) ? $LEM->qattr[$qid] : array());
if (isset($LEM->q2subqInfo[$qid]['preg']))
{
$attrs['regex_validation'] = $LEM->q2subqInfo[$qid]['preg'];
}
if (isset($LEM->questionSeq2relevance[$qseq]['other']))
{
$attrs['other'] = $LEM->questionSeq2relevance[$qseq]['other'];
}
if (count($attrs) > 0) {
$attrTable = "<hr/><table border='1'><tr><th>" . $LEM->gT("Question Attribute") . "</th><th>" . $LEM->gT("Value"). "</th></tr>\n";
$count=0;
foreach ($LEM->qattr[$qid] as $key=>$value) {
foreach ($attrs as $key=>$value) {
if (is_null($value) || trim($value) == '') {
continue;
}
Expand Down Expand Up @@ -7751,6 +7761,12 @@ static public function ShowSurveyLogicFile($sid, $gid=NULL, $qid=NULL,$LEMdebugL
break;
case 'other_replace_text':
case 'show_totals':
case 'regex_validation':
break;
case 'other':
if ($value == 'N') {
$value = NULL; // so can skip this one
}
break;
}
if (is_null($value)) {
Expand Down

0 comments on commit ceb9fd6

Please sign in to comment.