3 declare(strict_types=1);
40 public function __construct(
int $a_obj_id, ?
object $a_parent_obj,
string $a_parent_cmd, array $a_userSelected, array $a_scosSelected,
string $a_report)
43 $ilCtrl = $DIC->ctrl();
44 $lng = $DIC->language();
45 $ilAccess = $DIC->access();
46 $lng = $DIC->language();
47 $rbacsystem = $DIC->rbac();
50 $this->obj_id = $a_obj_id;
51 $this->report = $a_report;
52 $this->scosSelected = $a_scosSelected;
53 $this->userSelected = $a_userSelected;
54 if ($a_parent_cmd ===
"showTrackingItemsBySco") {
57 if ($a_parent_obj !== null) {
58 $this->lmTitle = $a_parent_obj->getObject()->getTitle();
61 $this->
setId(
'AICC' . $this->report);
64 $this->allowExportPrivacy = $privacy->enabledExportSCORM();
75 if (in_array($l, array(
"status",
"time",
"score"))) {
80 $s = $this->
lng->txt($l);
81 if (substr($l, 0, 14) ===
"interaction_id") {
82 $s = $this->
lng->txt(substr($l, 0, 14)) .
' ' . substr($l, 14);
84 if (substr($l, 0, 17) ===
"interaction_value") {
85 $s = sprintf($this->
lng->txt(substr($l, 0, 17)), substr($l, 17, (strpos($l,
' ') - 17))) . substr($l, strpos($l,
' '));
87 if (substr($l, 0, 23) ===
"interaction_description") {
88 $s = $this->
lng->txt(substr($l, 0, 23)) .
' ' . substr($l, 23);
93 $this->
setRowTemplate(
'tpl.scorm_tracking_items.html',
'Modules/ScormAicc');
94 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
118 switch ($this->report) {
119 case "exportSelectedCore":
122 case "exportSelectedRaw":
125 case "exportSelectedInteractions":
128 case "exportSelectedObjectives":
140 case "exportSelectedSuccess":
156 $lng = $DIC->language();
162 switch ($this->report) {
163 case "exportSelectedCore":
164 $tr_data = $ilSCORMTrackingItems->exportSelectedCore($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
166 case "exportSelectedRaw":
167 $tr_data = $ilSCORMTrackingItems->exportSelectedRaw($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
169 case "exportSelectedInteractions":
170 $tr_data = $ilSCORMTrackingItems->exportSelectedInteractions($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
172 case "exportSelectedObjectives":
173 $tr_data = $ilSCORMTrackingItems->exportSelectedObjectives($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
175 case "tracInteractionItem":
176 $tr_data = $ilSCORMTrackingItems->tracInteractionItem($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
178 case "tracInteractionUser":
179 $tr_data = $ilSCORMTrackingItems->tracInteractionUser($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
181 case "tracInteractionUserAnswers":
182 $tr_data = $ilSCORMTrackingItems->tracInteractionUserAnswers($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
184 case "exportSelectedSuccess":
185 $tr_data = $ilSCORMTrackingItems->exportSelectedSuccess($this->userSelected, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
200 protected function parseValue(
string $id,
string|
float|
int|null $value,
string $type): string|float|
int|null
203 $lng = $DIC->language();
205 if ($id ===
"status") {
207 $path = $icons->getImagePathForStatus((
int) $value);
212 if ($id ===
"launch_data" || $id ===
"suspend_data") {
215 if (is_numeric($value)) {
216 return round((
float)$value, 2);
225 protected function fillRow(array $a_set): void
228 $ilCtrl = $DIC->ctrl();
229 $lng = $DIC->language();
231 $this->tpl->setCurrentBlock(
"user_field");
232 $val = $this->
parseValue($c, $a_set[$c],
"scormtrac");
233 $this->tpl->setVariable(
"VAL_UF", $val);
234 $this->tpl->parseCurrentBlock();
243 $a_excel->
setCell($a_row, $cnt, $labels[$c][
"txt"]);
251 $lng = $DIC->language();
255 if ($c !==
'status') {
256 $val = $this->
parseValue($c, $a_set[$c],
"user");
260 $a_excel->
setCell($a_row, $cnt, $val);
278 $lng = $DIC->language();
281 if ($c !==
'status') {
282 $val = $this->
parseValue($c, $a_set[$c],
"user");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillHeaderExcel(ilExcel $a_excel, int &$a_row)
static exportSelectedRawColumns()
setExportFormats(array $formats)
Set available export formats.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_form_action, bool $a_multipart=false)
setEnableTitle(bool $a_enabletitle)
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
setShowTemplates(bool $a_value)
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
static exportSelectedCoreColumns(bool $b_orderBySCO, bool $b_allowExportPrivacy)
loadLanguageModule(string $a_module)
Load language module.
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.
static exportSelectedInteractionsColumns()
static exportSelectedSuccessColumns()
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setExternalSorting(bool $a_val)
setDefaultOrderField(string $a_defaultorderfield)
__construct(int $a_obj_id, ?object $a_parent_obj, string $a_parent_cmd, array $a_userSelected, array $a_scosSelected, string $a_report)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
static exportSelectedObjectivesColumns()
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
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...
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
fillRow(array $a_set)
Fill table row.
fillHeaderCSV(ilCSVWriter $a_csv)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parseValue(string $id, string|float|int|null $value, string $type)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)