Dear,
Thanks in advance. Sad to hear this can't be done with a few simple calls. For me it sounds like the basics of a survey application:
export it's surveys, with it's questions and answers.
This way I could create a survey using my favorite JS framework for the frontend development instead of creating a LS theme which I can not control 100%.
Let's say I am no longer interested in the question's answers, I should be able to help myself with the list_questions RPC method right ?
I'm having an issue with this RPC method.
This method has 4 parameters
- sSessionKey: required
- iSurveyID: required
- iGroupID: optional
- sLanguage: optional
I now have different scenario's how I call this method:
- Only supply sSessionKey and iSurveyI
I get the expected result: all questions for all groups in the default language ('fr' in my case).
- Supply sSessionKey, iSurveyID and sLanguage='fr': I get the following exception: CDbCommand failed to execute the SQL statement: SQLSTATE[22018]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value 'fr' to data type int.
Wow, why is it trying to cast the 'fr' part to an int ?
- Supply sSessionKey, iSurveyID and iGroupID=24: I get the expected result: all question for group 24 in the default language ('fr' in my case)
- Supply sSessionKey, iSurveyID sLanguage='fr' and iGroupID=24: I get the "status": "Error: Invalid language"
Wow, why is 'fr' an invalid language ?
So whenever sLanguage is involved in the call, there's an issue.
I've digged abit into the source code, but I'm not a PHP developer so sadly I didn't manage to debug it.
Apart from the above issues, I'm wondering whether 'fr' (= language short code) is to be used ? It is the exact same value as the language column in the lime_questions table.