Skip to content

Commit

Permalink
Fixed issue #10517: After Survey - member print option shows blank wh…
Browse files Browse the repository at this point in the history
…ite page and if set to show public stats, graphs don't display
  • Loading branch information
olleharstedt committed Feb 18, 2016
1 parent c39c4ea commit 1bfdf18
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions application/controllers/PrintanswersController.php
Expand Up @@ -68,7 +68,7 @@ function actionView($surveyid,$printableexport=FALSE)
//SET THE TEMPLATE DIRECTORY
$sTemplate = $aSurveyInfo['template'];


global $oTemplate;

//Survey is not finished or don't exist
if (!isset($_SESSION['survey_'.$iSurveyID]['finished']) || !isset($_SESSION['survey_'.$iSurveyID]['srid']))
Expand All @@ -78,7 +78,6 @@ function actionView($surveyid,$printableexport=FALSE)
doHeader();

/// $oTemplate is a global variable defined in controller/survey/index
global $oTemplate;
echo templatereplace(file_get_contents($oTemplate->viewPath.'/startpage.pstpl'),array());
echo "<center><br />\n"
."\t<font color='RED'><strong>".gT("Error")."</strong></font><br />\n"
Expand Down Expand Up @@ -108,7 +107,7 @@ function actionView($surveyid,$printableexport=FALSE)
if ($sExportType != 'pdf')
{
$sOutput = CHtml::form(array("printanswers/view/surveyid/{$iSurveyID}/printableexport/pdf"), 'post')
."<center><input type='submit' value='".gT("PDF export")."'id=\"exportbutton\"/><input type='hidden' name='printableexport' /></center></form>";
."<center><input class='btn btn-default' type='submit' value='".gT("PDF export")."'id=\"exportbutton\"/><input type='hidden' name='printableexport' /></center></form>";
$sOutput .= "\t<div class='printouttitle'><strong>".gT("Survey name (ID):")."</strong> $sSurveyName ($iSurveyID)</div><p>&nbsp;\n";
LimeExpressionManager::StartProcessingPage(true); // means that all variables are on the same page
// Since all data are loaded, and don't need JavaScript, pretend all from Group 1
Expand Down

0 comments on commit 1bfdf18

Please sign in to comment.