Skip to content

Commit

Permalink
Dev: Factor out checkPassthruLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Aug 30, 2016
1 parent 9fe4a7a commit ab81973
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 0 additions & 4 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -379,10 +379,6 @@ protected function createIncrementalQuestionIndex($LEMsessid, $surveyMode)
*/
function run($surveyid,$args)
{
traceVar($_SESSION['fieldmap-' . $surveyid . 'en']);
traceVar($_SESSION['survey_' . $surveyid]);
//traceVar($_SESSION);

global $errormsg;
extract($args);

Expand Down
14 changes: 13 additions & 1 deletion application/helpers/frontend_helper.php
Expand Up @@ -1087,6 +1087,19 @@ function buildsurveysession($surveyid,$preview=false)
if (isset($_SESSION['survey_'.$surveyid]['fieldarray'])) $_SESSION['survey_'.$surveyid]['fieldarray']=array_values($_SESSION['survey_'.$surveyid]['fieldarray']);

//Check if a passthru label and value have been included in the query url
checkPassthruLabel($surveyid, $preview, $fieldmap);

Yii::trace('end', 'survey.buildsurveysession');
}

/**
* Check if a passthru label and value have been included in the query url
* @param int $surveyid
* @param boolean $preview
* @return void
*/
function checkPassthruLabel($surveyid, $preview, $fieldmap)
{
$oResult=SurveyURLParameter::model()->getParametersForSurvey($surveyid);
foreach($oResult->readAll() as $aRow)
{
Expand Down Expand Up @@ -1118,7 +1131,6 @@ function buildsurveysession($surveyid,$preview=false)
}
}
}
Yii::trace('end', 'survey.buildsurveysession');
}

/**
Expand Down

0 comments on commit ab81973

Please sign in to comment.