Skip to content

Commit

Permalink
reset the session of the survey when deactivating it
Browse files Browse the repository at this point in the history
  • Loading branch information
sieutruc committed Dec 10, 2015
1 parent 0f270a7 commit 323bcba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions application/controllers/admin/surveyadmin.php
Expand Up @@ -340,6 +340,9 @@ public function deactivate($iSurveyID = null)

$aData['tnewtable'] = $tnewtable;
$aData['toldtable'] = $toldtable;

// Reset the session of the survey when deactivating it
killSurveySession($iSurveyID);
}

//Remove any survey_links to the CPDB
Expand Down
3 changes: 0 additions & 3 deletions application/helpers/admin/activate_helper.php
Expand Up @@ -258,9 +258,6 @@ function activateSurvey($iSurveyID, $simulate = false)
//Check for any additional fields for this survey and create necessary fields (token and datestamp)
$prow = Survey::model()->findByAttributes(array('sid' => $iSurveyID));

//reset the session data of the survey if exist
unset(Yii::app()->session['survey_'.$iSurveyID]);

//Get list of questions for the base language
$fieldmap = createFieldMap($iSurveyID,'full',true,false,getBaseLanguageFromSurveyID($iSurveyID));

Expand Down

0 comments on commit 323bcba

Please sign in to comment.