Skip to content

Commit

Permalink
Fixed issue #10344: display quick actions when survey is new
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Feb 8, 2016
1 parent 4c4ed44 commit b370157
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 7 additions & 0 deletions application/core/Survey_Common_Action.php
Expand Up @@ -1160,6 +1160,13 @@ function _surveysummary($aData)
$aData['aAdditionalLanguages'] = $aAdditionalLanguages;
$aData['surveyinfo'] = $aSurveyInfo;
$aData['groups_count'] = $sumcount2;

// We get the state of the quickaction
// If the survey is new (ie: it has no group), it is opened by default
$setting_entry = 'quickaction_'.Yii::app()->user->getId();
$aData['quickactionstate'] = ($sumcount2<1)?1:getGlobalSetting($setting_entry);


$this->getController()->renderPartial("/admin/survey/surveySummary_view", $aData);
}

Expand Down
12 changes: 5 additions & 7 deletions application/views/admin/survey/surveySummary_view.php
Expand Up @@ -5,13 +5,11 @@
*/
$count= 0;

//TODO : move to controller
$templates = getTemplateListWithPreviews();
//print_r($templates);
$count = 0;
$surveyid = $surveyinfo['sid'];
$setting_entry = 'quickaction_'.Yii::app()->user->getId();
$quickactionstate = getGlobalSetting($setting_entry);
//TODO : move to controller
$templates = getTemplateListWithPreviews();
//print_r($templates);
$count = 0;
$surveyid = $surveyinfo['sid'];

$surveylocale = Permission::model()->hasSurveyPermission($iSurveyID, 'surveylocale', 'read');
// EDIT SURVEY SETTINGS BUTTON
Expand Down

0 comments on commit b370157

Please sign in to comment.