how use method get_question_properties (remote control)

More
4 years 1 month ago #98707 by mattias01
mattias01 created the topic: how use method get_question_properties (remote control)
get_question_properties try to use the method, but it throws an error, and step parameters to use?

 
require_once('app/lib/jsonRPCClient/jsonRPCClient.php');
define( 'LS_BASEURL', 'http://mysurvey.com/');  // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'admin');
define( 'LS_PASSWORD', 'admin');
// la encuesta a procesar
$survey_id	= 1111;
 
$ws = new jsonRPCClient(LS_BASEURL.'/admin/remotecontrol');
// recibir session key
$sessionKey = $ws->get_session_key(LS_USER, LS_PASSWORD);
 
$groups = $ws->list_participants($sessionKey, $survey_id);
 
$list_questions = $ws->list_questions($sessionKey, $survey_id);
$get_question_properties = $ws->get_question_properties($sessionKey, $survey_id, );
 
 
$ws->release_session_key($sessionKey);
 
var_dump($get_question_properties);
 


the error occurred, of var_dump

array(1) { ["status"]=> string(25) "Error: Invalid questionid" }


regards

Please Log in to join the conversation.

More
4 years 1 month ago #98712 by mdekker
mdekker replied the topic: how use method get_question_properties (remote control)
manual.limesurvey.org/RemoteControl_2_AP..._question_properties

According to that (I did not check) you should also pass the question ID and an array of properties you would like to get returned. When you don't pass a question id I think it assumes a null value that would be invalid.

---
Menno Dekker

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now