3declare(strict_types=1);
42 public function __construct(
int $a_obj_id, ?
object $a_parent_obj,
string $a_parent_cmd, array $a_userSelected, array $a_scosSelected,
string $a_report)
45 $ilCtrl =
$DIC->ctrl();
47 $ilAccess =
$DIC->access();
49 $rbacsystem =
$DIC->rbac();
52 $this->obj_id = $a_obj_id;
53 $this->report = $a_report;
54 $this->scosSelected = $a_scosSelected;
55 $this->userSelected = $a_userSelected;
56 if ($a_parent_cmd ===
"showTrackingItemsBySco") {
59 if ($a_parent_obj !==
null) {
60 $this->lmTitle = $a_parent_obj->getObject()->getTitle();
63 $this->
setId(
'AICC' . $this->report);
66 $this->allowExportPrivacy = $privacy->enabledExportSCORM();
77 if (in_array($l, array(
"status",
"time",
"score"))) {
82 $s = $this->
lng->txt($l);
83 if (substr($l, 0, 14) ===
"interaction_id") {
84 $s = $this->
lng->txt(substr($l, 0, 14)) .
' ' . substr($l, 14);
86 if (substr($l, 0, 17) ===
"interaction_value") {
87 $s = sprintf($this->
lng->txt(substr($l, 0, 17)), substr($l, 17, (strpos($l,
' ') - 17))) . substr($l, strpos($l,
' '));
89 if (substr($l, 0, 23) ===
"interaction_description") {
90 $s = $this->
lng->txt(substr($l, 0, 23)) .
' ' . substr($l, 23);
95 $this->
setRowTemplate(
'tpl.scorm_tracking_items.html',
'Modules/ScormAicc');
96 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
120 switch ($this->report) {
121 case "exportSelectedCore":
124 case "exportSelectedRaw":
127 case "exportSelectedInteractions":
130 case "exportSelectedObjectives":
142 case "exportSelectedSuccess":
164 switch ($this->report) {
165 case "exportSelectedCore":
166 $tr_data = $ilSCORMTrackingItems->exportSelectedCore($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
168 case "exportSelectedRaw":
169 $tr_data = $ilSCORMTrackingItems->exportSelectedRaw($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
171 case "exportSelectedInteractions":
172 $tr_data = $ilSCORMTrackingItems->exportSelectedInteractions($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
174 case "exportSelectedObjectives":
175 $tr_data = $ilSCORMTrackingItems->exportSelectedObjectives($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
177 case "tracInteractionItem":
178 $tr_data = $ilSCORMTrackingItems->tracInteractionItem($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
180 case "tracInteractionUser":
181 $tr_data = $ilSCORMTrackingItems->tracInteractionUser($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
183 case "tracInteractionUserAnswers":
184 $tr_data = $ilSCORMTrackingItems->tracInteractionUserAnswers($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
186 case "exportSelectedSuccess":
187 $tr_data = $ilSCORMTrackingItems->exportSelectedSuccess($this->userSelected, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
211 if (
$id ===
"status") {
213 $path = $icons->getImagePathForStatus((
int) $value);
218 if (
$id ===
"launch_data" ||
$id ===
"suspend_data") {
221 if (is_numeric($value)) {
222 return round((
float)$value, 2);
231 protected function fillRow(array $a_set): void
234 $ilCtrl =
$DIC->ctrl();
237 $this->tpl->setCurrentBlock(
"user_field");
239 $this->tpl->setVariable(
"VAL_UF", $val);
240 $this->tpl->parseCurrentBlock();
249 $a_excel->
setCell($a_row, $cnt, $labels[
$c][
"txt"]);
261 if (
$c !==
'status') {
266 $a_excel->
setCell($a_row, $cnt, $val);
287 if (
$c !==
'status') {
static stableSortArray(array $array, string $a_array_sortby, string $a_array_sortorder="asc", bool $a_numeric=false)
Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which ha...
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
loadLanguageModule(string $a_module)
Load language module.
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
CSV Version of Fill Row.
fillHeaderExcel(ilExcel $a_excel, int &$a_row)
Excel Version of Fill Header.
fillRow(array $a_set)
Fill table row.
fillHeaderCSV(ilCSVWriter $a_csv)
CSV Version of Fill Header.
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
Excel Version of Fill Row.
parseValue(string $id, $value, string $type)
__construct(int $a_obj_id, ?object $a_parent_obj, string $a_parent_cmd, array $a_userSelected, array $a_scosSelected, string $a_report)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static exportSelectedSuccessColumns()
static exportSelectedObjectivesColumns()
static exportSelectedRawColumns()
static exportSelectedCoreColumns(bool $b_orderBySCO, bool $b_allowExportPrivacy)
static exportSelectedInteractionsColumns()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
determineOffsetAndOrder(bool $a_omit_offset=false)
setExportFormats(array $formats)
Set available export formats.
setEnableTitle(bool $a_enabletitle)
setShowTemplates(bool $a_value)
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)
setEnableHeader(bool $a_enableheader)
setDefaultOrderField(string $a_defaultorderfield)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc