Skip to content

Commit

Permalink
Dev: show processed strings for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jan 31, 2018
1 parent ff4d688 commit a159f04
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion application/controllers/admin/database.php
Expand Up @@ -1441,7 +1441,8 @@ private function _resetEM(){
$oSurvey = Survey::model()->findByPk($this->iSurveyID);
LimeExpressionManager::SetDirtyFlag();
$oEM =& LimeExpressionManager::singleton();
LimeExpressionManager::StartSurvey($oSurvey->sid,'survey',$oSurvey->attributes,true,$debugLevel=0);
LimeExpressionManager::UpgradeConditionsToRelevance($this->iSurveyID);
LimeExpressionManager::StartSurvey($oSurvey->sid,'survey',$oSurvey->attributes,true);

}
}
1 change: 0 additions & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -721,7 +721,6 @@ public static function SetPreviewMode($previewmode=false)
{
$LEM =& LimeExpressionManager::singleton();
$LEM->sPreviewMode=$previewmode;
//$_SESSION[$LEM->sessid]['previewmode']=$previewmode;
}

/**
Expand Down
1 change: 1 addition & 0 deletions application/models/QuestionAttribute.php
Expand Up @@ -216,6 +216,7 @@ public function getQuestionAttributes($iQuestionID, $sLanguage = null)
// Fill with aQuestionAttributes with default attribute or with aAttributeValues
// Can not use array_replace due to i18n
foreach ($aAttributeNames as $aAttribute) {
$aQuestionAttributes[$aAttribute['name']]['expression'] = isset($aAttribute['expression']) ? $aAttribute['expression'] : 0;

if ($aAttribute['i18n'] == false) {
if (isset($aAttributeValues[$aAttribute['name']][''])) {
Expand Down
14 changes: 10 additions & 4 deletions application/views/admin/survey/Question/question_view.php
Expand Up @@ -184,10 +184,16 @@
</td>
<td>
<?php
if ($aAdvancedSetting['i18n']==false)
echo htmlspecialchars($aAdvancedSetting['value']);
else
echo htmlspecialchars($aAdvancedSetting[$baselang]['value'])
if (isset($aAdvancedSetting['expression']) && $aAdvancedSetting['expression']==2){
LimeExpressionManager::ProcessString('{' . $aAdvancedSetting['value'] . '}', $qid);
echo LimeExpressionManager::GetLastPrettyPrintExpression();
} else {
if ($aAdvancedSetting['i18n']==false){
echo htmlspecialchars($aAdvancedSetting['value']);
} else {
echo htmlspecialchars($aAdvancedSetting[$baselang]['value']);
}
}
?>
</td>
</tr>
Expand Down

0 comments on commit a159f04

Please sign in to comment.