4 include_once(
"./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
5 require_once(
"./Services/Tracking/classes/class.ilLearningProgressGUI.php");
21 function __construct($a_parent_obj, $a_parent_cmd, $a_user =
"", $obj_ids = NULL, $details =
false, $mode = null, $personal_only =
false, $a_parent_id = null, $a_parent_ref_id = null, $lp_context = null)
25 $this->tracked_user = $a_user;
26 $this->obj_ids = $obj_ids;
27 $this->details = $details;
29 $this->parent_obj_id = $a_parent_id;
30 $this->lp_context = $lp_context;
35 $this->obj_id = $this->parent_obj_id;
36 $this->ref_id = $a_parent_ref_id;
39 $this->
setId(
"lpprgtbl");
47 $this->has_object_subitems =
true;
49 $user = $this->tracked_user;
56 $this->
addColumn($this->lng->txt(
"trac_title"),
"title",
"26%");
57 $this->
addColumn($this->lng->txt(
"status"),
"status",
"7%");
58 $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
59 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
60 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
61 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
62 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
63 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
64 $this->
addColumn($this->lng->txt(
"actions"),
"",
"5%");
66 $this->
setTitle(sprintf($this->lng->txt(
"trac_learning_progress_of"), $user->getFullName()));
70 $this->
addMultiCommand(
"hideSelected", $lng->txt(
"trac_hide_selected"));
76 include_once
'./Services/Object/classes/class.ilObjectLP.php';
78 $collection = $olp->getCollectionInstance();
91 $this->
setTitle($this->lng->txt(
"details"));
93 $this->
addColumn($this->lng->txt(
"trac_title"),
"title",
"31%");
94 $this->
addColumn($this->lng->txt(
"status"),
"status",
"7%");
98 $this->lng->loadLanguageModule(
'content');
99 $this->
addColumn($this->lng->txt(
'cont_score'),
'score',
'10%');
101 else if($this->has_object_subitems)
103 $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
104 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
105 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
106 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
107 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
108 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
113 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
114 $this->
setRowTemplate(
"tpl.lp_progress_list_row.html",
"Services/Tracking");
121 if($this->has_object_subitems)
127 if($this->tracked_user)
135 return ($a_field ==
"percentage");
140 $obj_ids = $this->obj_ids;
141 if(!$obj_ids && !$this->details)
144 $membership_ids = null;
145 if($this->filter[
"type"] ==
"crs" || $this->filter[
"type"] ==
"grp")
147 include_once
"Services/Membership/classes/class.ilParticipants.php";
149 $this->filter[
"type"]);
151 if($membership_ids === null ||
sizeof($membership_ids))
153 switch($this->lp_context)
166 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
184 foreach(
$data as $idx => $item)
186 if(!$item[
"status"] && !$this->filter[
"status"] && !$this->details)
210 $this->tpl->setCurrentBlock(
"column_checkbox");
211 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
212 $this->tpl->parseCurrentBlock();
216 $this->tpl->setVariable(
"ICON_ALT", $this->lng->txt($a_set[
"type"]));
217 $this->tpl->setVariable(
"TITLE_TEXT", $a_set[
"title"]);
219 if($a_set[
"offline"])
221 $this->tpl->setCurrentBlock(
"offline");
222 $this->tpl->setVariable(
"TEXT_STATUS", $this->lng->txt(
"status"));
223 $this->tpl->setVariable(
"TEXT_OFFLINE", $this->lng->txt(
"offline"));
224 $this->tpl->parseCurrentBlock();
232 $this->tpl->setVariable(
'SCORE_VAL', $a_set[
"score"]);
234 else if($this->has_object_subitems)
236 $this->tpl->setCurrentBlock(
"status_details");
241 $this->tpl->setVariable(
"MODE_TEXT", $olp->getModeText($a_set[
"u_mode"]));
242 $this->tpl->setVariable(
"MARK_VALUE", $a_set[
"mark"]);
243 $this->tpl->setVariable(
"COMMENT_TEXT", $a_set[
"comment"]);
247 $this->tpl->setVariable(
"PERCENTAGE_VALUE",
"");
251 $this->tpl->setVariable(
"PERCENTAGE_VALUE", sprintf(
"%d%%", $a_set[
"percentage"]));
258 $this->tpl->setCurrentBlock(
"item_path");
259 foreach(
$path as $path_item)
261 $this->tpl->setVariable(
"PATH_ITEM", $path_item);
262 $this->tpl->parseCurrentBlock();
266 $this->tpl->parseCurrentBlock();
288 $this->tpl->setCurrentBlock(
'warning_img');
290 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
291 $this->tpl->parseCurrentBlock();
298 $this->tpl->setCurrentBlock(
"item_command");
299 $ilCtrl->setParameterByClass(get_class($this),
'hide', $a_set[
"obj_id"]);
300 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(get_class($this),
'hide'));
301 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_hide'));
302 $this->tpl->parseCurrentBlock();
305 if($olp->getCollectionInstance() && $a_set[
"ref_ids"])
309 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
$ref_id);
310 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass($ilCtrl->getCmdClass(),
'details'));
311 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
'');
312 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_subitems'));
313 $this->tpl->parseCurrentBlock();
316 $this->tpl->setCurrentBlock(
"column_action");
317 $this->tpl->parseCurrentBlock();
324 $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
325 $worksheet->write($a_row, 1, $this->lng->txt(
"trac_title"));
326 $worksheet->write($a_row, 2, $this->lng->txt(
"status"));
327 $worksheet->write($a_row, 3, $this->lng->txt(
"trac_status_changed"));
328 $worksheet->write($a_row, 4, $this->lng->txt(
"trac_percentage"));
329 $worksheet->write($a_row, 5, $this->lng->txt(
"trac_mark"));
330 $worksheet->write($a_row, 6, $this->lng->txt(
"comment"));
331 $worksheet->write($a_row, 7, $this->lng->txt(
"trac_mode"));
337 $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
338 $worksheet->write($a_row, 1, $a_set[
"title"]);
345 $worksheet->write($a_row, 4, sprintf(
"%d%%", $a_set[
"percentage"]));
346 $worksheet->write($a_row, 5, $a_set[
"mark"]);
347 $worksheet->write($a_row, 6, $a_set[
"comment"]);
368 $a_csv->addColumn($this->lng->txt(
"type"));
369 $a_csv->addColumn($this->lng->txt(
"trac_title"));
370 $a_csv->addColumn($this->lng->txt(
"status"));
371 $a_csv->addColumn($this->lng->txt(
"trac_status_changed"));
372 $a_csv->addColumn($this->lng->txt(
"trac_percentage"));
373 $a_csv->addColumn($this->lng->txt(
"trac_mark"));
374 $a_csv->addColumn($this->lng->txt(
"comment"));
375 $a_csv->addColumn($this->lng->txt(
"trac_mode"));
382 $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
383 $a_csv->addColumn($a_set[
"title"]);
390 $a_csv->addColumn(sprintf(
"%d%%", $a_set[
"percentage"]));
391 $a_csv->addColumn($a_set[
"mark"]);
392 $a_csv->addColumn($a_set[
"comment"]);