Skip to content

Commit

Permalink
Fixed issue #07036: Integer only is not set in numeric question type
Browse files Browse the repository at this point in the history
Dev: if answer are not set SESSION var is NULL (or empty)
  • Loading branch information
Shnoulle committed Dec 5, 2012
1 parent fcfea33 commit c6e0e37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions application/helpers/qanda_helper.php
Expand Up @@ -3703,12 +3703,15 @@ function do_numerical($ia)
{
$fValue=rtrim(rtrim($fValue,"0"),".");
}
if (trim($aQuestionAttributes['num_value_int_only'])==1 && is_numeric($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]]))
if (trim($aQuestionAttributes['num_value_int_only'])==1)
{
$acomma="";
$extraclass .=" integeronly";
$answertypeclass .= " integeronly";
$fValue=number_format($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]], 0, '', '');
if(is_numeric($fValue))
{
$fValue=number_format($fValue, 0, '', '');
}
$integeronly=1;
}
else
Expand Down

0 comments on commit c6e0e37

Please sign in to comment.