【问题标题】:How to add a user to Limesurvey through RemoteControl 2?如何通过 RemoteControl 2 将用户添加到 Limesurvey?
【发布时间】:2015-05-27 12:16:07
【问题描述】:

有没有办法通过 RemoteControl2-API 将用户添加到 Limesurvey?我想以编程方式添加属于该用户的用户和调查。

【问题讨论】:

标签: json-rpc limesurvey


【解决方案1】:

您可以使用limesurvey远程控制API的add_participants函数添加用户。 你可以看到我是如何使用它的: // 没有 composer 这条线可以使用 include_once("../../lib/jsonrpcphp/JsonRPCClient.php");

    //Get Session parameters
    $myJSONRPCClient = new JsonRPCClient( LS_BASEURL );
    $sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );

    $aParticipantData = array(
        'user'=>array('firstname'=>'Christopher',
                'lastname'=>'hitchens',
                'email'=>'christopher@example.com',
                'language'=>'en',
                'emailstatus'=>'ok'),
        );

    $added_user = $myJSONRPCClient->add_participants($sessionKey, $survey_id, $aParticipantData, 1);
    $myJSONRPCClient->release_session_key($sessionKey );

当用户想要注册该调查时,您可以使用此代码。

如果提供更多有关问题的信息会更好。 您可以通过此链接获得更多信息:http://code.uoa.gr/p/limesurvey/test_scenarios.php

【讨论】:

  • 我不想将参与者添加到现有调查中。我想向 LimeSurvey 添加一个新用户。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-11-26
  • 2017-08-11
  • 2014-09-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多