View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
08658Bug reportsRemoteControlpublic2014-02-04 13:32
Reportermasciugo Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08658: get_participant_properties RPC Routine returns incorrect response
Description

Running attached script (test.php) on limesurvey setup (JSON-RPC enabled) produced a wrong response:

Array
(
[tid] => 0
[token] => 1
[completed] => 2
[participant_id] => 3
[language] => 4
[usesleft] => 5
[firstname] => 6
[blacklisted] => 7
[validfrom] => 8
[lastname] => 9
[sent] => 10
[validuntil] => 11
[email] => 12
[remindersent] => 13
[mpid] => 14
[emailstatus] => 15
[remindercount] => 16
)

Additional Information

doing the same on the current demo (version 2.00) returns the expected result:

Array
(
[tid] => 1
[token] =>
[completed] => N
[participant_id] =>
[language] => en
[usesleft] => 1
[firstname] => Vishal
[blacklisted] =>
[validfrom] =>
[lastname] => Sharma
[sent] => N
[validuntil] =>
[email] => vishal.n.sharma@ril.com
[remindersent] => N
[mpid] =>
[emailstatus] => OK
[remindercount] => 0
)

TagsNo tags attached.
Attached Files
test.php (1,567 bytes)   
<?php

require_once './jsonrpcphp/includes/jsonRPCClient.php';

// define( 'LS_BASEURL', 'http://172.21.156.16/limesurvey/index.php');  // adjust this one to your actual LimeSurvey URL
define( 'LS_BASEURL', 'http://demo.limesurvey.org/index.php');  // adjust this one to your actual LimeSurvey URL

// define( 'LS_USER', 'rails_user' );
define( 'LS_USER', 'admin' );

// define( 'LS_PASSWORD', 'limoncello' );
define( 'LS_PASSWORD', 'test' );

// the survey to process

// $survey_id=545515;
$survey_id=367177;

// instanciate a new client

// $myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/admin/remotecontrol' );
$myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'?r=admin/remotecontrol' );

// receive session key

$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );

$aTokenProperties = ['tid','token','completed','participant_id','language','usesleft','firstname','blacklisted','validfrom','lastname','sent','validuntil','email','remindersent','mpid','emailstatus','remindercount'];

// print_r($aTokenProperties, null );
// $result = $myJSONRPCClient->get_participant_properties( $sessionKey, 545515, 1, $aTokenProperties );
// $result = $myJSONRPCClient->get_participant_properties( $sessionKey, 545515, 5, ['tid','token'] );
$result = $myJSONRPCClient->get_participant_properties( $sessionKey, 157162, 1, $aTokenProperties );
// $result = $myJSONRPCClient->get_survey_properties( $sessionKey, 367177, ['sid','language'] );

print_r($result, null );

// release the session key

$myJSONRPCClient->release_session_key( $sessionKey );

?>
test.php (1,567 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)140131
I will donate to the project if issue is resolvedNo
Browserchrome Version 32.0.1700.102
Database type & versionmysql 5.1.71
Server OS (if known)Linux 2.6.32-431.el6.x86_64
Webserver software & version (if known)httpd-2.2.15-29.el6.centos.x86_64
PHP Version5.3.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2014-02-04 12:59

administrator   ~28485

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=13839

c_schmitz

c_schmitz

2014-02-04 13:32

administrator   ~28489

Version 2.05+ Build 140204 released

Related Changesets

LimeSurvey: master 95ef6d40

2014-02-04 11:58:59

c_schmitz

Details Diff
Fixed issue 08658: get_participant_properties RemoteControl API function returns incorrect response Affected Issues
08658
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2014-02-04 12:45 masciugo New Issue
2014-02-04 12:45 masciugo File Added: test.php
2014-02-04 12:58 c_schmitz Assigned To => c_schmitz
2014-02-04 12:58 c_schmitz Status new => assigned
2014-02-04 12:59 c_schmitz Status assigned => resolved
2014-02-04 12:59 c_schmitz Fixed in Version => 2.05+
2014-02-04 12:59 c_schmitz Resolution open => fixed
2014-02-04 12:59 c_schmitz Changeset attached => LimeSurvey master 95ef6d40
2014-02-04 12:59 c_schmitz Note Added: 28485
2014-02-04 13:32 c_schmitz Note Added: 28489
2014-02-04 13:32 c_schmitz Status resolved => closed