View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
07812Bug reportsOtherpublic2013-05-14 14:38
Reportermcleland Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary07812: Iterate Survey not working in latest version
Description

I am a C# programmer, but have a reasonable rasp of php. I cannot get the Iterate Survey to actually perform the database update for the responses.

if i force the surveyid to a know surveyid (see below) the database is updated otherwise the survey id gets lost on the subsequent invoke of this method.

Ive dumped out the _REQUEST array and on the subsequent invokation the surveyid is null!!!

How does the surveyid get to this function when the user clicks the confirm?

Thanks..

Michael

Steps To Reproduce
function iteratesurvey()
{
    $aData = array();

    $surveyid = sanitize_int(Yii::app()->request->getParam('surveyid'));
    if (!empty($_REQUEST['sid'])) {
        $surveyid = sanitize_int($_REQUEST['sid']);
    }
    $aData['surveyid'] = $surveyid;
    $aData['clang'] = $this->getController()->lang;
    $aData['success'] = false;

    $surveyid = 464237;

    if (hasSurveyPermission($surveyid,'surveyactivation','update'))
    {
    print("1");
        if (Yii::app()->request->getParam('unfinalizeanswers') == 'true')
        {
    print("2");
            Survey_dynamic::sid($surveyid);
            Yii::app()->db->createCommand("DELETE from {{survey_$surveyid}} WHERE submitdate IS NULL AND token in (SELECT * FROM ( SELECT answ2.token from {{survey_$surveyid}} AS answ2 WHERE answ2.submitdate IS NOT NULL) tmp )")->execute();
            // Then set all remaining answers to incomplete state
            Yii::app()->db->createCommand("UPDATE {{survey_$surveyid}} SET submitdate=NULL, lastpage=NULL")->execute();
            // Finally, reset the token completed and sent status
            Yii::app()->db->createCommand("UPDATE {{tokens_$surveyid}} SET sent='N', remindersent='N', remindercount=0, completed='N', usesleft=1 where usesleft=0")->execute();
            $aData['success']=true;
        }
        $this->_renderWrappedTemplate('dataentry', 'iteratesurvey', $aData);
    }
}
TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)130428
I will donate to the project if issue is resolvedYes
BrowserALL
Database type & versionMS SQL Express
Server OS (if known)Win 7
Webserver software & version (if known)IIS 7
PHP VersionLatest

Users monitoring this issue

There are no users monitoring this issue.

Activities

mcleland

mcleland

2013-05-07 02:37

reporter   ~25187

I think someone else has had this issue.

http://www.limesurvey.org/en/forum/design-issues/64027-iterate-survey-does-not-reset-quses-leftq#64059

c_schmitz

c_schmitz

2013-05-09 17:35

administrator   ~25199

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=12382

c_schmitz

c_schmitz

2013-05-10 15:39

administrator   ~25221

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=12406

c_schmitz

c_schmitz

2013-05-14 14:38

administrator   ~25256

Version 2.0 Build 130514 released

Related Changesets

LimeSurvey: master d6cf0742

2013-05-09 15:35:31

c_schmitz

Details Diff
Fixed issue 07812: Iterate survey not working Affected Issues
07812
mod - application/controllers/admin/database.php Diff File
mod - application/controllers/admin/dataentry.php Diff File
mod - application/views/admin/dataentry/iteratesurvey.php Diff File
mod - application/views/admin/responses/browsemenubar_view.php Diff File
add - styles/blobblueish/images/iterate_disabled.png Diff File
add - styles/gartergrey/images/iterate_disabled.png Diff File
add - styles/gringegreen/images/iterate_disabled.png Diff File

LimeSurvey: 2.05 e2bd4aee

2013-05-10 13:10:36

c_schmitz

Details Diff
Fixed issue 07812: Iterate survey not working Affected Issues
07812
mod - application/controllers/admin/database.php Diff File
mod - application/controllers/admin/dataentry.php Diff File
mod - application/views/admin/dataentry/iteratesurvey.php Diff File
mod - application/views/admin/responses/browsemenubar_view.php Diff File
add - styles/blobblueish/images/iterate_disabled.png Diff File
add - styles/gartergrey/images/iterate_disabled.png Diff File
add - styles/gringegreen/images/iterate_disabled.png Diff File

Issue History

Date Modified Username Field Change
2013-05-07 02:31 mcleland New Issue
2013-05-07 02:37 mcleland Note Added: 25187
2013-05-07 14:49 c_schmitz Assigned To => c_schmitz
2013-05-07 14:49 c_schmitz Status new => assigned
2013-05-09 17:35 c_schmitz Status assigned => resolved
2013-05-09 17:35 c_schmitz Fixed in Version => 2.00+
2013-05-09 17:35 c_schmitz Resolution open => fixed
2013-05-09 17:35 c_schmitz Changeset attached => LimeSurvey master d6cf0742
2013-05-09 17:35 c_schmitz Note Added: 25199
2013-05-10 15:39 c_schmitz Changeset attached => LimeSurvey 2.05 e2bd4aee
2013-05-10 15:39 c_schmitz Note Added: 25221
2013-05-14 14:38 c_schmitz Note Added: 25256
2013-05-14 14:38 c_schmitz Status resolved => closed