简体   繁体   English

Tin-can LRS 查询语句无法抓取我的数据

[英]Tin-can LRS query Statements can not grab my data

I use Tin Can query to grab my scorm.我使用 Tin Can 查询来获取我的 scorm。
I want to grab which name = "Ming" but I would show all student....我想抓住哪个名字=“Ming”,但我会向所有学生展示....
I use API step by step,I don't know what's wrong?我一步步使用API​​,不知道哪里出了问题?
this is my data:这是我的数据:
资料图片

this is my code:这是我的代码:

    <?php
 
$loader = require '../vendor/autoload.php';

$lrs = new TinCan\RemoteLRS(
    'https://cloud.scorm.com/lrs/SFXXXXX/',
    '1.0.0',
    'accountXXX',
    'PWDXXXX'
);

$actor = new TinCan\Agent(
    ['name'=> '名 小'] 
);

 $response = $lrs->queryStatements(
            [ 'agent' => $actor, 
              'limit' =>8 ,
            ]
 
            );
?>

This is my reference: Tin-can reference这是我的参考: 锡罐参考

please help me,thanks.请帮助我,谢谢。

new:新的:
I change my code to agent,我将代码更改为代理,
but it show:但它显示:

he following 'agent' parameter contains invalid properties: 
'{"objectType":"Group","name":"\u540d \u5c0f"}'

actor is not one of the available query parameters. actor不是可用的查询参数之一。 You would need to use agent , and to filter statements by an Agent you have to provide the IFI, in your case the account value, name is not an acceptable identifier in xAPI so it can't be used as a filter value.您将需要使用agent ,并通过代理过滤语句,您必须提供 IFI,在您的情况下, account值、 name在 xAPI 中不是可接受的标识符,因此它不能用作过滤器值。 The list of available properties matches the set of query string parameters listed in the GET /statements resource here: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#213-get-statements可用属性列表与此处的GET /statements资源中列出的查询字符串参数集相匹配: https : //github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#213-get-statements

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用PHP创建本地LRS并与Tin Can Api集成以在我的SCORM程序包上运行 - How to create a local LRS and intergrate with Tin can Api using PHP to run on my SCORM package 将带有PHP CURL的JSON发布到Tin Can API LRS - Post JSON with PHP CURL to a Tin Can API LRS 锡罐PHP库:查询处理结果 - Tin Can PHP library: processing results of query 锡罐PHP库:Person对象 - Tin Can PHP library: Person object 我无法使用准备好的语句将数据输入到表中 - I can't input the data into my table using prepared statements Facebook活动流与Tin Can API之间有什么关系? - What's the relation between Facebook Activity Streams and the Tin Can API? 我怎样才能只让搜索引擎来获取我的数据,而不能让别人呢? - How can I let only search engines to grab my data but no one else? 从查询中获取数据 - Grab data from a query 如何从我的 AuthController 访问用户数据并成功获取 FileUploadController 中的值? - How can I access user data from my AuthController and grab the value in FileUploadController successfully? jQuery ajax调用返回json数据-很好。 我们如何获取每条数据,以便查询可以对它采取行动? - JQuery ajax call returns json data - good. How do we grab each piece of data so query can act on it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM