19declare(strict_types=1);
34 public const TABLE_ID =
'cmix_statements_table';
38 private \ILIAS\DI\Container
$dic;
51 $DIC->language()->loadLanguageModule(
'cmix');
56 $this->
setId(self::TABLE_ID);
59 $DIC->language()->loadLanguageModule(
'form');
61 $this->
setFormAction($DIC->ctrl()->getFormAction($a_parent_obj, $a_parent_cmd));
62 $this->
setRowTemplate(
'tpl.cmix_statements_table_row.html',
'components/ILIAS/CmiXapi');
64 #$this->setTitle($DIC->language()->txt('tbl_statements_header'));
65 #$this->setDescription($DIC->language()->txt('tbl_statements_header_info'));
81 if ($this->isMultiActorReport) {
93 if ($this->isMultiActorReport) {
95 $ti->setDataSource($this->dic->ctrl()->getLinkTarget($this->parent_obj,
'asyncUserAutocomplete',
'',
true));
96 $ti->setMaxLength(64);
99 $ti->readFromSession();
100 $this->
filter[
"actor"] = $ti->getValue();
104 if (strtolower($this->
ctrl->getCmdClass()) ==
"illticonsumerxapistatementsgui") {
107 $verbs = $this->parent_obj->getVerbs();
111 $si->readFromSession();
112 $this->
filter[
"verb"] = $si->getValue();
115 $dp->setShowTime(
true);
117 $dp->readFromSession();
118 $this->
filter[
"period"] = $dp->getValue();
121 protected function fillRow(array $a_set): void
123 $r = $this->dic->ui()->renderer();
124 $a_set[
'rowkey'] = md5(serialize($a_set[
'statement']));
132 $this->tpl->setVariable(
'STMT_DATE', $date);
134 if ($this->isMultiActorReport) {
135 $actor = $a_set[
'actor'];
137 $this->tpl->setVariable(
'STMT_ACTOR',
'user_not_found');
139 $this->tpl->setVariable(
'STMT_ACTOR', $this->
getUsername($a_set[
'actor']));
148 $this->tpl->setVariable(
'STMT_OBJECT', $a_set[
'object']);
149 $this->tpl->setVariable(
'STMT_OBJECT_INFO', $a_set[
'object_info']);
150 $this->tpl->setVariable(
'ACTIONS', $r->render($actionsList));
151 $this->tpl->setVariable(
'RAW_DATA_MODAL', $r->render($rawDataModal));
156 $f = $this->dic->ui()->factory();
158 return $f->dropdown()->standard([
160 $this->language->txt(
'tbl_action_raw_data'),
163 ])->withLabel($this->
language->txt(
'actions'));
168 $f = $this->dic->ui()->factory();
170 return $f->modal()->roundtrip(
172 $f->legacy()->content(
'<pre>' .
$data[
'statement'] .
'</pre>')
173 )->withCancelButtonLabel($this->
language->txt(
'close'));
181 $ret = $userObj->getFullname();
182 }
catch (Exception
$e) {
183 $ret = $this->
language->txt(
'deleted_user');
static fromXapiTimestamp(string $xapiTimestamp)
getActionsList(RoundTrip $rawDataModal, array $data)
getUsername(ilCmiXapiUser $cmixUser)
getRawDataModal(array $data)
fillRow(array $a_set)
Standard Version of Fill Row.
__construct(?object $a_parent_obj, string $a_parent_cmd, bool $isMultiActorReport)
static getVerbTranslation(ilLanguage $lng, string $verb)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setExternalSegmentation(bool $a_val)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setDefaultOrderField(string $a_defaultorderfield)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
This class represents a text property in a property form.
getShowSignal()
Get the signal to show this modal in the frontend.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.