4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItems.php';
26 public function __construct($a_obj_id, $a_parent_obj, $a_parent_cmd, $a_userSelected, $a_scosSelected, $a_report)
29 $lng->loadLanguageModule(
"scormtrac");
31 $this->obj_id = $a_obj_id;
32 $this->report = $a_report;
33 $this->scosSelected=$a_scosSelected;
34 $this->userSelected=$a_userSelected;
35 if ($a_parent_cmd ==
"showTrackingItemsBySco") {
38 $this->lmTitle = $a_parent_obj->object->getTitle();
40 $this->
setId(
'AICC' . $this->report);
41 parent::__construct($a_parent_obj, $a_parent_cmd);
44 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
46 $this->allowExportPrivacy = $privacy->enabledExportSCORM();
57 if (in_array(
$l,
array(
"status",
"time",
"score"))) {
62 $s = $this->lng->txt(
$l);
63 if (substr(
$l, 0, 14) ==
"interaction_id") {
64 $s = $this->lng->txt(substr(
$l, 0, 14)) .
' ' . substr(
$l, 14);
66 if (substr(
$l, 0, 17) ==
"interaction_value") {
67 $s = sprintf($this->lng->txt(substr(
$l, 0, 17)), substr(
$l, 17, (strpos(
$l,
' ')-17))) . substr(
$l, strpos(
$l,
' '));
69 if (substr(
$l, 0, 23) ==
"interaction_description") {
70 $s = $this->lng->txt(substr(
$l, 0, 23)) .
' ' . substr(
$l, 23);
75 $this->
setRowTemplate(
'tpl.scorm_tracking_items.html',
'Modules/ScormAicc');
76 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
102 switch ($this->report) {
103 case "exportSelectedCore":
106 case "exportSelectedRaw":
109 case "exportSelectedInteractions":
112 case "exportSelectedObjectives":
115 case "tracInteractionItem":
116 $cols=ilSCORMTrackingItems::tracInteractionItemColumns($this->bySCO, $this->allowExportPrivacy);
118 case "tracInteractionUser":
119 $cols=ilSCORMTrackingItems::tracInteractionUserColumns($this->bySCO, $this->allowExportPrivacy);
121 case "tracInteractionUserAnswers":
122 $cols=ilSCORMTrackingItems::tracInteractionUserAnswersColumns($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy);
124 case "exportSelectedSuccess":
148 switch ($this->report) {
149 case "exportSelectedCore":
150 $tr_data = $ilSCORMTrackingItems->exportSelectedCore($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
152 case "exportSelectedRaw":
153 $tr_data = $ilSCORMTrackingItems->exportSelectedRaw($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
155 case "exportSelectedInteractions":
156 $tr_data = $ilSCORMTrackingItems->exportSelectedInteractions($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
158 case "exportSelectedObjectives":
159 $tr_data = $ilSCORMTrackingItems->exportSelectedObjectives($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
161 case "tracInteractionItem":
162 $tr_data = $ilSCORMTrackingItems->tracInteractionItem($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
164 case "tracInteractionUser":
165 $tr_data = $ilSCORMTrackingItems->tracInteractionUser($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
167 case "tracInteractionUserAnswers":
168 $tr_data = $ilSCORMTrackingItems->tracInteractionUserAnswers($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
170 case "exportSelectedSuccess":
171 $tr_data = $ilSCORMTrackingItems->exportSelectedSuccess($this->userSelected, $this->allowExportPrivacy, $this->
getObjId());
176 include_once
"Services/Utilities/classes/class.ilStr.php";
185 $lng->loadLanguageModule(
"trac");
188 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
195 if (
$id==
"launch_data" ||
$id==
"suspend_data") {
198 if (is_numeric($value)) {
199 return round($value, 2);
210 $this->tpl->setCurrentBlock(
"user_field");
212 $this->tpl->setVariable(
"VAL_UF", $val);
213 $this->tpl->parseCurrentBlock();
222 $worksheet->
setCell($a_row, $cnt, $labels[$c][
"txt"]);
230 $lng->loadLanguageModule(
"trac");
231 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
234 if ($c !=
'status') {
235 $val = $this->
parseValue($c, $a_set[$c],
"user");
239 $worksheet->
setCell($a_row, $cnt, $val);
248 $a_csv->addColumn($labels[$c][
"txt"]);
257 $lng->loadLanguageModule(
"trac");
258 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
260 if ($c !=
'status') {
261 $val = $this->
parseValue($c, $a_set[$c],
"user");
265 $a_csv->addColumn($val);
parseValue($id, $value, $type)
Class ilSCORMTrackingItemsTableGUI.
static exportSelectedRawColumns()
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
fillRow($data)
Fill table row.
static _getImagePathForStatus($a_status)
Get image path for status.
setShowTemplates($a_value)
Toggle templates.
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
if(!array_key_exists('StateId', $_REQUEST)) $id
static exportSelectedInteractionsColumns()
static exportSelectedSuccessColumns()
getOrderDirection()
Get order direction.
static exportSelectedCoreColumns($b_orderBySCO, $b_allowExportPrivacy)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static stableSortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false)
Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which ha...
fillRowExcel(ilExcel $worksheet, &$a_row, $a_set)
static exportSelectedObjectivesColumns()
getSelectedColumns()
Get selected columns.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
getSelectableColumns()
Get selectable columns.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setEnableHeader($a_enableheader)
Set Enable Header.
static _getInstance()
Get instance of ilPrivacySettings.
setMaxCount($a_max_count)
set max.
setEnableTitle($a_enabletitle)
Set Enable Title.
fillHeaderExcel(ilExcel $worksheet, &$a_row)
Class ilSCORMTrackingItems.
fillRowCSV($a_csv, $a_set)
__construct($a_obj_id, $a_parent_obj, $a_parent_cmd, $a_userSelected, $a_scosSelected, $a_report)
Constructor.