LimeSurvey 2.65 Option Numbering

More
3 months 3 weeks ago - 3 months 3 weeks ago #156115 by Matadeleo
Matadeleo created the topic: LimeSurvey 2.65 Option Numbering
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?
Last Edit: 3 months 3 weeks ago by Matadeleo.

Please Log in to join the conversation.

More
3 months 3 weeks ago #156129 by holch
holch replied the 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 months 3 weeks ago - 3 months 3 weeks ago #156147 by Matadeleo
Matadeleo replied the 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)


// 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();
            }
        }
$oAnswer->code = 'A1'; => $oAnswer->code = '1';
Last Edit: 3 months 3 weeks ago by Matadeleo. Reason: Added code

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now