Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Yii' into Yii
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jul 19, 2012
2 parents cb9cf61 + 79ae641 commit 1d9f331
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
8 changes: 5 additions & 3 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -4790,16 +4790,18 @@ static function JumpTo($seq,$preview=false,$processPOST=true,$force=false,$chang
// then skip this group - assume already saved?
continue;
}
else if (!($result['mandViolation'] || !$result['valid']) && $LEM->currentGroupSeq < $seq) {
elseif (!($result['mandViolation'] || !$result['valid']) && $LEM->currentGroupSeq < $seq) {
// if there is a violation while moving forward, need to stop and ask that set of questions
// if there are no violations, can skip this group as long as changed values are saved.
continue;
}
else
{
// display new group
$message .= $LEM->_UpdateValuesInDatabase($updatedValues,false);
$LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now));
if(!$preview){ // Save only if not in preview mode
$message .= $LEM->_UpdateValuesInDatabase($updatedValues,false);
$LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now));
}
$LEM->lastMoveResult = array(
'finished'=>false,
'message'=>$message,
Expand Down
8 changes: 4 additions & 4 deletions application/helpers/frontend_helper.php
Expand Up @@ -2096,16 +2096,16 @@ function buildsurveysession($surveyid,$previewGroup=false)
// }
// }
// Prefill questions/answers from command line params
$reservedGetValues= array('token','sid','gid','qid','lang','newtest','action');
$startingValues=array();
if (isset($_GET))
if (isset($_GET) && !$previewGroup)
{
foreach ($_GET as $k=>$v)
{
if (preg_match('/^(token|sid|lang|newtest)$/',$k))
if (!in_array($k,$reservedGetValues))
{
continue;
$startingValues[$k] = $v;
}
$startingValues[$k] = $v;
}
}
$_SESSION['survey_'.$surveyid]['startingValues']=$startingValues;
Expand Down
Expand Up @@ -114,7 +114,7 @@


SetSurveyLanguage($surveyid, $language);

LimeExpressionManager::SetDirtyFlag();
$result = LimeExpressionManager::ShowSurveyLogicFile($surveyid, $gid, $qid,$LEMdebugLevel,$assessments);
print $result['html'];

Expand All @@ -123,4 +123,4 @@
</html>
EOD;
}
?>
?>
2 changes: 1 addition & 1 deletion scripts/expressions/em_javascript.js
Expand Up @@ -523,7 +523,7 @@ function LEMval(alias)
return value;
}
else {
if (strlen(value) > 0 && value[0]==0) {
if (value.length > 0 && value[0]==0) {
return value; // so keep 0 prefixes on numbers
}
return +value; // convert it to numeric return type
Expand Down

0 comments on commit 1d9f331

Please sign in to comment.