4 include_once(
"./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
20 function __construct($a_parent_obj, $a_parent_cmd, $a_user_id, $a_obj_id, $a_ref_id, $a_print_view =
false)
24 $this->
setId(
"truop");
25 $this->user_id = $a_user_id;
26 $this->obj_id = $a_obj_id;
27 $this->ref_id = $a_ref_id;
32 $this->
parseTitle($this->obj_id,
"details", $this->user_id);
39 $this->
addColumn($this->lng->txt(
"title"),
"title");
44 if (in_array($l, array(
"last_access",
"first_access",
"read_count",
"spent_seconds",
"mark",
"status",
"percentage")))
48 if ($l ==
"u_comment")
52 $this->
addColumn($this->lng->txt($l), $c);
57 $this->
addColumn($this->lng->txt(
"actions"),
"");
63 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
64 $this->
setRowTemplate(
"tpl.user_objects_props_row.html",
"Services/Tracking");
90 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
94 $cols[
"first_access"] = array(
95 "txt" => $lng->txt(
"trac_first_access"),
97 $cols[
"last_access"] = array(
98 "txt" => $lng->txt(
"trac_last_access"),
103 $cols[
"read_count"] = array(
104 "txt" => $lng->txt(
"trac_read_count"),
109 $cols[
"spent_seconds"] = array(
110 "txt" => $lng->txt(
"trac_spent_seconds"),
114 $cols[
"percentage"] = array(
115 "txt" => $lng->txt(
"trac_percentage"),
117 $cols[
"status"] = array(
118 "txt" => $lng->txt(
"trac_status"),
120 $cols[
"mark"] = array(
121 "txt" => $lng->txt(
"trac_mark"),
123 $cols[
"u_comment"] = array(
124 "txt" => $lng->txt(
"trac_comment"),
141 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
153 $this->filter[
"view_mode"]);
155 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0)
168 $this->filter[
"view_mode"]);
178 foreach($tr_data[
"set"] as $idx =>
$row)
180 if(
$row[
'obj_id'] == $this->obj_id)
184 else if(isset(
$row[
"sort_title"]))
186 $set[strtolower(
$row[
"sort_title"]).
"__".$idx] =
$row;
190 $set[strtolower(
$row[
"title"]).
"__".$idx] =
$row;
193 unset($tr_data[
"set"]);
202 $set = array_values($set);
205 array_unshift($set, $parent);
212 $this->
setData($tr_data[
"set"]);
224 include_once
"Services/Object/classes/class.ilObjectLP.php";
226 $collection = $olp->getCollectionInstance();
229 foreach($collection->getItems() as $child_ref_id)
232 $result[] = $child_id;
247 include_once
'./Services/Object/classes/class.ilObjectLP.php';
249 $collection = $olp->getCollectionInstance();
252 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
253 include_once(
"./Services/Table/interfaces/interface.ilTableFilterItem.php");
256 include_once(
"./Services/Form/classes/class.ilRadioGroupInputGUI.php");
257 include_once(
"./Services/Form/classes/class.ilRadioOption.php");
260 $ti->addOption(
new ilRadioOption($lng->txt(
"trac_view_mode_collection"),
"coll"));
262 $ti->readFromSession();
263 $this->filter[
"view_mode"] = $ti->getValue();
276 $data[
"percentage"] = NULL;
281 $val = (trim(
$data[$c]) ==
"")
285 if (
$data[$c] !=
"" || $c ==
"status")
298 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
303 if(
$data[
"type"] !=
"lobj" &&
$data[
"type"] !=
"sco")
316 $this->tpl->setCurrentBlock(
'warning_img');
318 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
319 $this->tpl->parseCurrentBlock();
324 case "spent_seconds":
325 include_once(
"./Services/Utilities/classes/class.ilFormat.php");
330 $val =
$data[$c].
"%";
335 if ($c ==
"mark" && in_array($this->type, array(
"lm",
"dbk")))
339 if ($c ==
"spent_seconds" && in_array($this->type, array(
"exc")))
343 if ($c ==
"percentage" &&
344 (in_array(strtolower($this->status_class),
345 array(
"illpstatusmanual",
"illpstatusscormpackage",
"illpstatustestfinished")) ||
346 $this->type ==
"exc"))
351 $this->tpl->setCurrentBlock(
"user_field");
352 $this->tpl->setVariable(
"VAL_UF", $val);
353 $this->tpl->parseCurrentBlock();
356 if(
$data[
"title"] ==
"")
358 $data[
"title"] =
"--".$lng->txt(
"none").
"--";
361 $this->tpl->setVariable(
"ICON_ALT", $lng->txt(
$data[
"type"]));
363 if(in_array(
$data[
'type'], array(
'fold',
'grp')) &&
$data[
'obj_id'] != $this->obj_id)
365 if(
$data[
'type'] ==
'fold')
367 $object_gui =
'ilobjfoldergui';
371 $object_gui =
'ilobjgroupgui';
373 $this->tpl->setCurrentBlock(
'title_linked');
376 if(
$_GET[
"baseClass"] !=
"ilPersonalDesktopGUI" &&
$_GET[
"baseClass"] !=
"ilAdministrationGUI")
378 $old = $ilCtrl->getParameterArrayByClass(
'illplistofobjectsgui');
379 $ilCtrl->setParameterByClass(
'illplistofobjectsgui',
'ref_id',
$data[
"ref_id"]);
380 $ilCtrl->setParameterByClass(
'illplistofobjectsgui',
'details_id',
$data[
"ref_id"]);
381 $ilCtrl->setParameterByClass(
'illplistofobjectsgui',
'user_id', $this->user_id);
382 $url = $ilCtrl->getLinkTargetByClass(array(
'ilrepositorygui', $object_gui,
'illearningprogressgui',
'illplistofobjectsgui'),
'userdetails');
383 $ilCtrl->setParameterByClass(
'illplistofobjectsgui',
'ref_id', $old[
"ref_id"]);
384 $ilCtrl->setParameterByClass(
'illplistofobjectsgui',
'details_id', $old[
"details_id"]);
385 $ilCtrl->setParameterByClass(
'illplistofobjectsgui',
'user_id', $old[
"user_id"]);
392 $this->tpl->setVariable(
"URL_TITLE", $url);
393 $this->tpl->setVariable(
"VAL_TITLE",
$data[
"title"]);
394 $this->tpl->parseCurrentBlock();
398 $this->tpl->setCurrentBlock(
'title_plain');
399 $this->tpl->setVariable(
"VAL_TITLE",
$data[
"title"]);
400 $this->tpl->parseCurrentBlock();
405 $this->tpl->setCurrentBlock(
"item_command");
406 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"userdetails_id",
$data[
"ref_id"]);
407 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
'edituser'));
408 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'edit'));
409 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"userdetails_id",
"");
410 $this->tpl->parseCurrentBlock();
416 $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
417 $worksheet->write($a_row, 1, $this->lng->txt(
"title"));
423 $worksheet->write($a_row, $cnt, $labels[$c][
"txt"]);
430 $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
431 $worksheet->write($a_row, 1, $a_set[
"title"]);
438 $val = $this->
parseValue($c, $a_set[$c],
"user");
444 $worksheet->write($a_row, $cnt, $val);
451 $a_csv->addColumn($this->lng->txt(
"type"));
452 $a_csv->addColumn($this->lng->txt(
"title"));
457 $a_csv->addColumn($labels[$c][
"txt"]);
465 $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
466 $a_csv->addColumn($a_set[
"title"]);
472 $val = $this->
parseValue($c, $a_set[$c],
"user");
478 $a_csv->addColumn($val);