Skip to content
Permalink
Browse files

Dev: fix : must control updated value …

  • Loading branch information...
Shnoulle committed Apr 3, 2019
1 parent 7ff0292 commit b302a969ac60cc0ad97420293bad72275c039a04
Showing with 3 additions and 2 deletions.
  1. +3 −2 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] */

0 comments on commit b302a96

Please sign in to comment.
You can’t perform that action at this time.