View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06582Bug reportsImport/Exportpublic2012-09-30 15:22
Reporternwinter Assigned Tomdekker  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06582: Export data to SPSS does not export value labels correctly
Description

When exporting the results of a survey to SPSS format, the value labels are not exported correctly: the values are listed, but the labels are listed simply as blank for each value.

Additional Information

Problem appears to me to be that the $length_vallabels variable is not getting set up as global scope when it is created in exportspss() [in application/controllers/admin/export.php]. Although it is declared global in SPSSGetValues() [in application/helpers/export_helpers.php], the references to it in that function return blank. Adding the statement

global $lenth_vallabels;

before assigning the value to it in exportspss() fixes the problem, though surely there is a better way to handle this?

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)120920
I will donate to the project if issue is resolvedNo
Browser
Database type & version??
Server OS (if known)Linux
Webserver software & version (if known)Apache/2.2.17 (Fedora)
PHP Version5.3.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

nwinter

nwinter

2012-09-23 22:25

reporter   ~20764

There seem to be other problems in the SPSS Export routines. For example, the line that creates the variable $typeMap is commented out in export.php

// $typeMap = $this->_getTypeMap();

But it gets referred to throughout SPSSFieldMap in export_helper.php...

c_schmitz

c_schmitz

2012-09-24 11:15

administrator   ~20773

Menno, can you take this one please?

mdekker

mdekker

2012-09-25 10:25

reporter   ~20792

will have a look

mdekker

mdekker

2012-09-27 14:18

reporter   ~20840

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

mdekker

mdekker

2012-09-27 14:19

reporter   ~20841

Did a quickfix... needs rewriting to a proper export class to fit in the regular export screens and allow export of timings and selection of fields to export.

nwinter

nwinter

2012-09-27 15:01

reporter   ~20844

If possible I'd love to be in the loop on the (eventual) rewrite. For my installation of 1.92+ I created an export to Stata function, that both exports to Stata format, but also does a better job with date variables, and which has an option to recode -oth- (other) values to a numeric mask.

Once SPSS export is working on 2.0, I am planning to move my Stata code over to 2.0 and was hoping to get it incorporated into the application. But I won't bother if the whole SPSS export function will be majorly revamped very soon.

Sadly I'm only moderately skilled with PHP, and brand new to Yii, so although I'd love to volunteer to rewrite the whole thing, that's clearly beyond my expertise at this point.

(Sorry if this is the wrong place to contact y'all about this...if so please advise!)

c_schmitz

c_schmitz

2012-09-27 15:09

administrator   ~20846

nwinter, I guess the rewrite will take place earliest for 2.1 - that's when we will be starting to head for a plugin-architecture - not only for data explort plugins.
Menno, so can we set this to resolved now?

nwinter

nwinter

2012-09-27 15:11

reporter   ~20847

Excellent. I'll pass along my modifications to this fixed version, to add Stata functionality. Might those modifications make the distribution version, given that 2.1 is probably a ways off?

And, when I do so, should I start a new "bug" report in the "User Patches" category?

(And finally, thank you for all your hard work on this fabulous application!)

c_schmitz

c_schmitz

2012-09-27 15:26

administrator   ~20848

We will only take that Stata export into the core if you agree to take care of it during the next couple years. None of the core developers is using Stata so we won't be able to maintain that code and have to rely on you.

Later when the plugin architecture is available you should move it to your own plugin and so continue to maintain it yourself.

Does that sound feasible to you?

nwinter

nwinter

2012-09-27 15:31

reporter   ~20849

Absolutely! Thanks.

mdekker

mdekker

2012-09-27 16:49

reporter   ~20857

Ok resolving for now :)

Will think about the rewrite of export spss/r to see if i will do it before 2.1 or not.

c_schmitz

c_schmitz

2012-09-30 15:22

administrator   ~20903

New Version 2.00+ Build 120930 released. If you are using 120926 you should be able to update by ComfortUpdate. All earlier versions need to update manually.

Related Changesets

LimeSurvey: master f2b1546c

2012-09-27 07:17

mdekker


Details Diff
Fixed 06582: Export data to SPSS does not export value labels correctly
dev: Quickfix only as it was completely broken. Needs a rewrite.
Affected Issues
06582
mod - application/controllers/admin/export.php Diff File
mod - application/helpers/export_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-09-23 20:37 nwinter New Issue
2012-09-23 22:25 nwinter Note Added: 20764
2012-09-24 11:05 c_schmitz Assigned To => mdekker
2012-09-24 11:05 c_schmitz Status new => assigned
2012-09-24 11:15 c_schmitz Note Added: 20773
2012-09-25 10:25 mdekker Note Added: 20792
2012-09-27 14:18 mdekker Changeset attached => LimeSurvey master f2b1546c
2012-09-27 14:18 mdekker Note Added: 20840
2012-09-27 14:18 mdekker Resolution open => fixed
2012-09-27 14:19 mdekker Note Added: 20841
2012-09-27 15:01 nwinter Note Added: 20844
2012-09-27 15:09 c_schmitz Note Added: 20846
2012-09-27 15:11 nwinter Note Added: 20847
2012-09-27 15:26 c_schmitz Note Added: 20848
2012-09-27 15:31 nwinter Note Added: 20849
2012-09-27 16:49 mdekker Note Added: 20857
2012-09-27 16:49 mdekker Status assigned => resolved
2012-09-27 16:49 mdekker Fixed in Version => 2.00+
2012-09-30 15:22 c_schmitz Note Added: 20903
2012-09-30 15:22 c_schmitz Status resolved => closed