- Posts: 107
- Thank you received: 4
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
LimeSurvey 2.65 Option Numbering
- Matadeleo
- Topic Author
- Offline
- Premium Member
Less
More
6 years 10 months ago - 6 years 10 months ago #156115
by Matadeleo
LimeSurvey 2.65 Option Numbering was created by Matadeleo
Hi, I recently upgraded to Version 2.65.1+170522 and now when adding answer options using quick add, LimeSurvey's default numbering has changed from "1, 2, 3" to "A1, A2, A3" which causes issues when exporting to SPSS (no longer a numeric variable type) which then presents issues in tabulating the data with other programs as many rely on the data being in a numeric type.
I believe SubQuestions are also automatically labelled "SQ001, SQ002, SQ003", however this is isn't really an issue as it doesn't change the data types.
Is there any setting or modification to the source code I can make to reverse this change?
I believe SubQuestions are also automatically labelled "SQ001, SQ002, SQ003", however this is isn't really an issue as it doesn't change the data types.
Is there any setting or modification to the source code I can make to reverse this change?
Last edit: 6 years 10 months ago by Matadeleo.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
6 years 10 months ago #156129
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic LimeSurvey 2.65 Option Numbering
I don't know if this is the same case, but I notices, if you change the first answer option (which usually is already prefilled to a number, and then do quick add, it uses numbers, if you leave A1 it goes on with A2, etc.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Matadeleo
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 4
6 years 10 months ago - 6 years 10 months ago #156147
by Matadeleo
Replied by Matadeleo on topic LimeSurvey 2.65 Option Numbering
Yes Holch, that does appear to be the case - for the LimeSurvey data to be exported in the correct type for SPSS, I need to always use the numbering "1, 2, 3.."
Perhaps even just finding the file that sets the "pre-filled first option" for the answer options could solve the problem.
EDIT: This appears to be the issue file, located at: \application\controllers\admin\questions.php (Line 498)
Perhaps even just finding the file that sets the "pre-filled first option" for the answer options could solve the problem.
EDIT: This appears to be the issue file, located at: \application\controllers\admin\questions.php (Line 498)
Code:
// Check if there is at least one answer for ($i = 0; $i < $scalecount; $i++) { $ans = new CDbCriteria; $ans->addCondition("qid=$qid")->addCondition("scale_id=$i")->addCondition("language='$baselang'"); $qresult = Answer::model()->count($ans); if ((int)$qresult==0) { $oAnswer= new Answer; $oAnswer->qid = $qid; $oAnswer->code = 'A1'; $oAnswer->answer = ""; $oAnswer->language = $baselang; $oAnswer->sortorder = 0; $oAnswer->scale_id = $i; $oAnswer->save(); } }
Code:
$oAnswer->code = 'A1'; => $oAnswer->code = '1';
Last edit: 6 years 10 months ago by Matadeleo. Reason: Added code
The topic has been locked.