5 include_once
"Services/Tracking/classes/class.ilLearningProgressBaseGUI.php";
37 $this->ref_id = (int) $_REQUEST[
"ref_id"];
45 $ilAccess = $DIC[
'ilAccess'];
47 $this->tabs_gui->addSubTab(
48 'trac_object_stat_access',
49 $this->lng->txt(
'trac_object_stat_access'),
50 $this->ctrl->getLinkTarget($this,
'accessFilter')
52 $this->tabs_gui->addSubTab(
53 'trac_object_stat_daily',
54 $this->lng->txt(
'trac_object_stat_daily'),
55 $this->ctrl->getLinkTarget($this,
'dailyFilter')
57 $this->tabs_gui->addSubTab(
58 'trac_object_stat_lp',
59 $this->lng->txt(
'trac_object_stat_lp'),
60 $this->ctrl->getLinkTarget($this,
'learningProgressFilter')
62 $this->tabs_gui->addSubTab(
63 'trac_object_stat_types',
64 $this->lng->txt(
'trac_object_stat_types'),
65 $this->ctrl->getLinkTarget($this,
'typesFilter')
68 if ($this->dic->rbac()->system()->checkAccess(
"visible,read", $this->ref_id)) {
69 $this->tabs_gui->addSubTab(
70 'trac_object_stat_admin',
71 $this->lng->txt(
'trac_object_stat_admin'),
72 $this->ctrl->getLinkTarget($this,
'admin')
82 $this->ctrl->setReturn($this,
"");
86 switch ($this->ctrl->getNextClass()) {
97 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
99 $lp_table->resetOffset();
100 $lp_table->writeFilterToSession();
106 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
108 $lp_table->resetOffset();
109 $lp_table->resetFilter();
118 public function access($a_load_data =
true)
124 $this->tabs_gui->activateSubTab(
'trac_object_stat_access');
128 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
132 $lp_table->disable(
"content");
133 $lp_table->disable(
"header");
136 $tpl->setContent($lp_table->getHTML());
151 $this->tabs_gui->activateSubTab(
'trac_object_stat_access');
153 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
156 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
161 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
163 $lp_table->resetOffset();
164 $lp_table->writeFilterToSession();
170 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
172 $lp_table->resetOffset();
173 $lp_table->resetFilter();
182 public function types($a_load_data =
true)
188 $this->tabs_gui->activateSubTab(
'trac_object_stat_types');
192 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
196 $lp_table->disable(
"content");
197 $lp_table->disable(
"header");
200 $tpl->setContent($lp_table->getHTML());
212 return $this->
types();
215 $this->tabs_gui->activateSubTab(
'trac_object_stat_types');
217 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
220 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
225 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
227 $lp_table->resetOffset();
228 $lp_table->writeFilterToSession();
234 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
236 $lp_table->resetOffset();
237 $lp_table->resetFilter();
246 public function daily($a_load_data =
true)
252 $this->tabs_gui->activateSubTab(
'trac_object_stat_daily');
256 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
260 $lp_table->disable(
"content");
261 $lp_table->disable(
"header");
264 $tpl->setContent($lp_table->getHTML());
276 return $this->
daily();
279 $this->tabs_gui->activateSubTab(
'trac_object_stat_daily');
281 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
284 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
292 $ilToolbar = $DIC[
'ilToolbar'];
295 $ilAccess = $DIC[
'ilAccess'];
297 $this->tabs_gui->activateSubTab(
'trac_object_stat_admin');
301 if ($this->dic->rbac()->system()->checkAccess(
'write', $this->ref_id)) {
302 $ilToolbar->addButton(
303 $lng->txt(
"trac_sync_obj_stats"),
304 $ilCtrl->getLinkTarget($this,
"adminSync")
308 if ($ilAccess->checkAccess(
"delete",
"", $this->ref_id)) {
309 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsAdminTableGUI.php");
312 $tpl->setContent($lp_table->getHTML());
323 include_once
"Services/Tracking/classes/class.ilChangeEvent.php";
326 ilUtil::sendSuccess(
$lng->txt(
"trac_sync_obj_stats_success"),
true);
327 $ilCtrl->redirect($this,
"admin");
336 $ilTabs = $DIC[
'ilTabs'];
341 return $this->
admin();
344 $ilTabs->clearTargets();
345 $ilTabs->setBackTarget(
347 $ilCtrl->getLinkTarget($this,
"admin")
351 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
353 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
354 $cgui->setHeaderText(
$lng->txt(
"trac_sure_delete_data"));
355 $cgui->setCancel(
$lng->txt(
"cancel"),
"admin");
356 $cgui->setConfirm(
$lng->txt(
"delete"),
"deleteData");
360 $caption =
$lng->txt(
"month_" . str_pad(substr($i, 5), 2,
"0", STR_PAD_LEFT) .
"_long") .
361 " " . substr($i, 0, 4);
363 $cgui->addItem(
"item_id[]", $i, $caption);
366 $tpl->setContent($cgui->getHTML());
377 return $this->
admin();
380 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
382 ilUtil::sendSuccess(
$lng->txt(
"trac_data_deleted"));
388 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
390 $lp_table->resetOffset();
391 $lp_table->writeFilterToSession();
397 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
399 $lp_table->resetOffset();
400 $lp_table->resetFilter();
415 $this->tabs_gui->activateSubTab(
'trac_object_stat_lp');
419 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
423 $lp_table->disable(
"content");
424 $lp_table->disable(
"header");
427 $tpl->setContent($lp_table->getHTML());
442 $this->tabs_gui->activateSubTab(
'trac_object_stat_lp');
444 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
447 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
452 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
455 $a_tpl =
new ilTemplate(
"tpl.lp_object_statistics_lp_details.html",
true,
true,
"Services/Tracking");
456 $a_tpl->setVariable(
"CONTENT", $lp_table->getHTML());
457 $a_tpl->setVariable(
'CLOSE_IMG_TXT', $this->lng->txt(
'close'));
466 $ilAccess = $DIC[
'ilAccess'];
470 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
475 if ($a_show_link && $ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
476 $link =
" <a href=\"" .
$ilCtrl->getLinkTarget($this,
"admin") .
"\">»" .
477 $lng->txt(
"trac_log_info_link") .
"</a>";
489 include_once
"Services/Cron/classes/class.ilCronManager.php";
access($a_load_data=true)
applyLearningProgressFilter()
showLearningProgressDetails()
resetLearningProgressFilter()
static deleteObjectStatistics(array $a_months)
TableGUI class for learning progress.
TableGUI class for learning progress.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
TableGUI class for learning progress.
learningProgress($a_load_data=true)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
executeCommand()
execute command
__construct($a_mode, $a_ref_id=0)
__construct(Container $dic, ilPlugin $plugin)
TableGUI class for learning progress.
TableGUI class for learning progress.
static _syncObjectStats($a_now=null, $a_minimum=20000)
Process object statistics log data.
static isJobActive($a_job_id)
Check if given job is currently active.
showAggregationInfo($a_show_link=true)
showLearningProgressGraph()
static getObjectStatisticsLogInfo()
Get last update info for object statistics.
Confirmation screen class.