Welcome, Guest
Username: Password: Remember me

TOPIC: how use method get_question_properties (remote control)

how use method get_question_properties (remote control) 11 months 3 weeks ago #98707

  • mattias
  • mattias's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 77
  • Karma: 1
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
The administrator has disabled public write access.

how use method get_question_properties (remote control) 11 months 3 weeks ago #98712

  • mdekker
  • mdekker's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 341
  • Thank you received: 68
  • Karma: 38
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
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.148 seconds
Donation Image