5 include_once
"Services/Tracking/classes/class.ilLearningProgressBaseGUI.php";
23 parent::__construct($a_mode, $a_ref_id);
26 $this->ref_id = (int) $_REQUEST[
"ref_id"];
34 $ilAccess = $DIC[
'ilAccess'];
36 $this->tabs_gui->addSubTab(
37 'trac_object_stat_access',
38 $this->lng->txt(
'trac_object_stat_access'),
39 $this->ctrl->getLinkTarget($this,
'accessFilter')
41 $this->tabs_gui->addSubTab(
42 'trac_object_stat_daily',
43 $this->lng->txt(
'trac_object_stat_daily'),
44 $this->ctrl->getLinkTarget($this,
'dailyFilter')
46 $this->tabs_gui->addSubTab(
47 'trac_object_stat_lp',
48 $this->lng->txt(
'trac_object_stat_lp'),
49 $this->ctrl->getLinkTarget($this,
'learningProgressFilter')
51 $this->tabs_gui->addSubTab(
52 'trac_object_stat_types',
53 $this->lng->txt(
'trac_object_stat_types'),
54 $this->ctrl->getLinkTarget($this,
'typesFilter')
57 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
58 $this->tabs_gui->addSubTab(
59 'trac_object_stat_admin',
60 $this->lng->txt(
'trac_object_stat_admin'),
61 $this->ctrl->getLinkTarget($this,
'admin')
71 $this->ctrl->setReturn($this,
"");
75 switch ($this->ctrl->getNextClass()) {
86 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
88 $lp_table->resetOffset();
89 $lp_table->writeFilterToSession();
95 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
97 $lp_table->resetOffset();
98 $lp_table->resetFilter();
107 public function access($a_load_data =
true)
113 $this->tabs_gui->activateSubTab(
'trac_object_stat_access');
117 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
121 $lp_table->disable(
"content");
122 $lp_table->disable(
"header");
125 $tpl->setContent($lp_table->getHTML());
140 $this->tabs_gui->activateSubTab(
'trac_object_stat_access');
142 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
145 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
150 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
152 $lp_table->resetOffset();
153 $lp_table->writeFilterToSession();
159 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
161 $lp_table->resetOffset();
162 $lp_table->resetFilter();
171 public function types($a_load_data =
true)
177 $this->tabs_gui->activateSubTab(
'trac_object_stat_types');
181 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
185 $lp_table->disable(
"content");
186 $lp_table->disable(
"header");
189 $tpl->setContent($lp_table->getHTML());
201 return $this->
types();
204 $this->tabs_gui->activateSubTab(
'trac_object_stat_types');
206 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
209 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
214 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
216 $lp_table->resetOffset();
217 $lp_table->writeFilterToSession();
223 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
225 $lp_table->resetOffset();
226 $lp_table->resetFilter();
235 public function daily($a_load_data =
true)
241 $this->tabs_gui->activateSubTab(
'trac_object_stat_daily');
245 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
249 $lp_table->disable(
"content");
250 $lp_table->disable(
"header");
253 $tpl->setContent($lp_table->getHTML());
265 return $this->
daily();
268 $this->tabs_gui->activateSubTab(
'trac_object_stat_daily');
270 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
273 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
281 $ilToolbar = $DIC[
'ilToolbar'];
284 $ilAccess = $DIC[
'ilAccess'];
286 $this->tabs_gui->activateSubTab(
'trac_object_stat_admin');
290 $ilToolbar->addButton(
291 $lng->txt(
"trac_sync_obj_stats"),
292 $ilCtrl->getLinkTarget($this,
"adminSync")
295 if ($ilAccess->checkAccess(
"delete",
"", $this->ref_id)) {
296 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsAdminTableGUI.php");
299 $tpl->setContent($lp_table->getHTML());
310 include_once
"Services/Tracking/classes/class.ilChangeEvent.php";
313 ilUtil::sendSuccess(
$lng->txt(
"trac_sync_obj_stats_success"),
true);
314 $ilCtrl->redirect($this,
"admin");
323 $ilTabs = $DIC[
'ilTabs'];
328 return $this->
admin();
331 $ilTabs->clearTargets();
332 $ilTabs->setBackTarget(
334 $ilCtrl->getLinkTarget($this,
"admin")
338 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
340 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
341 $cgui->setHeaderText(
$lng->txt(
"trac_sure_delete_data"));
342 $cgui->setCancel(
$lng->txt(
"cancel"),
"admin");
343 $cgui->setConfirm(
$lng->txt(
"delete"),
"deleteData");
347 $caption =
$lng->txt(
"month_" . str_pad(substr($i, 5), 2,
"0", STR_PAD_LEFT) .
"_long") .
348 " " . substr($i, 0, 4);
350 $cgui->addItem(
"item_id[]", $i, $caption);
353 $tpl->setContent($cgui->getHTML());
364 return $this->
admin();
367 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
369 ilUtil::sendSuccess(
$lng->txt(
"trac_data_deleted"));
375 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
377 $lp_table->resetOffset();
378 $lp_table->writeFilterToSession();
384 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
386 $lp_table->resetOffset();
387 $lp_table->resetFilter();
402 $this->tabs_gui->activateSubTab(
'trac_object_stat_lp');
406 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
410 $lp_table->disable(
"content");
411 $lp_table->disable(
"header");
414 $tpl->setContent($lp_table->getHTML());
429 $this->tabs_gui->activateSubTab(
'trac_object_stat_lp');
431 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
434 $tpl->setContent($lp_table->getGraph(
$_POST[
"item_id"]) . $lp_table->getHTML());
439 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
442 $a_tpl =
new ilTemplate(
"tpl.lp_object_statistics_lp_details.html",
true,
true,
"Services/Tracking");
443 $a_tpl->setVariable(
"CONTENT", $lp_table->getHTML());
444 $a_tpl->setVariable(
'CLOSE_IMG_TXT', $this->lng->txt(
'close'));
453 $ilAccess = $DIC[
'ilAccess'];
457 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
462 if ($a_show_link && $ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
463 $link =
" <a href=\"" .
$ilCtrl->getLinkTarget($this,
"admin") .
"\">»" .
464 $lng->txt(
"trac_log_info_link") .
"</a>";
476 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.
special template class to simplify handling of ITX/PEAR
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)
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.