4include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItems.php';
36 public function __construct($a_obj_id, $a_parent_obj, $a_parent_cmd, $a_userSelected, $a_scosSelected, $a_report)
40 $this->ctrl =
$DIC->ctrl();
41 $this->lng =
$DIC->language();
42 $this->access =
$DIC->access();
43 $this->rbacsystem =
$DIC->rbac()->system();
47 $ilAccess =
$DIC->access();
50 $lng->loadLanguageModule(
"scormtrac");
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 $this->lmTitle = $a_parent_obj->object->getTitle();
61 $this->
setId(
'2004' . $this->report);
62 parent::__construct($a_parent_obj, $a_parent_cmd);
65 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
67 $this->allowExportPrivacy = $privacy->enabledExportSCORM();
78 if (in_array(
$l, array(
"status",
"time",
"score"))) {
83 $s = $this->lng->txt(
$l);
84 if (substr(
$l, 0, 14) ==
"interaction_id") {
85 $s = $this->lng->txt(substr(
$l, 0, 14)) .
' ' . substr(
$l, 14);
87 if (substr(
$l, 0, 17) ==
"interaction_value") {
88 $s =
sprintf($this->lng->txt(substr(
$l, 0, 17)), substr(
$l, 17, (strpos(
$l,
' ')-17))) . substr(
$l, strpos(
$l,
' '));
90 if (substr(
$l, 0, 23) ==
"interaction_description") {
91 $s = $this->lng->txt(substr(
$l, 0, 23)) .
' ' . substr(
$l, 23);
96 $this->
setRowTemplate(
'tpl.scorm2004_tracking_items.html',
'Modules/Scorm2004');
123 switch ($this->report) {
124 case "exportSelectedCore":
127 case "exportSelectedInteractions":
130 case "exportSelectedObjectives":
133 case "exportObjGlobalToSystem":
136 case "tracInteractionItem":
139 case "tracInteractionUser":
142 case "tracInteractionUserAnswers":
145 case "exportSelectedSuccess":
169 switch ($this->report) {
170 case "exportSelectedCore":
171 $tr_data = $ilSCORM2004TrackingItems->exportSelectedCore($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
173 case "exportSelectedInteractions":
174 $tr_data = $ilSCORM2004TrackingItems->exportSelectedInteractions($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
176 case "exportSelectedObjectives":
177 $tr_data = $ilSCORM2004TrackingItems->exportSelectedObjectives($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
179 case "exportObjGlobalToSystem":
180 $tr_data = $ilSCORM2004TrackingItems->exportObjGlobalToSystem($this->userSelected, $this->allowExportPrivacy, $this->
getObjId());
182 case "tracInteractionItem":
183 $tr_data = $ilSCORM2004TrackingItems->tracInteractionItem($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
185 case "tracInteractionUser":
186 $tr_data = $ilSCORM2004TrackingItems->tracInteractionUser($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
188 case "tracInteractionUserAnswers":
189 $tr_data = $ilSCORM2004TrackingItems->tracInteractionUserAnswers($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId());
191 case "exportSelectedSuccess":
192 $tr_data = $ilSCORM2004TrackingItems->exportSelectedSuccess($this->userSelected, $this->allowExportPrivacy, $this->
getObjId());
197 include_once
"Services/Utilities/classes/class.ilStr.php";
206 $lng->loadLanguageModule(
"trac");
209 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
216 if (
$id==
"launch_data" ||
$id==
"suspend_data") {
219 if (is_numeric($value)) {
220 return round($value, 2);
232 $this->tpl->setCurrentBlock(
"user_field");
234 $this->tpl->setVariable(
"VAL_UF", $val);
235 $this->tpl->parseCurrentBlock();
244 $worksheet->setCell($a_row, $cnt, $labels[$c][
"txt"]);
252 $lng->loadLanguageModule(
"trac");
253 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
256 if ($c !=
'status') {
257 $val = $this->
parseValue($c, $a_set[$c],
"user");
270 $a_csv->addColumn($labels[$c][
"txt"]);
279 $lng->loadLanguageModule(
"trac");
280 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
282 if ($c !=
'status') {
283 $val = $this->
parseValue($c, $a_set[$c],
"user");
287 $a_csv->addColumn($val);
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
static _getImagePathForStatus($a_status)
Get image path for status.
static _getInstance()
Get instance of ilPrivacySettings.
Class ilSCORM2004TrackingItemsTableGUI.
getSelectableColumns()
Get selectable columns.
fillHeaderCSV($a_csv)
CSV Version of Fill Header.
parseValue($id, $value, $type)
__construct($a_obj_id, $a_parent_obj, $a_parent_cmd, $a_userSelected, $a_scosSelected, $a_report)
Constructor.
fillRowCSV($a_csv, $a_set)
CSV Version of Fill Row.
fillRow($data)
Fill table row.
fillHeaderExcel(ilExcel $worksheet, &$a_row)
Excel Version of Fill Header.
fillRowExcel(ilExcel $worksheet, &$a_row, $a_set)
Excel Version of Fill Row.
Class ilSCORM2004TrackingItems.
static exportSelectedObjectivesColumns()
static tracInteractionItemColumns($b_orderBySCO, $b_allowExportPrivacy)
static tracInteractionUserColumns($b_orderBySCO, $b_allowExportPrivacy)
static exportSelectedCoreColumns($b_orderBySCO, $b_allowExportPrivacy)
static exportObjGlobalToSystemColumns()
static tracInteractionUserAnswersColumns($a_user=array(), $a_sco=array(), $b_orderBySCO, $b_allowExportPrivacy)
static exportSelectedInteractionsColumns()
static exportSelectedSuccessColumns()
getSelectedColumns()
Get selected columns.
setEnableHeader($a_enableheader)
Set Enable Header.
setExternalSorting($a_val)
Set external sorting.
setExportFormats(array $formats)
Set available export formats.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setShowTemplates($a_value)
Toggle templates.
getOrderDirection()
Get order direction.
setMaxCount($a_max_count)
set max.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
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...
if(!array_key_exists('StateId', $_REQUEST)) $id