19 declare(strict_types=1);
42 private \ILIAS\DI\Container
$dic;
48 $this->main_tpl = $DIC->ui()->mainTemplate();
61 if (!$this->
access->hasStatementsAccess()) {
65 switch ($DIC->ctrl()->getNextClass($this)) {
67 $cmd = $DIC->ctrl()->getCmd(
'show') .
'Cmd';
75 $table->resetFilter();
76 $table->resetOffset();
83 $table->writeFilterToSession();
84 $table->resetOffset();
97 $statementsFilter->setActivityId($this->
object->getActivityId());
105 $this->main_tpl->setOnScreenMessage(
'failure', $e->getMessage());
106 $table->setData(array());
107 $table->setMaxCount(0);
108 $table->resetOffset();
111 $DIC->ui()->mainTemplate()->setContent($table->getHTML());
129 if ($this->
access->hasOutcomesAccess()) {
132 if (strlen($actor)) {
139 "given actor ({$actor}) is not a valid actor for object ({$this->object->getId()})" 144 $filter->
setActor(
new ilCmiXapiUser($this->
object->getId(), $DIC->user()->getId(), $this->
object->getProvider()->getPrivacyIdent()));
161 if ($period->getStartXapiDateTime()) {
165 if ($period->getEndXapiDateTime()) {
166 $filter->
setEndDate($period->getEndXapiDateTime());
174 $auto->setResultField(
'login');
175 $auto->enableFieldSearchableCheck(
true);
176 $auto->setMoreLinkAvailable(
true);
180 if ($this->dic->http()->wrapper()->query()->has(
'term')) {
181 $term = $this->dic->http()->wrapper()->query()->retrieve(
'term', $this->dic->refinery()->kindlyTo()->string());
182 } elseif ($this->dic->http()->wrapper()->post()->has(
'term')) {
183 $term = $this->dic->http()->wrapper()->post()->retrieve(
'term', $this->dic->refinery()->kindlyTo()->string());
187 echo json_encode($result);
194 $aggregateEndPointUrl = str_replace(
196 'api/statements/aggregate',
197 $this->
object->getProvider()->getXapiLaunchUrl()
202 $aggregateEndPointUrl,
207 $this->
object->getProvider()->getXapiLaunchKey(),
208 $this->
object->getProvider()->getXapiLaunchSecret()
216 $statementsReport = $request->queryReport($this->
object->getId());
217 $table->
setData($statementsReport->getTableData());
218 $table->
setMaxCount($statementsReport->getMaxCount());
223 $isMultiActorReport = $this->
access->hasOutcomesAccess();
226 $table->setFilterCommand(
'applyFilter');
227 $table->setResetCommand(
'resetFilter');
setActor(\ilCmiXapiUser $actor)
initTableData(ilCmiXapiStatementsTableGUI $table, ilCmiXapiStatementsReportFilter $filter)
initLimitingAndOrdering(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
__construct(ilObjLTIConsumer $object)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
ilLTIConsumerAccess $access
setEndDate(\ilCmiXapiDateTime $endDate)
initActorFilter(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
initPeriodFilter(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
static getInstance(ilObjLTIConsumer $object)
asyncUserAutocompleteCmd()
getFilterItemByPostVar(string $a_post_var)
static getUserIdByLogin(string $a_login)
setStartDate(\ilCmiXapiDateTime $startDate)
static buildBasicAuth($lrsKey, $lrsSecret)
setSearchFields(array $a_fields)
Set searchable fields.
setOrderDirection(string $orderDirection)
initVerbFilter(ilCmiXapiStatementsReportFilter $filter, ilCmiXapiStatementsTableGUI $table)
ilGlobalTemplateInterface $main_tpl
setOrderField(string $orderField)
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
determineOffsetAndOrder(bool $a_omit_offset=false)
setMaxCount(int $a_max_count)
set max.