3 declare(strict_types=1);
34 public const TABLE_ID =
'cmix_statements_table';
38 private \ILIAS\DI\Container
$dic;
47 public function __construct(?
object $a_parent_obj,
string $a_parent_cmd,
bool $isMultiActorReport)
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',
'Modules/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(
'<pre>' . $data[
'statement'] .
'</pre>')
173 )->withCancelButtonLabel(
'close');
181 $ret = $userObj->getFullname();
183 $ret = $this->
language->txt(
'deleted_user');
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
getShowSignal()
Get the signal to show this modal in the frontend.
Class ChatMainBarProvider .
getActionsList(RoundTrip $rawDataModal, array $data)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
__construct(?object $a_parent_obj, string $a_parent_cmd, bool $isMultiActorReport)
static fromXapiTimestamp(string $xapiTimestamp)
setExternalSorting(bool $a_val)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
getRawDataModal(array $data)
static getVerbTranslation(ilLanguage $lng, string $verb)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
getUsername(ilCmiXapiUser $cmixUser)
__construct(Container $dic, ilPlugin $plugin)
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)
setExternalSegmentation(bool $a_val)