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, $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;
32 $this->
setId(
"lpprgtbl");
40 $this->has_object_subitems =
true;
42 $user = $this->tracked_user;
49 $this->
addColumn($this->lng->txt(
"trac_title"),
"title",
"26%");
50 $this->
addColumn($this->lng->txt(
"status"),
"status",
"7%");
51 $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
52 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
53 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
54 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
55 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
56 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
57 $this->
addColumn($this->lng->txt(
"actions"),
"",
"5%");
59 $this->
setTitle(sprintf($this->lng->txt(
"trac_learning_progress_of"), $user->getFullName()));
63 $this->
addMultiCommand(
"hideSelected", $lng->txt(
"trac_hide_selected"));
67 include_once
'./Services/Object/classes/class.ilObjectLP.php';
69 $collection = $olp->getCollectionInstance();
74 $this->
parseTitle($a_parent_obj->details_obj_id,
"trac_subitems");
78 $this->
parseTitle($a_parent_obj->details_obj_id,
"trac_progress");
81 $this->
addColumn($this->lng->txt(
"trac_title"),
"title",
"31%");
82 $this->
addColumn($this->lng->txt(
"status"),
"status",
"7%");
86 $this->lng->loadLanguageModule(
'content');
87 $this->
addColumn($this->lng->txt(
'cont_score'),
'score',
'10%');
89 else if($this->has_object_subitems)
91 $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
92 $this->
addColumn($this->lng->txt(
"trac_percentage"),
"percentage",
"7%");
93 $this->
addColumn($this->lng->txt(
"trac_mark"),
"",
"5%");
94 $this->
addColumn($this->lng->txt(
"comment"),
"",
"10%");
95 $this->
addColumn($this->lng->txt(
"trac_mode"),
"",
"20%");
96 $this->
addColumn($this->lng->txt(
"path"),
"",
"20%");
101 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
102 $this->
setRowTemplate(
"tpl.lp_progress_list_row.html",
"Services/Tracking");
110 if($this->has_object_subitems)
116 if($this->tracked_user)
124 $obj_ids = $this->obj_ids;
125 if(!$obj_ids && !$this->details)
128 $membership_ids = null;
129 if($this->filter[
"type"] ==
"crs" || $this->filter[
"type"] ==
"grp")
131 include_once
"Services/Membership/classes/class.ilParticipants.php";
133 $this->filter[
"type"]);
135 if($membership_ids === null ||
sizeof($membership_ids))
137 switch($this->lp_context)
150 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
168 foreach(
$data as $idx => $item)
170 if(!$item[
"status"] && !$this->filter[
"status"] && !$this->details)
194 $this->tpl->setCurrentBlock(
"column_checkbox");
195 $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
196 $this->tpl->parseCurrentBlock();
200 $this->tpl->setVariable(
"ICON_ALT", $this->lng->txt($a_set[
"type"]));
201 $this->tpl->setVariable(
"TITLE_TEXT", $a_set[
"title"]);
203 if($a_set[
"offline"])
205 $this->tpl->setCurrentBlock(
"offline");
206 $this->tpl->setVariable(
"TEXT_STATUS", $this->lng->txt(
"status"));
207 $this->tpl->setVariable(
"TEXT_OFFLINE", $this->lng->txt(
"offline"));
208 $this->tpl->parseCurrentBlock();
216 $this->tpl->setVariable(
'SCORE_VAL', $a_set[
"score"]);
218 else if($this->has_object_subitems)
220 $this->tpl->setCurrentBlock(
"status_details");
225 $this->tpl->setVariable(
"MODE_TEXT", $olp->getModeText($a_set[
"u_mode"]));
226 $this->tpl->setVariable(
"MARK_VALUE", $a_set[
"mark"]);
227 $this->tpl->setVariable(
"COMMENT_TEXT", $a_set[
"comment"]);
231 $this->tpl->setVariable(
"PERCENTAGE_VALUE",
"");
235 $this->tpl->setVariable(
"PERCENTAGE_VALUE", sprintf(
"%d%%", $a_set[
"percentage"]));
242 $this->tpl->setCurrentBlock(
"item_path");
243 foreach(
$path as $path_item)
245 $this->tpl->setVariable(
"PATH_ITEM", $path_item);
246 $this->tpl->parseCurrentBlock();
250 $this->tpl->parseCurrentBlock();
272 $this->tpl->setCurrentBlock(
'warning_img');
274 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
275 $this->tpl->parseCurrentBlock();
282 $this->tpl->setCurrentBlock(
"item_command");
283 $ilCtrl->setParameterByClass(get_class($this),
'hide', $a_set[
"obj_id"]);
284 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(get_class($this),
'hide'));
285 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_hide'));
286 $this->tpl->parseCurrentBlock();
289 if($olp->getCollectionInstance() && $a_set[
"ref_ids"])
293 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
$ref_id);
294 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass($ilCtrl->getCmdClass(),
'details'));
295 $ilCtrl->setParameterByClass($ilCtrl->getCmdClass(),
'details_id',
'');
296 $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_subitems'));
297 $this->tpl->parseCurrentBlock();
300 $this->tpl->setCurrentBlock(
"column_action");
301 $this->tpl->parseCurrentBlock();
308 $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
309 $worksheet->write($a_row, 1, $this->lng->txt(
"trac_title"));
310 $worksheet->write($a_row, 2, $this->lng->txt(
"status"));
311 $worksheet->write($a_row, 3, $this->lng->txt(
"trac_status_changed"));
312 $worksheet->write($a_row, 4, $this->lng->txt(
"trac_percentage"));
313 $worksheet->write($a_row, 5, $this->lng->txt(
"trac_mark"));
314 $worksheet->write($a_row, 6, $this->lng->txt(
"comment"));
315 $worksheet->write($a_row, 7, $this->lng->txt(
"trac_mode"));
321 $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
322 $worksheet->write($a_row, 1, $a_set[
"title"]);
329 $worksheet->write($a_row, 4, sprintf(
"%d%%", $a_set[
"percentage"]));
330 $worksheet->write($a_row, 5, $a_set[
"mark"]);
331 $worksheet->write($a_row, 6, $a_set[
"comment"]);
352 $a_csv->addColumn($this->lng->txt(
"type"));
353 $a_csv->addColumn($this->lng->txt(
"trac_title"));
354 $a_csv->addColumn($this->lng->txt(
"status"));
355 $a_csv->addColumn($this->lng->txt(
"trac_status_changed"));
356 $a_csv->addColumn($this->lng->txt(
"trac_percentage"));
357 $a_csv->addColumn($this->lng->txt(
"trac_mark"));
358 $a_csv->addColumn($this->lng->txt(
"comment"));
359 $a_csv->addColumn($this->lng->txt(
"trac_mode"));
366 $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
367 $a_csv->addColumn($a_set[
"title"]);
374 $a_csv->addColumn(sprintf(
"%d%%", $a_set[
"percentage"]));
375 $a_csv->addColumn($a_set[
"mark"]);
376 $a_csv->addColumn($a_set[
"comment"]);