【发布时间】:2016-11-14 21:53:53
【问题描述】:
我正在尝试使用 TinCanPHP 查询存储在 Learning Locker 中的语句,但我只想检索在特定时间间隔内生成的语句。比如我想要今天生成的所有语句。
我该怎么做?
【问题讨论】:
标签: php tin-can-api lrs learning-locker
我正在尝试使用 TinCanPHP 查询存储在 Learning Locker 中的语句,但我只想检索在特定时间间隔内生成的语句。比如我想要今天生成的所有语句。
我该怎么做?
【问题讨论】:
标签: php tin-can-api lrs learning-locker
试试这个:
$LRSResponse = $LRS->queryStatements(['since' => '2016-11-15', 'ascending' => false]); // change to 'true', or omit, for ascending dates
$StatementsResult = $LRSResponse->content;
$array_of_Statement_objects = $StatementsResult->getStatements();
foreach ($array_of_Statement_objects as $extracted_Statement_object){
// deal with statements as necessary
}
unset($extracted_Statement_object);
【讨论】:
until 参数,并且不应该包含 ascending 标志,除非您想要它们那个命令。请注意,这是语句的stored 顺序不是 timestamp 顺序。
$LRSResponse = $lrs->queryStatements(['since' => '2016-11-14T20:19:08+01:00', 'ascending' => false]);