View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
12156 | Bug reports | RemoteControl | public | 2017-02-26 13:00 | 2017-03-07 11:01 |
Reporter | Sorix | Assigned To | mfavetti | ||
Priority | none | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.63.x | ||||
Fixed in Version | 2.64.x | ||||
Summary | 12156: get_question_properties ordering | ||||
Description | get_question_properties RemoteControl's method returns JSON Dictionary with ordering that is not supported by standard. The only way to get answers order is to call get_question_properties and look to raw JSON reply order, but you are not allowed to use ordering in JSON Dictionaries by standard, so there is no way to get answers ordering. | ||||
Steps To Reproduce | You can't get question ordering from that output: { | ||||
Tags | remote control | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 2.50+ Build 160715 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | no matter | ||||
Server OS (if known) | no matter | ||||
Webserver software & version (if known) | no matter | ||||
PHP Version | no matter | ||||
I am sorry but I don't understand the problem. Which ordering are you referring to? Can you explain in more detail what is not standard? |
|
Sorry that I've provided not such detailed description. I need to get answer options for question and use same answers order as it displays on web version of application. To get answer options I use method But as you can see there is no "answer order" option there, so I can't know correct order of answers. During my investigations I've found that LimeSurvey sends JSON Dictionary (look at key "answeroptions") with answer options in the same order as it specified in admin panel. But I can't rely on that because JSON Dictionary is unordered type by standard (so there is no answers order may be specified), so I can't rely on dictionary order (most languages don't support order for default dictionaries, if you iterate through dictionary you may receive key/values in random order). So to get correct answer order in JSON you need to add some key like "answer_order" or change "answeroptions" key from Dictionary to Array. In my example I can move answer options with id "3" at the top, or on the bottom, from JSON I can't know how that answer options needed to be ordered. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=22420 |
|
Thank you, mfavetti! |
|
Version 2.64.0 released |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2017-02-26 13:00 | Sorix | New Issue | |
2017-02-26 13:01 | Sorix | Tag Attached: remote control | |
2017-02-28 12:30 | c_schmitz | Assigned To | => c_schmitz |
2017-02-28 12:30 | c_schmitz | Status | new => feedback |
2017-02-28 12:30 | c_schmitz | Note Added: 43090 | |
2017-03-01 11:15 | Sorix | Note Added: 43110 | |
2017-03-01 11:15 | Sorix | Status | feedback => assigned |
2017-03-02 23:42 | mfavetti | Note Added: 43130 | |
2017-03-03 15:07 | c_schmitz | Changeset attached | => LimeSurvey master 983668e7 |
2017-03-03 15:07 | c_schmitz | Note Added: 43149 | |
2017-03-03 15:07 | c_schmitz | Resolution | open => fixed |
2017-03-03 15:08 | c_schmitz | Assigned To | c_schmitz => mfavetti |
2017-03-03 15:08 | c_schmitz | Status | assigned => resolved |
2017-03-03 15:08 | c_schmitz | Fixed in Version | => 2.64.x |
2017-03-03 15:08 | c_schmitz | Note Added: 43150 | |
2017-03-07 11:01 | c_schmitz | Note Added: 43177 | |
2017-03-07 11:01 | c_schmitz | Status | resolved => closed |