Skip to content

Commit

Permalink
Fixed issue 10807: Meaningless error message 'surveytablecreation' wh…
Browse files Browse the repository at this point in the history
…en survey cannot be activated due to too many questions
  • Loading branch information
c-schmitz committed Mar 21, 2016
1 parent 4a8b70d commit 46de91b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions application/controllers/admin/surveyadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,15 +659,18 @@ public function activate($iSurveyID)
$aViewUrls['output']= "<br />\n<div class='messagebox ui-corner-all'>\n";
if ($aResult['error']=='surveytablecreation')
{
$aViewUrls['output'].="<div class='alert alert-warning' role='alert'>".gT("Survey table could not be created.")."</div>\n";
$aViewUrls['output'].="<div class='alert alert-warning' role='alert'>".gT("The survey response table could not be created.")." ".gT("Usually this is caused by having too many (sub-)questions in your survey. Please try removing questions from your survey.")."</div>\n";
}
else
{
$aViewUrls['output'].="<div class='alert alert-success' role='alert'>".gT("Timings table could not be created.")."</div>\n";
}
$aViewUrls['output'].="<strong class='text-warning'>" .
gT("Database error!!")."\n " ."\n" .
"<pre>".var_export ($aResult['error'],true)."</pre>\n
if(App()->getConfig('debug')) {
$aViewUrls['output'].="<strong class='text-warning'>" .
gT("Database error!!")."\n " ."\n" .
"<pre>".var_export ($aResult['error'],true)."</pre>\n
}
<a href='".Yii::app()->getController()->createUrl("admin/survey/sa/view/surveyid/".$iSurveyID)."'>".gT("Main Admin Screen")."</a>\n</strong><br/>" ;
}
else
Expand Down

0 comments on commit 46de91b

Please sign in to comment.