View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
06542Bug reportsSurvey takingpublic2012-09-26 09:10
ReporterLouisD Assigned Toc_schmitz  
PriorityhighSeveritypartial_block 
Status closedResolutionwon't fix 
Product Version2.00RC9 
Summary06542: As soon as a user views an all in one survey it is saved to the database as incomplete using the Yii branch. Solution provided.
Description

Whenever a user views an all in one survey it is submitted to the database as incomplete whether the user attempted to complete any of the survey or not. This is a problem for me because I have a couple embedded public surveys on a page. Each time a user visits the page the survey is submitted as incomplete. This has created a large number of erroneous incomplete survey entries in the database.

Steps To Reproduce

Create an all in one survey. Make sure the survey is not cached in the current session. Visit the survey page or refresh it. Notice an incomplete survey will be entered into the database.

Additional Information

To fix the problem I changed the code starting at line 4253 in em_manager_helper.php as follows:

Before:
----------START PHP----------
if (!$force && !is_null($result) && ($result['mandViolation'] || !$result['valid'] || $startingGroup == -1))
{
$finished=false;
}
else
{
$finished = true;
}
$message .= $LEM->_UpdateValuesInDatabase($updatedValues,$finished);
-----------END PHP-----------

After:

----------START PHP----------
$finished = $force || is_null($result) || (!$result['mandViolation'] && $result['valid'] && $startingGroup != -1);
if($finished)
$message .= $LEM->_UpdateValuesInDatabase($updatedValues, true);
-----------END PHP-----------

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)120816
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.0.90
Server OS (if known)Linux
Webserver software & version (if known)Apache/2.2.3 (CentOS)
PHP Version5.3.13
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-09-14 11:43

administrator   ~20701

Actually that is the intended behaviour. In LimeSurvey the survey start as soon as the user sees the first question. This is important for time measurement, too
Actually it is the same beahviour in 1.92+.

Issue History

Date Modified Username Field Change
2012-09-04 00:41 LouisD New Issue
2012-09-14 11:43 c_schmitz Note Added: 20701
2012-09-14 11:43 c_schmitz Assigned To => c_schmitz
2012-09-14 11:43 c_schmitz Status new => feedback
2012-09-26 09:10 c_schmitz Status feedback => closed
2012-09-26 09:10 c_schmitz Resolution open => won't fix