Skip to content

Commit

Permalink
Fixed issue #10091: don't load groupdescription.pstl if no group desc
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 9, 2015
1 parent 7944236 commit 4f0689b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -1084,7 +1084,7 @@ function run($surveyid,$args)
echo templatereplace(file_get_contents($sTemplatePath."startgroup.pstpl"), array(), $redata);
echo "\n";

if (!$previewquestion)
if (!$previewquestion && !empty($redata['groupdescription']))
{
echo templatereplace(file_get_contents($sTemplatePath."groupdescription.pstpl"), array(), $redata);
}
Expand Down Expand Up @@ -1258,13 +1258,13 @@ public function setJavascriptVar($iSurveyId)

/**
* Construction of replacement array, actually doing it with redata
*
*
* @param $aQuestionQanda : array from qanda helper
* @return aray of replacement for question.psptl
**/
public static function getQuestionReplacement($aQuestionQanda)
{

// Get the default replacement and set empty value by default
$aReplacement=array(
"QID"=>"",
Expand Down Expand Up @@ -1298,7 +1298,7 @@ public static function getQuestionReplacement($aQuestionQanda)
$oSurveyId=Survey::model()->findByPk($iSurveyId);
$sType=$lemQuestionInfo['info']['type'];

// Core value : not replaced
// Core value : not replaced
$aReplacement['QID']=$iQid;
$aReplacement['GID']=$aQuestionQanda[6];// Not sure for aleatory : it's the real gid or the updated gid ? We need original gid or updated gid ?
$aReplacement['SGQ']=$aQuestionQanda[7];
Expand Down
4 changes: 1 addition & 3 deletions application/helpers/qanda_helper.php
Expand Up @@ -4754,9 +4754,7 @@ function do_array($ia)
}
$cellwidth = round( ($columnswidth / $numrows ) , 1 );


/////////////////////////////////////// /////////////////////
$answer_start .= '<div class="no-more-tables">';
$answer_start = '<div class="no-more-tables">';
$answer_start .= "\n<table class=\"table-in-qanda-5 question subquestions-list questions-list {$extraclass}\" summary=\"{$caption}\">\n";
$answer_head_line= "\t<td>&nbsp;</td>\n";
foreach ($labelans as $ld)
Expand Down

0 comments on commit 4f0689b

Please sign in to comment.