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_percentage"),
"percentage",
"7%");
48 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
49 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
50 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
51 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
52 $this->
addColumn($this->lng->txt(
"actions"),
"",
"5%");
54 $this->
setTitle(sprintf($this->lng->txt(
"trac_learning_progress_of"), $user->getFullName()));
58 $this->
addMultiCommand(
"hideSelected", $lng->txt(
"trac_hide_selected"));
64 $this->
parseTitle($a_parent_obj->details_obj_id,
"trac_subitems");
68 $this->
parseTitle($a_parent_obj->details_obj_id,
"trac_progress");
71 $this->
addColumn($this->lng->txt(
"trac_title"),
"title",
"31%");
72 $this->
addColumn($this->lng->txt(
"status"),
"status",
"7%");
76 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
77 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
78 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
79 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
80 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
85 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
86 $this->
setRowTemplate(
"tpl.lp_progress_list_row.html",
"Services/Tracking");
100 if($this->tracked_user)
108 $obj_ids = $this->obj_ids;
109 if(!$obj_ids && !$this->details)
115 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
139 global $ilObjDataCache,
$ilCtrl;
143 $this->tpl->setCurrentBlock(
"column_checkbox");
144 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
145 $this->tpl->parseCurrentBlock();
149 $this->tpl->setVariable(
"ICON_ALT", $this->lng->txt($a_set[
"type"]));
150 $this->tpl->setVariable(
"TITLE_TEXT", $a_set[
"title"]);
157 $this->tpl->setCurrentBlock(
"status_details");
159 $this->tpl->setVariable(
"MARK_VALUE", $a_set[
"mark"]);
160 $this->tpl->setVariable(
"COMMENT_TEXT", $a_set[
"comment"]);
164 $this->tpl->setVariable(
"PERCENTAGE_VALUE",
"");
168 $this->tpl->setVariable(
"PERCENTAGE_VALUE", sprintf(
"%d%%", $a_set[
"percentage"]));
175 $this->tpl->setCurrentBlock(
"item_path");
176 foreach(
$path as $path_item)
178 $this->tpl->setVariable(
"PATH_ITEM", $path_item);
179 $this->tpl->parseCurrentBlock();
183 $this->tpl->parseCurrentBlock();
205 $this->tpl->setCurrentBlock(
'warning_img');
207 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
208 $this->tpl->parseCurrentBlock();
215 $this->tpl->setCurrentBlock(
"item_command");
216 $ilCtrl->setParameterByClass(get_class($this),
'hide', $a_set[
"obj_id"]);
217 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(get_class($this),
'hide'));
218 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_hide'));
219 $this->tpl->parseCurrentBlock();
225 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
$ref_id);
226 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass($ilCtrl->getCmdClass(),
'details'));
227 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
'');
228 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_subitems'));
229 $this->tpl->parseCurrentBlock();
232 $this->tpl->setCurrentBlock(
"column_action");
233 $this->tpl->parseCurrentBlock();
240 $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
241 $worksheet->write($a_row, 1, $this->lng->txt(
"trac_title"));
242 $worksheet->write($a_row, 2, $this->lng->txt(
"status"));
243 $worksheet->write($a_row, 3, $this->lng->txt(
"trac_percentage"));
244 $worksheet->write($a_row, 4, $this->lng->txt(
"trac_mark"));
245 $worksheet->write($a_row, 5, $this->lng->txt(
"comment"));
246 $worksheet->write($a_row, 6, $this->lng->txt(
"trac_mode"));
252 $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
253 $worksheet->write($a_row, 1, $a_set[
"title"]);
255 $worksheet->write($a_row, 3, sprintf(
"%d%%", $a_set[
"percentage"]));
256 $worksheet->write($a_row, 4, $a_set[
"mark"]);
257 $worksheet->write($a_row, 5, $a_set[
"comment"]);
278 $a_csv->addColumn($this->lng->txt(
"type"));
279 $a_csv->addColumn($this->lng->txt(
"trac_title"));
280 $a_csv->addColumn($this->lng->txt(
"status"));
281 $a_csv->addColumn($this->lng->txt(
"trac_percentage"));
282 $a_csv->addColumn($this->lng->txt(
"trac_mark"));
283 $a_csv->addColumn($this->lng->txt(
"comment"));
284 $a_csv->addColumn($this->lng->txt(
"trac_mode"));
291 $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
292 $a_csv->addColumn($a_set[
"title"]);
294 $a_csv->addColumn(sprintf(
"%d%%", $a_set[
"percentage"]));
295 $a_csv->addColumn($a_set[
"mark"]);
296 $a_csv->addColumn($a_set[
"comment"]);