44 if (!$this->access->hasStatementsAccess()) {
48 switch ($DIC->ctrl()->getNextClass($this)) {
50 $cmd = $DIC->ctrl()->getCmd(
'show') .
'Cmd';
58 $table->resetFilter();
59 $table->resetOffset();
66 $table->writeFilterToSession();
67 $table->resetOffset();
79 $statementsFilter->setActivityId($this->object->getActivityId());
88 $table->setData(array());
89 $table->setMaxCount(0);
90 $table->resetOffset();
93 $DIC->ui()->mainTemplate()->setContent($table->getHTML());
110 if ($this->access->hasOutcomesAccess()) {
112 if (strlen($actor)) {
115 $filter->
setActor(
new ilCmiXapiUser($this->object->getId(), $usrId, $this->
object->getPrivacyIdent()));
118 "given actor ({$actor}) is not a valid actor for object ({$this->object->getId()})" 123 $filter->
setActor(
new ilCmiXapiUser($this->object->getId(), $DIC->user()->getId(), $this->
object->getPrivacyIdent()));
140 if ($period->getStartXapiDateTime()) {
144 if ($period->getEndXapiDateTime()) {
145 $filter->
setEndDate($period->getEndXapiDateTime());
153 $auto->setResultField(
'login');
154 $auto->enableFieldSearchableCheck(
true);
155 $auto->setMoreLinkAvailable(
true);
172 if ($this->access->hasOutcomesAccess()) {
180 $usrId = $DIC->user()->getId();
190 $this->object->getLrsType()->getLrsEndpointStatementsAggregationLink(),
195 $this->object->getLrsType()->getBasicAuth(),
198 $statementsReport = $request->queryReport($this->
object);
199 $data = $statementsReport->getTableData();
201 $table->
setMaxCount($statementsReport->getMaxCount());
209 $isMultiActorReport = $this->access->hasOutcomesAccess();
211 $table->setFilterCommand(
'applyFilter');
212 $table->setResetCommand(
'resetFilter');
220 $lrsType = $this->
object->getLrsType();
223 $defaultLrs = $lrsType->getLrsEndpointStatementsAggregationLink();
225 $defaultBasicAuth = $lrsType->getBasicAuth();
228 'X-Experience-API-Version' =>
'1.0.3',
229 'Authorization' => $defaultBasicAuth,
230 'Cache-Control' =>
'no-cache, no-store, must-revalidate' 242 $defaultVerbsUrl = $defaultLrs .
"?pipeline=" . urlencode($pipeline);
247 GuzzleHttp\RequestOptions::VERIFY =>
true,
248 GuzzleHttp\RequestOptions::CONNECT_TIMEOUT => 10,
249 GuzzleHttp\RequestOptions::HTTP_ERRORS =>
false 258 $promises[
'defaultVerbs'] =
$client->sendAsync($defaultVerbsRequest, $req_opts);
260 $responses = GuzzleHttp\Promise\Utils::settle($promises)->wait();
264 return json_decode($body, JSON_OBJECT_AS_ARRAY);
266 $this->log()->error(
'error:' . $e->getMessage());
279 $match[
'statement.object.objectType'] =
'Activity';
280 $match[
'statement.actor.objectType'] =
'Agent';
282 $activityId = array();
286 $activityId[
'statement.context.extensions.https://ilias&46;de/cmi5/activityid'] = $this->
object->getActivityId();
289 '$regex' =>
'^' . preg_quote($this->object->getActivityId()) .
'' 291 $activityId[
'$or'] = [];
292 $activityId[
'$or'][] = [
'statement.object.id' => $activityQuery];
293 $activityId[
'$or'][] = [
'statement.context.contextActivities.parent.id' => $activityQuery];
296 $match[
'$and'][] = $activityId;
299 $sort[
'statement.verb.id'] = 1;
302 $group = array(
'_id' =>
'$statement.verb.id');
306 $pipeline[] = array(
'$match' => $match);
307 $pipeline[] = array(
'$group' => $group);
308 $pipeline[] = array(
'$sort' => $sort);
__construct(ilObjCmiXapi $object)
static getUserIdByLogin($a_login)
static getInstance(ilObjCmiXapi $object)
static getUsersForObject($objId, $asUsrId=false)
initActorFilter(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
initVerbFilter(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
initTableData(ilCmiXapiStatementsTableGUI $table, ilCmiXapiStatementsReportFilter $filter)
setOrderDirection($orderDirection)
resetOffset($a_in_determination=false)
Reset offset.
if($_SERVER['argc']< 4) $client
getFilterItemByPostVar($a_post_var)
asyncUserAutocompleteCmd()
getOrderDirection()
Get order direction.
initPeriodFilter(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
initLimitingAndOrdering(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setOrderField($orderField)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
static checkResponse($response, &$body, $allowedStatus=[200, 204])
setSearchFields($a_fields)
Set searchable fields.
setMaxCount($a_max_count)
set max.