Skip to content

Commit

Permalink
Fixed issue #7793: Question numbers appear on printout even when surv…
Browse files Browse the repository at this point in the history
…ey settings are adjusted not to show them
  • Loading branch information
c-schmitz committed May 10, 2013
1 parent 235143e commit 72c37c0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions application/controllers/admin/printablesurvey.php
Expand Up @@ -53,6 +53,8 @@ function index($surveyid, $lang = null)
}
$_POST['surveyprintlang']=$surveyprintlang;

$aSurveyInfo=getSurveyInfo($surveyid,$surveyprintlang);

// Setting the selected language for printout
$clang = new limesurvey_lang($surveyprintlang);

Expand Down Expand Up @@ -652,6 +654,16 @@ function index($surveyid, $lang = null)
,'QUESTIONHELP' => '' // content of the question help field.
,'ANSWER' => '' // contains formatted HTML answer
);

$showqnumcode = Yii::app()->getConfig('showqnumcode');
if(($showqnumcode=='choose' && ($aSurveyInfo['showqnumcode']=='N' || $aSurveyInfo['showqnumcode']=='X')) || $showqnumcode=='number' || $showqnumcode=='none')
{
$question['QUESTION_CODE']='';
}
if(($showqnumcode=='choose' && ($aSurveyInfo['showqnumcode']=='C' || $aSurveyInfo['showqnumcode']=='X')) || $showqnumcode=='code' || $showqnumcode=='none')
{
$question['QUESTION_NUMBER']='';
}

if($question['QUESTION_TYPE_HELP'] != "") {
$question['QUESTION_TYPE_HELP'] .= "<br />\n";
Expand Down

0 comments on commit 72c37c0

Please sign in to comment.