View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
13312Bug reportsRemoteControlpublic2019-10-17 12:01
Reportermattellen Assigned ToLouisGac 
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.0.x 
Summary13312: Getting question properties for dual scale question only gives answers for the second scale
Description

When I query the remote control 2 API to get the properties of a dual scale question, I only get half the answers I expect. I'm querying via python (3.4.3) requests (2.18.4)

(sorry for the nonsense, I'm developing on top of the API, and I need some test questions)
The answers:
left scale: This is 66, I'm not chosen, Don't like mash potato
right scale: Dave Gorman, Casualty, Causality

The questions: Is it OK?, Is it now German?, Cement mixer?

Question properties as returned by RemoteControl2:

{'error': None, 'id': 1, 'result': {'attributes_lang': 'No available attributes', 'question': 'Array dual scale', 'sid': '432755', 'preg': '', 'type': '1', 'language': 'en', 'answeroptions': {'A2': {'order': '2', 'answer': 'Casualty', 'scale_id': '1', 'assessment_value': '0'}, 'A3': {'order': '3', 'answer': 'Causality', 'scale_id': '1', 'assessment_value': '0'}, 'A1': {'order': '1', 'answer': 'Dave Gorman', 'scale_id': '1', 'assessment_value': '0'}}, 'subquestions': {'99': {'title': 'SQ003', 'scale_id': '0', 'question': 'Cement mixer?'}, '97': {'title': 'SQ001', 'scale_id': '0', 'question': 'Is it OK?'}, '98': {'title': 'SQ002', 'scale_id': '0', 'question': 'Is it now German?'}}, 'help': 'Rate these on a scale', 'available_answers': {'SQ003': 'Cement mixer?', 'SQ001': 'Is it OK?', 'SQ002': 'Is it now German?'}, 'other': 'N', 'relevance': '1', 'attributes': 'No available attributes', 'same_default': '0', 'qid': '40', 'modulename': None, 'defaultvalue': None, 'gid': '2', 'title': 'q25', 'parent_qid': '0', 'scale_id': '0', 'question_order': '25', 'mandatory': 'N'}}

Steps To Reproduce

Create a questionnaire with a dual scale question.
Get the question properties for the dual scale question using the RemoteControl2 API

TagsNo tags attached.
Bug heat14
Complete LimeSurvey version number (& build)Version 3.0.5+180118
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & versionmysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper
Server OS (if known)Ubuntu 16.04
Webserver software & version (if known)Nginx 1.10.3
PHP Version7.0.22

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2018-02-08 11:48

administrator   ~46311

@Deusdeorum Any comment?

Deusdeorum

Deusdeorum

2018-02-08 13:29

reporter   ~46317

What is your aQuestionSettings data?

mattellen

mattellen

2018-02-08 13:41

reporter   ~46318

aQuestionsSettings data is null, I guess. What should it be?

Deusdeorum

Deusdeorum

2018-02-08 13:46

reporter   ~46319

Last edited: 2018-02-08 13:50

Ok, null should return all. But looks like it only returns scale_id 1 which is the right scale, left scale being ignored, maybe the QID's are different when creating a dual scale question. I can reproduce it.

cdorin

cdorin

2019-03-08 11:20

reporter   ~50830

Hmm, any updates regarding this issue @Deusdeorum?

Mazi

Mazi

2019-10-16 11:16

updater   ~54058

@cdorin, please assign https://github.com/LimeSurvey/LimeSurvey/pull/1331 to someone for review.

Thanks!

LouisGac

LouisGac

2019-10-16 12:47

developer   ~54062

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

lime_release_bot

lime_release_bot

2019-10-17 12:01

administrator   ~54085

Fixed in Release 3.19.2+191017

Related Changesets

LimeSurvey: master 4931bb6f

2019-10-16 12:47:45

jakobwoegerbauer


Committer: LouisGac Details Diff
Get answers dual scale (#1331)

Fixed issue 13312: Get all answers for dualscale questions
Dev: Add additional property to retrieve all answer options of all scales
Fixed issue 13312: Get all answers for dualscale questions
Dev: add answeroptions_multiscale to list of possible properties in api documentation
Affected Issues
13312
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2018-02-07 15:26 mattellen New Issue
2018-02-08 11:48 ollehar Note Added: 46311
2018-02-08 13:29 Deusdeorum Note Added: 46317
2018-02-08 13:41 mattellen Note Added: 46318
2018-02-08 13:46 Deusdeorum Note Added: 46319
2018-02-08 13:50 Deusdeorum Note Edited: 46319
2019-03-08 11:20 cdorin Note Added: 50830
2019-10-16 11:16 Mazi Note Added: 54058
2019-10-16 12:47 LouisGac Changeset attached => LimeSurvey master 4931bb6f
2019-10-16 12:47 LouisGac Note Added: 54062
2019-10-16 12:47 LouisGac Assigned To => LouisGac
2019-10-16 12:47 LouisGac Resolution open => fixed
2019-10-17 12:01 lime_release_bot Note Added: 54085
2019-10-17 12:01 lime_release_bot Status new => closed