From b302a969ac60cc0ad97420293bad72275c039a04 Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Wed, 3 Apr 2019 11:07:17 +0200 Subject: [PATCH] =?UTF-8?q?Dev:=20fix=20:=20must=20control=20updated=20val?= =?UTF-8?q?ue=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/helpers/expressions/em_manager_helper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/helpers/expressions/em_manager_helper.php b/application/helpers/expressions/em_manager_helper.php index a6561a62282..c4bc68de6a3 100644 --- a/application/helpers/expressions/em_manager_helper.php +++ b/application/helpers/expressions/em_manager_helper.php @@ -6938,8 +6938,9 @@ public function _ValidateQuestion($questionSeq,$force=false) { if (!isset($_SESSION[$LEM->sessid][$sgqa]) && !is_null($LEM->knownVars[$sgqa]['default'])) { $_SESSION[$LEM->sessid][$sgqa] = ""; // Fill the $_SESSION to don't do it again a second time, but wait to fill with good value - if(self::checkValidityAnswer($qInfo['type'],$_SESSION[$LEM->sessid][$sgqa],$sgqa,$qInfo,Permission::model()->hasSurveyPermission($LEM->sid, 'surveycontent', 'update'))) { - $_SESSION[$LEM->sessid][$sgqa]=$LEM->ProcessString($LEM->knownVars[$sgqa]['default'], $qInfo['qid'], NULL, 1, 1, false, false, true);// Ok can fill with good value + $defaultValue = $LEM->ProcessString($LEM->knownVars[$sgqa]['default'], $qInfo['qid'], NULL, 1, 1, false, false, true); + if(self::checkValidityAnswer($qInfo['type'],$defaultValue,$sgqa,$qInfo,Permission::model()->hasSurveyPermission($LEM->sid, 'surveycontent', 'update'))) { + $_SESSION[$LEM->sessid][$sgqa] = $defaultValue;// Ok can fill with good value $LEM->updatedValues[$sgqa] = $updatedValues[$sgqa] = array('type'=>$qInfo['type'],'value'=>$_SESSION[$LEM->sessid][$sgqa]); } /* cleanup $LEM->validityString[$sgqa] */