- Posts: 26
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
limer_call_limer(method = "get_question_properties", params = list(iQuestionID = 65056))
{ "qid": "65056", "parent_qid": "0", "sid": "361177", "gid": "4184", "type": "1", "title": "P26", "question": "Tabela dwóch skal", "preg": "", "help": "", "other": "N", "mandatory": "N", "question_order": "8", "language": "pl", "scale_id": "0", "same_default": "0", "relevance": "1", "modulename": , "available_answers": { "1": "Sub1", "2": "Sub2", "3": "Sub3" }, "subquestions": { "65110": { "title": "1", "question": "Sub1", "scale_id": "0" }, "65111": { "title": "2", "question": "Sub2", "scale_id": "0" }, "65112": { "title": "3", "question": "Sub3", "scale_id": "0" } }, "attributes": "No available attributes", "attributes_lang": "No available attributes", "answeroptions": { "1": { "answer": "Odp21", "assessment_value": "0", "scale_id": "1", "order": "1" }, "2": { "answer": "Odp22", "assessment_value": "0", "scale_id": "1", "order": "2" }, "3": { "answer": "Odp23", "assessment_value": "0", "scale_id": "1", "order": "3" } }, "defaultvalue": }
Please Log in to join the conversation.
Array ( [S11] => Array ( [answer] => Scale 1, answer 1 [assessment_value] => 0 [scale_id] => 0 [order] => 0 ) [S12] => Array ( [answer] => Scale 1, answer 2 [assessment_value] => 0 [scale_id] => 0 [order] => 1 ) [S13] => Array ( [answer] => Scale 1, answer 3 [assessment_value] => 0 [scale_id] => 0 [order] => 2 ) [S21] => Array ( [answer] => Scale 2, answer 1 [assessment_value] => 0 [scale_id] => 1 [order] => 3 ) [S22] => Array ( [answer] => Scale 2, answer 2 [assessment_value] => 0 [scale_id] => 1 [order] => 4 ) [S23] => Array ( [answer] => Scale 2, answer 3 [assessment_value] => 0 [scale_id] => 1 [order] => 5 ) )
<?php require_once 'jsonRPCClient.php'; define( 'LS_BASEURL', 'https://pathTo/limeSurvey'); define( 'LS_USER', 'admin' ); define( 'LS_PASSWORD', 'password' ); $iSurveyID = 616292; $iQuestionID = 8621; if(ctype_alnum($iSurveyID) && (strlen($iSurveyID) == 5 || strlen($iSurveyID) == 6)) { // Valid SID format // Instantiate a new RPC client $myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/index.php/admin/remotecontrol' ); // Get a session key $sSessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD ); if(is_array($sSessionKey)) { // Invalid session echo $sSessionKey['status']; } else if($sSessionKey) { // Valid session $questionProperties = $myJSONRPCClient->get_question_properties($sSessionKey, $iQuestionID); print_r($questionProperties['answeroptions']); echo '<br /><br />'; } // Release the session key $myJSONRPCClient->release_session_key( $sSessionKey ); } else { // Invalid SID format die( 'Invalid format!' ); } ?>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.