4 include_once(
"./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
20 function __construct($a_parent_obj, $a_parent_cmd, $a_user =
"", $obj_ids = NULL, $details =
false, $mode = null, $personal_only =
false, $a_parent_id = null)
24 $this->tracked_user = $a_user;
25 $this->obj_ids = $obj_ids;
26 $this->details = $details;
28 $this->parent_obj_id = $a_parent_id;
30 $this->
setId(
"lpprgtbl");
38 $user = $this->tracked_user;
45 $this->
addColumn($this->lng->txt(
"trac_title"),
"title",
"26%");
46 $this->
addColumn($this->lng->txt(
"status"),
"status",
"7%");
47 $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
48 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
49 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
50 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
51 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
52 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
53 $this->
addColumn($this->lng->txt(
"actions"),
"",
"5%");
55 $this->
setTitle(sprintf($this->lng->txt(
"trac_learning_progress_of"), $user->getFullName()));
59 $this->
addMultiCommand(
"hideSelected", $lng->txt(
"trac_hide_selected"));
65 $this->
parseTitle($a_parent_obj->details_obj_id,
"trac_subitems");
69 $this->
parseTitle($a_parent_obj->details_obj_id,
"trac_progress");
72 $this->
addColumn($this->lng->txt(
"trac_title"),
"title",
"31%");
73 $this->
addColumn($this->lng->txt(
"status"),
"status",
"7%");
77 $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
78 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
79 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
80 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
81 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
82 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
87 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
88 $this->
setRowTemplate(
"tpl.lp_progress_list_row.html",
"Services/Tracking");
102 if($this->tracked_user)
110 $obj_ids = $this->obj_ids;
111 if(!$obj_ids && !$this->details)
114 $membership_ids = null;
115 if($this->filter[
"type"] ==
"crs" || $this->filter[
"type"] ==
"grp")
117 include_once
"Services/Membership/classes/class.ilParticipants.php";
119 $this->filter[
"type"]);
121 if($membership_ids === null ||
sizeof($membership_ids))
129 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
142 foreach(
$data as $idx => $item)
157 global $ilObjDataCache,
$ilCtrl;
161 $this->tpl->setCurrentBlock(
"column_checkbox");
162 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
163 $this->tpl->parseCurrentBlock();
167 $this->tpl->setVariable(
"ICON_ALT", $this->lng->txt($a_set[
"type"]));
168 $this->tpl->setVariable(
"TITLE_TEXT", $a_set[
"title"]);
170 if($a_set[
"offline"])
172 $this->tpl->setCurrentBlock(
"offline");
173 $this->tpl->setVariable(
"TEXT_STATUS", $this->lng->txt(
"status"));
174 $this->tpl->setVariable(
"TEXT_OFFLINE", $this->lng->txt(
"offline"));
175 $this->tpl->parseCurrentBlock();
183 $this->tpl->setCurrentBlock(
"status_details");
188 $this->tpl->setVariable(
"MARK_VALUE", $a_set[
"mark"]);
189 $this->tpl->setVariable(
"COMMENT_TEXT", $a_set[
"comment"]);
193 $this->tpl->setVariable(
"PERCENTAGE_VALUE",
"");
197 $this->tpl->setVariable(
"PERCENTAGE_VALUE", sprintf(
"%d%%", $a_set[
"percentage"]));
204 $this->tpl->setCurrentBlock(
"item_path");
205 foreach(
$path as $path_item)
207 $this->tpl->setVariable(
"PATH_ITEM", $path_item);
208 $this->tpl->parseCurrentBlock();
212 $this->tpl->parseCurrentBlock();
234 $this->tpl->setCurrentBlock(
'warning_img');
236 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
237 $this->tpl->parseCurrentBlock();
244 $this->tpl->setCurrentBlock(
"item_command");
245 $ilCtrl->setParameterByClass(get_class($this),
'hide', $a_set[
"obj_id"]);
246 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(get_class($this),
'hide'));
247 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_hide'));
248 $this->tpl->parseCurrentBlock();
254 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
$ref_id);
255 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass($ilCtrl->getCmdClass(),
'details'));
256 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
'');
257 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_subitems'));
258 $this->tpl->parseCurrentBlock();
261 $this->tpl->setCurrentBlock(
"column_action");
262 $this->tpl->parseCurrentBlock();
269 $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
270 $worksheet->write($a_row, 1, $this->lng->txt(
"trac_title"));
271 $worksheet->write($a_row, 2, $this->lng->txt(
"status"));
272 $worksheet->write($a_row, 3, $this->lng->txt(
"trac_status_changed"));
273 $worksheet->write($a_row, 4, $this->lng->txt(
"trac_percentage"));
274 $worksheet->write($a_row, 5, $this->lng->txt(
"trac_mark"));
275 $worksheet->write($a_row, 6, $this->lng->txt(
"comment"));
276 $worksheet->write($a_row, 7, $this->lng->txt(
"trac_mode"));
282 $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
283 $worksheet->write($a_row, 1, $a_set[
"title"]);
290 $worksheet->write($a_row, 4, sprintf(
"%d%%", $a_set[
"percentage"]));
291 $worksheet->write($a_row, 5, $a_set[
"mark"]);
292 $worksheet->write($a_row, 6, $a_set[
"comment"]);
313 $a_csv->addColumn($this->lng->txt(
"type"));
314 $a_csv->addColumn($this->lng->txt(
"trac_title"));
315 $a_csv->addColumn($this->lng->txt(
"status"));
316 $a_csv->addColumn($this->lng->txt(
"trac_status_changed"));
317 $a_csv->addColumn($this->lng->txt(
"trac_percentage"));
318 $a_csv->addColumn($this->lng->txt(
"trac_mark"));
319 $a_csv->addColumn($this->lng->txt(
"comment"));
320 $a_csv->addColumn($this->lng->txt(
"trac_mode"));
327 $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
328 $a_csv->addColumn($a_set[
"title"]);
335 $a_csv->addColumn(sprintf(
"%d%%", $a_set[
"percentage"]));
336 $a_csv->addColumn($a_set[
"mark"]);
337 $a_csv->addColumn($a_set[
"comment"]);