cloudyr / limer

A LimeSurvey R Client
MIT License
67 stars 36 forks source link

Base language for get_responses should be default=all #16

Closed tammoterhark closed 7 years ago

tammoterhark commented 7 years ago

Currently when you want to get_responses from a limesurvey survey, you get by default only the english responses.

In order to accommodate all users in an equal way, I would suggest to specify that you get all languages, unless you specify a language.

I guess that specifying sLanguangeCode = "" in get_responses.R will do the trick.

Jan-E commented 7 years ago

Currently when you want to get_responses from a limesurvey survey, you get by default only the english responses.

After the merge of https://github.com/cloudyr/limer/pull/13 the argument is NULL now. Then it returns the BaseLanguageFromSurveyID: https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/remotecontrol/remotecontrol_handle.php#L2451

I guess that specifying sLanguangeCode = "" in get_responses.R will do the trick.

empty("") is true (see http://php.net/empty ), so my guess is that sLanguangeCode = "" will still return the BaseLanguageFromSurveyID. NULL or "" do not make any difference for

if (empty($sLanguageCode)) $sLanguageCode=getBaseLanguageFromSurveyID($iSurveyID);

tammoterhark commented 7 years ago

Turns out to be a LS thing. I will ask for changes there...