View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
12149Feature requestsRemoteControlpublic2017-06-08 13:15
ReporterJorgensj1972 Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary12149: add "code" field to list_questions
Description

I'd like to add the "code" for headers that are generated with the export_responses $sHeadingType = "code" to list_questions. This is important for users wanting to map "nice" looking text for questions to response data (for example, in Shiny R, to populate CheckBoxes that are labelled "Activity" but pass the code "PFWB.PFWB001." see below for an example... in case that doesn't look right, see pastern here: https://paste.fedoraproject.org/paste/L9fIntmpMyjqksr7ySFeOF5M1UNdIGYhyRLivL9gydE=

Additional Information

I have added the column "code" to illustrate how I'd like list_questions to appear

id.qid  id.lang     qid     parent_qid  sid     gid     type    code            title       question
238                 238     0           463668  20      M                       PFWB        
239                 239     0           463668  21      M                       TRTMT       
240                 240     0           463668  23      M                       SOCIAL      
241                 241     0           463668  22      M                       EMOT001     
242                 242     0           463668  24      M                       REFER       
243                 243     238         463668  20      T       PFWB.PFWB001.   PFWB001     Activity
244                 244     238         463668  20      T       PFWB.PFWB002.   PFWV002     Appetite
...
...
...
272                 272     239         463668  21      T       TRTMT.TR001.    TR001       Cancer Treatment
273                 273     239         463668  21      T       TRTMT.TR002.    TR002       Regret about treatment
...
...
...
276                 276     240         463668  23      T       SOCIAL.SC001.   SC001       Carer
277                 277     240         463668  23      T       SOCIAL.SC002.   SC002       Dependants/children
... 
...
...
285                 285     241         463668  22      T       EMOT001.EM001.  EM001       Appearance
286                 286     241         463668  22      T       EMOT001.EM002.  EM002       Angry
...
...
...
296                 296     242         463668  24      T       REFER.REF001.   REF001      Dental Hygenist
297                 297     242         463668  24      T       REFER.REF002.   REF002      Dentist
...
...
...
314                 314     0           463668  20      S       TOKEN           TOKEN       Please enter your token here

examples of the column names generated by export_responses are:

PFWB.PFWB001.
PFWB.PFWB002.
...
PFWB.PFWB029.
TOKEN
TRTMT.TR001.
TRTMT.TR002.
...
TRTMT.TR004.
TRTMT.other. <---- just to make things even harder!
SOCIAL.SC001.
SOCIAL.SC002.
...
SOCIAL.SC009.
EMOT001.EM001.
EMOT001.EM002.
...
EMOT001.EM011.
EMOT001.other.
REFER.REF001.
REFER.REF002.
...
REFER.REF018.
REFER.other.

TagsNo tags attached.
Attached Files
Bug heat6
Story point estimate
Users affected %

Users monitoring this issue

arkygeek

Activities

DenisChenu

DenisChenu

2017-02-22 17:58

developer   ~43070

Here , it's the result you want ?

If i understand right : you need export_reponse with EM code (for example) EM code usage TRTMT_TR001 TRTMT_other. And we are unable to use this code when exporting. I think we can set 'extra settings' in RC ? Not the case ?

Another solution : create a new export plugin ( it's more a joke but can be easy) : https://github.com/SondagesPro/exportTripleS/blob/master/tripleSHelper.php

Jorgensj1972

Jorgensj1972

2017-02-22 18:07

reporter   ~43073

I don't fully understand you, sorry. Currently, if I use the RemoteControl API, list_questions does not contain the heading codes which would correspond to the ones you get from RemoteControl API export_responses $sHeadingType = "code"

I haven't found 'extra settings' ...

DenisChenu

DenisChenu

2017-02-22 18:17

developer   ~43074

OK, It's right and more : think nyou must have : Question_code (the same than export_response with code do) + the good question type (not T, but F (surely here))

ANd maybe add question header ?

Something like this : https://bin.shnoulle.net/?5e2399e6978f526e#x6BHacW85+S0J5kVurGQ/pvtVR0ZFvDcf9Ct19AZadg=

Jorgensj1972

Jorgensj1972

2017-02-22 18:24

reporter   ~43076

yes, sort of like that. It seems that, at least in my case, exportresponses gives " . " not " " If you create a multiple choice question, you should see the same thing I get with your questions.

Jorgensj1972

Jorgensj1972

2017-02-22 18:31

reporter   ~43078

I hope that makes it more clear. If you see below, the problem is better illustrated. One shows "nice" looking text (from list_questions) for the checkboxes (but it doesn't work because it hasn't got the correct code). The other example which is not "nice" DOES work because it is using the right codes which correspond to the data table you get from export_responses

DenisChenu

DenisChenu

2017-02-22 19:34

developer   ~43080

Needed : Add 'code' in list_question with same code than export_responses do.

Issue History

Date Modified Username Field Change
2017-02-22 17:10 Jorgensj1972 New Issue
2017-02-22 17:58 DenisChenu Note Added: 43070
2017-02-22 18:07 Jorgensj1972 Note Added: 43073
2017-02-22 18:17 DenisChenu Note Added: 43074
2017-02-22 18:24 Jorgensj1972 File Added: Screen Shot 2017-02-22 at 5.23.50 pm.png
2017-02-22 18:24 Jorgensj1972 File Added: Screen Shot 2017-02-22 at 5.22.30 pm.png
2017-02-22 18:24 Jorgensj1972 Note Added: 43076
2017-02-22 18:31 Jorgensj1972 File Added: Screen Shot 2017-02-21 at 1.46.12 pm.png
2017-02-22 18:31 Jorgensj1972 File Added: Screen Shot 2017-02-21 at 11.33.48 am.png
2017-02-22 18:31 Jorgensj1972 Note Added: 43078
2017-02-22 19:34 DenisChenu Note Added: 43080
2017-06-08 13:15 arkygeek Issue Monitored: arkygeek