简体   繁体   中英

Tin-can LRS query Statements can not grab my data

I use Tin Can query to grab my scorm.
I want to grab which name = "Ming" but I would show all student....
I use API step by step,I don't know what's wrong?
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. 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. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM