Skip to content

Commit

Permalink
Fixed issue #05932: default answers to hidden questions are not saved…
Browse files Browse the repository at this point in the history
… to database
  • Loading branch information
TMSWhite committed Mar 20, 2012
1 parent 478fd9e commit 8039073
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion classes/expressions/LimeExpressionManager.php
Expand Up @@ -6102,7 +6102,14 @@ static function ProcessCurrentResponses()
$type = $qinfo['info']['type'];
if ($relevant && $grelevant && $sqrelevant)
{
$value = (isset($_POST[$sq]) ? $_POST[$sq] : '');
if ($qinfo['info']['hidden'])
{
$value = (isset($_SESSION[$sq]) ? $_SESSION[$sq] : ''); // if always hidden, use the default value, if any
}
else
{
$value = (isset($_POST[$sq]) ? $_POST[$sq] : '');
}
if ($radixchange && isset($LEM->knownVars[$sq]['onlynum']) && $LEM->knownVars[$sq]['onlynum']=='1')
{
// convert from comma back to decimal
Expand Down

0 comments on commit 8039073

Please sign in to comment.