View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
05680Bug reportsSurvey participants (Tokens)public2012-03-11 16:32
Reporteruser16774Assigned ToShellZero  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00a1 
Target Version2.00a2Fixed in Version2.00a2 
Summary05680: Delete exported tokens does not work.
Description

When attempting to export tokens as a CSV and checking the "Delete exported tokens" box, no tokens are deleted.

Steps To Reproduce

Create a survey.
Go to token management.
Create the token table if asked.
Click add dummy tokens and make 100 or so tokens with random properties.
Go to token export and check delete exported tokens.
Click export tokens and then go to display tokens and notice how nothing is deleted.

TagsNo tags attached.
Attached Files
text.patch (1,262 bytes)   
# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /Applications/XAMPP/htdocs/limesurvey_yii/application/helpers
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: export_helper.php
--- export_helper.php Base (BASE)
+++ export_helper.php Locally Modified (Based On LOCAL)
@@ -1913,9 +1913,10 @@
 
     Yii::import('application.libraries.Date_Time_Converter', true);
 
+    $aExportedTokens = array();
+
     foreach($bresult->readAll() as $brow)
     {
-
         if (trim($brow['validfrom']!=''))
         {
             $datetimeobj = new Date_Time_Converter($brow['validfrom'] , "Y-m-d H:i:s");
@@ -1947,11 +1948,18 @@
         }
         $tokenoutput = substr($tokenoutput,0,-1); // remove last comma
         $tokenoutput .= "\n";
+
+        $aExportedTokens[] = $brow['tid'];
     }
     echo $tokenoutput;
-    exit;
+
+    if (Yii::app()->request->getPost('tokendeleteexported') && !empty($aExportedTokens))
+    {
+        Tokens_dynamic::model($iSurveyID)->deleteByPk($aExportedTokens);
 }
 
+    exit;
+}
 function CPDBExport($data,$filename)
 {
 
text.patch (1,262 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)12135
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.1.58
Server OS (if known)Ubuntu Linux
Webserver software & version (if known)Apache 2.2.20
PHP VersionPHP 5.3.6-13

Users monitoring this issue

There are no users monitoring this issue.

Activities

ShellZero

ShellZero

2012-01-21 09:36

reporter   ~16895

please assign the bug to me i am working on it

c_schmitz

c_schmitz

2012-01-23 15:27

administrator   ~16905

ShellZero: still no fix?

ShellZero

ShellZero

2012-01-24 11:31

reporter   ~16934

no! still working.need some help

user16774

2012-01-26 18:55

  ~16991

I committed your patch, ShellZero. In the future, please be sure to use SVN to create patches - not NetBeans.

ShellZero

ShellZero

2012-01-26 19:21

reporter   ~16994

ajs:Ok!

c_schmitz

c_schmitz

2012-03-11 16:32

administrator   ~17865

2.00alpha 2 Build 120212 released

Issue History

Date Modified Username Field Change
2012-01-20 17:28 user16774 New Issue
2012-01-20 17:50 c_schmitz Product Version 2.00a2 => 2.00a1
2012-01-21 09:23 ShellZero Issue Monitored: ShellZero
2012-01-21 09:24 ShellZero Issue End Monitor: ShellZero
2012-01-21 09:36 ShellZero Note Added: 16895
2012-01-21 12:17 c_schmitz Assigned To => ShellZero
2012-01-21 12:17 c_schmitz Status new => assigned
2012-01-21 15:39 user16774 Steps to Reproduce Updated
2012-01-23 15:27 c_schmitz Note Added: 16905
2012-01-24 11:31 ShellZero Note Added: 16934
2012-01-26 00:50 ShellZero File Added: textfile.patch
2012-01-26 01:20 ShellZero File Deleted: textfile.patch
2012-01-26 01:21 ShellZero File Added: file.patch
2012-01-26 08:41 ShellZero File Deleted: file.patch
2012-01-26 08:42 ShellZero File Added: exportfile.patch
2012-01-26 09:00 ShellZero File Deleted: exportfile.patch
2012-01-26 09:01 ShellZero File Added: text.patch
2012-01-26 18:55 user16774 Note Added: 16991
2012-01-26 18:55 user16774 Status assigned => resolved
2012-01-26 18:55 user16774 Fixed in Version => 2.00a2
2012-01-26 18:55 user16774 Resolution open => fixed
2012-01-26 19:21 ShellZero Note Added: 16994
2012-03-11 16:32 c_schmitz Note Added: 17865
2012-03-11 16:32 c_schmitz Status resolved => closed
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)