ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilLPObjectStatisticsAdminTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
5 
16 {
20  function __construct($a_parent_obj, $a_parent_cmd)
21  {
22  global $ilCtrl, $lng;
23 
24  $this->setId("lpobjstattbl");
25 
26  parent::__construct($a_parent_obj, $a_parent_cmd);
27 
28  $this->addColumn("", "", "1", true);
29  $this->addColumn($lng->txt("month"), "month");
30  $this->addColumn($lng->txt("count"), "count");
31 
32  $this->setTitle($this->lng->txt("trac_object_stat_admin"));
33 
34  // $this->setSelectAllCheckbox("item_id");
35  $this->addMultiCommand("confirmDeleteData", $lng->txt("trac_delete_data"));
36 
37  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
38  $this->setRowTemplate("tpl.lp_object_statistics_admin_row.html", "Services/Tracking");
39  $this->setEnableHeader(true);
40  $this->setEnableNumInfo(true);
41  $this->setEnableTitle(true);
42  $this->setDefaultOrderField("month");
43  $this->setDefaultOrderDirection("desc");
44 
45  $this->getItems();
46  }
47 
48  function getItems()
49  {
50  include_once "Services/Tracking/classes/class.ilTrQuery.php";
52 
53  // #11855
54  foreach($data as $idx => $item)
55  {
56  $data[$idx]["id"] = $item["month"];
57 
58  $data[$idx]["month"]= substr($item["month"], 0, 4).
59  "-".str_pad(substr($item["month"], 5), 2, "0", STR_PAD_LEFT);
60  }
61 
62  $this->setData($data);
63  }
64 
68  protected function fillRow($a_set)
69  {
70  global $lng;
71 
72  $caption = $lng->txt("month_".substr($a_set["month"], 5, 2)."_long").
73  " ".substr($a_set["month"], 0, 4);
74 
75  $this->tpl->setVariable("ID", $a_set["id"]);
76  $this->tpl->setVariable("MONTH", $caption);
77  $this->tpl->setVariable("COUNT", $a_set["count"]);
78  }
79 }
80 
81 ?>
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static getObjectStatisticsMonthlySummary()
setEnableNumInfo($a_val)
Set enable num info.
setId($a_val)
Set id.
global $ilCtrl
Definition: ilias.php:18
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
TableGUI class for learning progress.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $lng
Definition: privfeed.php:17
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.