diff --git a/application/controllers/admin/surveyadmin.php b/application/controllers/admin/surveyadmin.php index f26fb4d87ea..40b0e0ae527 100644 --- a/application/controllers/admin/surveyadmin.php +++ b/application/controllers/admin/surveyadmin.php @@ -286,6 +286,12 @@ public function view($iSurveyID, $gid = null, $qid = null) if (isset($qid)) $qid = sanitize_int($qid); + // Reinit LEMlang and LEMsid: ensure LEMlang are set to default lang, surveyid are set to this survey id + // Ensure Last GetLastPrettyPrintExpression get info from this sid and default lang + LimeExpressionManager::SetEMLanguage(Survey::model()->findByPk($iSurveyID)->language); + LimeExpressionManager::SetSurveyId($iSurveyID); + LimeExpressionManager::StartProcessingPage(false,true); + $aData['surveyid'] = $iSurveyID; $aData['gid'] = $gid; $aData['qid'] = $qid;