Home arrow Support arrow Forums
LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Spss Export missing CODE in variable labels (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Spss Export missing CODE in variable labels
#18812
jamarin (User)
Fresh Lemon
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Spss Export missing CODE in variable labels 3 Months, 3 Weeks ago Karma: 0  
I would like that SPSS export adds the question code before all the question definition in the VARIABLE LABELS section of the syntax file.

Now I have some question with the code (matrix o multiple responses) but other without (radio buttons or single questions):

the syntax looks like:

*Define Variable Properties.
VARIABLE LABELS d13 'QV01 - ISO 9001:'..
VARIABLE LABELS d17 'number de empleados de la empresa'.
VARIABLE LABELS d22 'QV07a - Mixta:'.
VARIABLE LABELS d28 'QV10 - Gerente'.
VARIABLE LABELS d30 'Encuestado'.

d17 has the code QV02 and d30 has the code QV11, but doesn't appear in the label.

Can I change this in the function that "print" the SPSS syntax file? How?
 
Logged Logged  
  The administrator has disabled public write access.
#18819
palim (User)
Fresh Lemon
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Spss Export missing CODE in variable labels 3 Months, 3 Weeks ago Karma: 0  
Hi, I was just having the same "problem". If I understand you correctly you would like the question code printed in front of all questions, both matrix and single questions.

The SPSS export script is admin/spss.php in your survey directory on the web server.

The output strings for the VARIABLE LABELS appear to be generated at line 713 for matrix type questions and at line 729 for single questions.

The code is in the variable $question_title and the question text in the $question_text variable. That way one should be able to modify the output for single questions according to the way they are done for the matrix type ones. This is how far I got until now without testing modifications as its running late for me now. Will try that tomorrow. Just wanted to let you know, hope it helps

Btw., the suffixes "OTHER" and "COMMENT" are in lines 718 and 722 if you want to modify those, too.

For reference, I'm running build 5498. So the line numbers may be different for you depending on which build you are running.
 
Logged Logged  
  The administrator has disabled public write access.
#18823
ElMatador69 (Moderator)
LimeSurvey Team
Posts: 1603
graphgraph
User Offline Click here to see the profile of this user
Re:Spss Export missing CODE in variable labels 3 Months, 3 Weeks ago Karma: 31  
Hi,
Project leader Carsten Scmitz (c_scmitz) overworked some weeks ago the SPSS export; I did some testing for him.

The problem of Carsten Schmitz and mine is, we don't really use SPSS and so we really would need feedback of people with better SPSS knowledge.

@ jamarin and palim: if you think you have some suggestions/improvements to the current version of the SPSS export, which are suitable for everyone please open a ticket in the bugtracker and attach your changes (If possible provide a SVN diff.patch).

If you think you found a bugs, please do the same!
 
Logged Logged  
 
Get in touch with the LimeSurvey Development Team via IRC
If our informations and answers were useful to you, please consider a donation to the LimeSurvey Project!
  The administrator has disabled public write access.
#18834
palim (User)
Fresh Lemon
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Spss Export missing CODE in variable labels 3 Months, 3 Weeks ago Karma: 0  
My personal limitation would be that I'm not really familiar with SPSS as I am just getting started with it, and I am not much of a programmer. So take everything with a grain of salt.

The variable labels are how you identify your data, in the table view they are like the column names in excel. So you want a short significant description to have a good overview. Normally that would be the code you defined for the questions in limesurvey (and not the question text, as seen in jamarin's example above). But that may just be my personal taste.

So as it is up to taste it may be more of the kind "it's not a bug, it's a feature"
Maybe the feature could be a configuration screen if many users need it.

Would it be filed as a bug or rather as a feature request in the bug tracker? I could file a ticket once I get my head around it.
 
Logged Logged  
  The administrator has disabled public write access.
#18839
Mazi (Moderator)
Moderator Lime
Posts: 3494
graph
User Online Now Click here to see the profile of this user
Re:Spss Export missing CODE in variable labels 3 Months, 3 Weeks ago Karma: 28  
I would add it as a bug because this gains the developers attention

You can write in the text that it's more or less a feature request.
 
Logged Logged  
 
Best regards,
Mazi
______________________
Need help? I can: set up Limesurvey for you / create your survey / implement additional features / design your template / offer premium support -> Contact.
  The administrator has disabled public write access.
#18926
jamarin (User)
Fresh Lemon
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Re:Spss Export missing CODE in variable labels 3 Months, 3 Weeks ago Karma: 0  
Thanks to all.

The information is just what I was looking for to customize the syntax file exported.

Now I have to change some things and probe it (probably I couldn`t start in 3 weeks, but after you have notices from mine).

I work with SPSS often (and during several years). I am not a SPSS expert but an advanced user (with limited knowledge of SPSS syntax, but I understand more or less its logic). My experience as php programmer is very low (I Use one time the patch, but I still don“t feel comfortable with it).

I agree with Palim that most of the things are "my taste" but probably are more common taste (and useful) than the current config (If I put things in the tracker I'll try to think in a common user and not only in my taste and let the very personal customization for my local files only)

Some ideas to work around (based in build 5228):
* Customize TypeMap array (lines 42-68): if you export as answer codes (as numbers) instead of answer text, then it is better to set the spssType to 'N' (of course this nor affect to date or short text variables, nor if your codes are alphanumeric). (This is important because if you change the type of a variable inside SPSS, you loss all the variables labels).
My opinion: people that works with SPSS normally use codes of responses (not text) and put the text as labels.

* use $question_title as SPSS name of the variable and $question_text variable as SPSS label of the variable
 
Logged Logged  
  The administrator has disabled public write access.
#18927
ElMatador69 (Moderator)
LimeSurvey Team
Posts: 1603
graphgraph
User Offline Click here to see the profile of this user
Re:Spss Export missing CODE in variable labels 3 Months, 3 Weeks ago Karma: 31  
Hi, please upgrade your installation! Since LimeSurvey 1.71+ build 5498 the SPSS export was completely updatet/rewritten!
 
Logged Logged  
 
Get in touch with the LimeSurvey Development Team via IRC
If our informations and answers were useful to you, please consider a donation to the LimeSurvey Project!
  The administrator has disabled public write access.
Go to top