4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_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();
46 $lng = $DIC->language();
47 $ilAccess = $DIC->access();
48 $lng = $DIC->language();
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();
60 $this->
setId(
'2004' . $this->report);
61 parent::__construct($a_parent_obj, $a_parent_cmd);
64 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
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.scorm2004_tracking_items.html',
'Modules/Scorm2004');
122 switch ($this->report) {
123 case "exportSelectedCore":
126 case "exportSelectedInteractions":
129 case "exportSelectedObjectives":
132 case "exportObjGlobalToSystem":
135 case "tracInteractionItem":
138 case "tracInteractionUser":
141 case "tracInteractionUserAnswers":
144 case "exportSelectedSuccess":
170 switch ($this->report) {
171 case "exportSelectedCore":
172 $tr_data = $ilSCORM2004TrackingItems->exportSelectedCore($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
174 case "exportSelectedInteractions":
175 $tr_data = $ilSCORM2004TrackingItems->exportSelectedInteractions($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
177 case "exportSelectedObjectives":
178 $tr_data = $ilSCORM2004TrackingItems->exportSelectedObjectives($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
180 case "exportObjGlobalToSystem":
181 $tr_data = $ilSCORM2004TrackingItems->exportObjGlobalToSystem($this->userSelected, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
183 case "tracInteractionItem":
184 $tr_data = $ilSCORM2004TrackingItems->tracInteractionItem($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
186 case "tracInteractionUser":
187 $tr_data = $ilSCORM2004TrackingItems->tracInteractionUser($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
189 case "tracInteractionUserAnswers":
190 $tr_data = $ilSCORM2004TrackingItems->tracInteractionUserAnswers($this->userSelected, $this->scosSelected, $this->bySCO, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
192 case "exportSelectedSuccess":
193 $tr_data = $ilSCORM2004TrackingItems->exportSelectedSuccess($this->userSelected, $this->allowExportPrivacy, $this->
getObjId(), $this->lmTitle);
198 include_once
"Services/Utilities/classes/class.ilStr.php";
207 $lng->loadLanguageModule(
"trac");
210 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
217 if (
$id ==
"launch_data" ||
$id ==
"suspend_data") {
220 if (is_numeric($value)) {
221 return round($value, 2);
233 $this->tpl->setCurrentBlock(
"user_field");
235 $this->tpl->setVariable(
"VAL_UF", $val);
236 $this->tpl->parseCurrentBlock();
245 $worksheet->
setCell($a_row, $cnt, $labels[$c][
"txt"]);
253 $lng->loadLanguageModule(
"trac");
254 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
257 if ($c !=
'status') {
258 $val = $this->
parseValue($c, $a_set[$c],
"user");
262 $worksheet->
setCell($a_row, $cnt, $val);
271 $a_csv->addColumn($labels[$c][
"txt"]);
280 $lng->loadLanguageModule(
"trac");
281 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
283 if ($c !=
'status') {
284 $val = $this->
parseValue($c, $a_set[$c],
"user");
288 $a_csv->addColumn($val);
Class ilSCORM2004TrackingItems.
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
static tracInteractionUserColumns($b_orderBySCO, $b_allowExportPrivacy)
static _getImagePathForStatus($a_status)
Get image path for status.
static exportSelectedObjectivesColumns()
setShowTemplates($a_value)
Toggle templates.
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
if(!array_key_exists('StateId', $_REQUEST)) $id
__construct($a_obj_id, $a_parent_obj, $a_parent_cmd, $a_userSelected, $a_scosSelected, $a_report)
Constructor.
fillRow($data)
Fill table row.
determineLimit()
Determine the limit.
static exportSelectedSuccessColumns()
getOrderDirection()
Get order direction.
fillHeaderExcel(ilExcel $worksheet, &$a_row)
static exportSelectedCoreColumns($b_orderBySCO, $b_allowExportPrivacy)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
fillRowExcel(ilExcel $worksheet, &$a_row, $a_set)
Class ilSCORM2004TrackingItemsTableGUI.
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...
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
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
parseValue($id, $value, $type)
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
static tracInteractionUserAnswersColumns($a_user=array(), $a_sco=array(), $b_orderBySCO, $b_allowExportPrivacy)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
fillRowCSV($a_csv, $a_set)
static tracInteractionItemColumns($b_orderBySCO, $b_allowExportPrivacy)
getSelectableColumns()
Get selectable columns.
setEnableHeader($a_enableheader)
Set Enable Header.
static _getInstance()
Get instance of ilPrivacySettings.
setEnableTitle($a_enabletitle)
Set Enable Title.
static exportSelectedInteractionsColumns()
static exportObjGlobalToSystemColumns()