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->lng->loadLanguageModule(
'content');
78 $this->
addColumn($this->lng->txt(
'cont_score'),
'score',
'10%');
82 $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
83 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
84 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
85 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
86 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
87 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
92 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
93 $this->
setRowTemplate(
"tpl.lp_progress_list_row.html",
"Services/Tracking");
107 if($this->tracked_user)
115 $obj_ids = $this->obj_ids;
116 if(!$obj_ids && !$this->details)
119 $membership_ids = null;
120 if($this->filter[
"type"] ==
"crs" || $this->filter[
"type"] ==
"grp")
122 include_once
"Services/Membership/classes/class.ilParticipants.php";
124 $this->filter[
"type"]);
126 if($membership_ids === null ||
sizeof($membership_ids))
134 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
147 foreach(
$data as $idx => $item)
149 if(!$item[
"status"] && !$this->filter[
"status"])
173 $this->tpl->setCurrentBlock(
"column_checkbox");
174 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
175 $this->tpl->parseCurrentBlock();
179 $this->tpl->setVariable(
"ICON_ALT", $this->lng->txt($a_set[
"type"]));
180 $this->tpl->setVariable(
"TITLE_TEXT", $a_set[
"title"]);
182 if($a_set[
"offline"])
184 $this->tpl->setCurrentBlock(
"offline");
185 $this->tpl->setVariable(
"TEXT_STATUS", $this->lng->txt(
"status"));
186 $this->tpl->setVariable(
"TEXT_OFFLINE", $this->lng->txt(
"offline"));
187 $this->tpl->parseCurrentBlock();
195 $this->tpl->setVariable(
'SCORE_VAL', $a_set[
"score"]);
199 $this->tpl->setCurrentBlock(
"status_details");
204 $this->tpl->setVariable(
"MARK_VALUE", $a_set[
"mark"]);
205 $this->tpl->setVariable(
"COMMENT_TEXT", $a_set[
"comment"]);
209 $this->tpl->setVariable(
"PERCENTAGE_VALUE",
"");
213 $this->tpl->setVariable(
"PERCENTAGE_VALUE", sprintf(
"%d%%", $a_set[
"percentage"]));
220 $this->tpl->setCurrentBlock(
"item_path");
221 foreach(
$path as $path_item)
223 $this->tpl->setVariable(
"PATH_ITEM", $path_item);
224 $this->tpl->parseCurrentBlock();
228 $this->tpl->parseCurrentBlock();
250 $this->tpl->setCurrentBlock(
'warning_img');
252 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
253 $this->tpl->parseCurrentBlock();
260 $this->tpl->setCurrentBlock(
"item_command");
261 $ilCtrl->setParameterByClass(get_class($this),
'hide', $a_set[
"obj_id"]);
262 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(get_class($this),
'hide'));
263 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_hide'));
264 $this->tpl->parseCurrentBlock();
270 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
$ref_id);
271 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass($ilCtrl->getCmdClass(),
'details'));
272 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
'');
273 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_subitems'));
274 $this->tpl->parseCurrentBlock();
277 $this->tpl->setCurrentBlock(
"column_action");
278 $this->tpl->parseCurrentBlock();
285 $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
286 $worksheet->write($a_row, 1, $this->lng->txt(
"trac_title"));
287 $worksheet->write($a_row, 2, $this->lng->txt(
"status"));
288 $worksheet->write($a_row, 3, $this->lng->txt(
"trac_status_changed"));
289 $worksheet->write($a_row, 4, $this->lng->txt(
"trac_percentage"));
290 $worksheet->write($a_row, 5, $this->lng->txt(
"trac_mark"));
291 $worksheet->write($a_row, 6, $this->lng->txt(
"comment"));
292 $worksheet->write($a_row, 7, $this->lng->txt(
"trac_mode"));
298 $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
299 $worksheet->write($a_row, 1, $a_set[
"title"]);
306 $worksheet->write($a_row, 4, sprintf(
"%d%%", $a_set[
"percentage"]));
307 $worksheet->write($a_row, 5, $a_set[
"mark"]);
308 $worksheet->write($a_row, 6, $a_set[
"comment"]);
329 $a_csv->addColumn($this->lng->txt(
"type"));
330 $a_csv->addColumn($this->lng->txt(
"trac_title"));
331 $a_csv->addColumn($this->lng->txt(
"status"));
332 $a_csv->addColumn($this->lng->txt(
"trac_status_changed"));
333 $a_csv->addColumn($this->lng->txt(
"trac_percentage"));
334 $a_csv->addColumn($this->lng->txt(
"trac_mark"));
335 $a_csv->addColumn($this->lng->txt(
"comment"));
336 $a_csv->addColumn($this->lng->txt(
"trac_mode"));
343 $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
344 $a_csv->addColumn($a_set[
"title"]);
351 $a_csv->addColumn(sprintf(
"%d%%", $a_set[
"percentage"]));
352 $a_csv->addColumn($a_set[
"mark"]);
353 $a_csv->addColumn($a_set[
"comment"]);