ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPObjectStatisticsGUI Class Reference
+ Inheritance diagram for ilLPObjectStatisticsGUI:
+ Collaboration diagram for ilLPObjectStatisticsGUI:

Public Member Functions

 ilLPObjectStatisticsGUI ($a_mode, $a_ref_id=0)
 executeCommand ()
 execute command
 applyAccessFilter ()
 resetAccessFilter ()
 accessFilter ()
 access ($a_load_data=true)
 showAccessGraph ()
 applyTypesFilter ()
 resetTypesFilter ()
 typesFilter ()
 types ($a_load_data=true)
 showTypesGraph ()
 applyDailyFilter ()
 resetDailyFilter ()
 dailyFilter ()
 daily ($a_load_data=true)
 showDailyGraph ()
 admin ()
 adminSync ()
 confirmDeleteData ()
 deleteData ()
 applyLearningProgressFilter ()
 resetLearningProgressFilter ()
 learningProgressFilter ()
 learningProgress ($a_load_data=true)
 showLearningProgressGraph ()
 showLearningProgressDetails ()
- Public Member Functions inherited from ilLearningProgressBaseGUI
 ilLearningProgressBaseGUI ($a_mode, $a_ref_id=0, $a_usr_id=0)
 isAnonymized ()
 getMode ()
 getRefId ()
 getObjId ()
 getUserId ()
 activateStatistics ($a_act=true)
 __getDefaultCommand ()
 __setSubTabs ($a_active)
 __buildFooter ()
 __buildHeader ()
 __insertPath (&$a_tpl, $a_ref_id)
 insert path
 __showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 _getImagePathForStatus ($a_status)
 Get image path for status.
 _getStatusText ($a_status)
 Get status alt text.
__initTableGUI ()
 __showObjectDetails (&$info, $item_id=0)
 show details about current object.
 __appendUserInfo (&$info, $a_user)
 __appendLPDetails (&$info, $item_id, $user_id)
 __readStatus ($a_obj_id, $user_id)
 __showButton ($a_link, $a_text, $a_target= '')
 __sort ($a_ids, $a_table, $a_field, $a_id_name)
 Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.
 __getPercent ($max, $reached)
 __readItemStatusInfo ($a_items)
 __getLegendHTML ()
 __showEditUser ($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
 __updateUser ($user_id, $obj_id)

Protected Member Functions

 setTabs ()
 showAggregationInfo ($a_show_link=true)

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
static isObjectOffline ($a_obj_id, $a_type=null)
- Data Fields inherited from ilLearningProgressBaseGUI
 $tpl = null
 $ctrl = null
 $lng = null
 $ref_id = 0
 $mode = 0
 $statistics_activated = false
const LP_CONTEXT_PERSONAL_DESKTOP = 1
const LP_CONTEXT_ADMINISTRATION = 2
const LP_CONTEXT_REPOSITORY = 3
const LP_CONTEXT_USER_FOLDER = 4
const LP_CONTEXT_ORG_UNIT = 5
const LP_ACTIVE_SETTINGS = 1
const LP_ACTIVE_OBJECTS = 2
const LP_ACTIVE_PROGRESS = 3
const LP_ACTIVE_LM_STATISTICS = 4
const LP_ACTIVE_USERS = 5
const LP_ACTIVE_SUMMARY = 6
const LP_ACTIVE_OBJSTATACCESS = 7
const LP_ACTIVE_OBJSTATTYPES = 8
const LP_ACTIVE_OBJSTATDAILY = 9
const LP_ACTIVE_OBJSTATADMIN = 10
const LP_ACTIVE_MATRIX = 11
- Protected Attributes inherited from ilLearningProgressBaseGUI
 $anonymized

Detailed Description

Definition at line 19 of file class.ilLPObjectStatisticsGUI.php.

Member Function Documentation

ilLPObjectStatisticsGUI::access (   $a_load_data = true)

Definition at line 98 of file class.ilLPObjectStatisticsGUI.php.

References ilLearningProgressBaseGUI\$tpl, and showAggregationInfo().

Referenced by accessFilter(), applyAccessFilter(), resetAccessFilter(), and showAccessGraph().

{
global $tpl;
$this->tabs_gui->activateSubTab('trac_object_stat_access');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
$lp_table = new ilLPObjectStatisticsTableGUI($this, "access", null, $a_load_data);
if(!$a_load_data)
{
$lp_table->disable("content");
$lp_table->disable("header");
}
$tpl->setContent($lp_table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPObjectStatisticsGUI::accessFilter ( )

Definition at line 93 of file class.ilLPObjectStatisticsGUI.php.

References access().

{
$this->access(false);
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::admin ( )

Definition at line 256 of file class.ilLPObjectStatisticsGUI.php.

References $ilCtrl, ilLearningProgressBaseGUI\$lng, ilLearningProgressBaseGUI\$tpl, and showAggregationInfo().

Referenced by confirmDeleteData(), and deleteData().

{
global $tpl, $ilToolbar, $lng, $ilCtrl, $ilAccess;
$this->tabs_gui->activateSubTab('trac_object_stat_admin');
$this->showAggregationInfo(false);
$ilToolbar->addButton($lng->txt("trac_sync_obj_stats"),
$ilCtrl->getLinkTarget($this, "adminSync"));
if($ilAccess->checkAccess("delete", "", $this->ref_id))
{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsAdminTableGUI.php");
$lp_table = new ilLPObjectStatisticsAdminTableGUI($this, "admin");
$tpl->setContent($lp_table->getHTML());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPObjectStatisticsGUI::adminSync ( )

Definition at line 276 of file class.ilLPObjectStatisticsGUI.php.

References $ilCtrl, ilLearningProgressBaseGUI\$lng, ilChangeEvent\_syncObjectStats(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
include_once "Services/Tracking/classes/class.ilChangeEvent.php";
ilUtil::sendSuccess($lng->txt("trac_sync_obj_stats_success"), true);
$ilCtrl->redirect($this, "admin");
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::applyAccessFilter ( )

Definition at line 75 of file class.ilLPObjectStatisticsGUI.php.

References access().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
$lp_table = new ilLPObjectStatisticsTableGUI($this, "access", null, false);
$lp_table->resetOffset();
$lp_table->writeFilterToSession();
$this->access();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::applyDailyFilter ( )

Definition at line 195 of file class.ilLPObjectStatisticsGUI.php.

References daily().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
$lp_table = new ilLPObjectStatisticsDailyTableGUI($this, "daily", null, false);
$lp_table->resetOffset();
$lp_table->writeFilterToSession();
$this->daily();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::applyLearningProgressFilter ( )

Definition at line 337 of file class.ilLPObjectStatisticsGUI.php.

References learningProgress().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
$lp_table = new ilLPObjectStatisticsLPTableGUI($this, "learningProgress", null, false);
$lp_table->resetOffset();
$lp_table->writeFilterToSession();
$this->learningProgress();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::applyTypesFilter ( )

Definition at line 136 of file class.ilLPObjectStatisticsGUI.php.

References types().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
$lp_table = new ilLPObjectStatisticsTypesTableGUI($this, "types", null, false);
$lp_table->resetOffset();
$lp_table->writeFilterToSession();
$this->types();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::confirmDeleteData ( )

Definition at line 287 of file class.ilLPObjectStatisticsGUI.php.

References $_POST, $ilCtrl, ilLearningProgressBaseGUI\$lng, ilLearningProgressBaseGUI\$tpl, admin(), and ilUtil\sendFailure().

{
global $lng, $tpl, $ilTabs, $ilCtrl;
if(!$_POST["item_id"])
{
ilUtil::sendFailure($lng->txt("no_checkbox"));
return $this->admin();
}
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "admin"));
// display confirmation message
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("trac_sure_delete_data"));
$cgui->setCancel($lng->txt("cancel"), "admin");
$cgui->setConfirm($lng->txt("delete"), "deleteData");
// list objects that should be deleted
foreach ($_POST["item_id"] as $i)
{
$caption = $lng->txt("month_".str_pad(substr($i, 5), 2, "0", STR_PAD_LEFT)."_long").
" ".substr($i, 0, 4);
$cgui->addItem("item_id[]", $i, $caption);
}
$tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::daily (   $a_load_data = true)

Definition at line 218 of file class.ilLPObjectStatisticsGUI.php.

References ilLearningProgressBaseGUI\$tpl, and showAggregationInfo().

Referenced by applyDailyFilter(), dailyFilter(), resetDailyFilter(), and showDailyGraph().

{
global $tpl;
$this->tabs_gui->activateSubTab('trac_object_stat_daily');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
$lp_table = new ilLPObjectStatisticsDailyTableGUI($this, "daily", null, $a_load_data);
if(!$a_load_data)
{
$lp_table->disable("content");
$lp_table->disable("header");
}
$tpl->setContent($lp_table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPObjectStatisticsGUI::dailyFilter ( )

Definition at line 213 of file class.ilLPObjectStatisticsGUI.php.

References daily().

{
$this->daily(false);
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::deleteData ( )

Definition at line 321 of file class.ilLPObjectStatisticsGUI.php.

References $_POST, ilLearningProgressBaseGUI\$lng, admin(), ilTrQuery\deleteObjectStatistics(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $lng;
if(!$_POST["item_id"])
{
ilUtil::sendFailure($lng->txt("no_checkbox"));
return $this->admin();
}
include_once "Services/Tracking/classes/class.ilTrQuery.php";
ilUtil::sendSuccess($lng->txt("trac_data_deleted"));
$this->admin();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::executeCommand ( )

execute command

Definition at line 59 of file class.ilLPObjectStatisticsGUI.php.

References $cmd, ilLearningProgressBaseGUI\__getDefaultCommand(), and setTabs().

{
$this->ctrl->setReturn($this, "");
$this->setTabs();
switch($this->ctrl->getNextClass())
{
default:
$this->$cmd();
}
return true;
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::ilLPObjectStatisticsGUI (   $a_mode,
  $a_ref_id = 0 
)

Definition at line 21 of file class.ilLPObjectStatisticsGUI.php.

References $_REQUEST, and ilLearningProgressBaseGUI\ilLearningProgressBaseGUI().

{
if(!$this->ref_id)
{
$this->ref_id = (int)$_REQUEST["ref_id"];
}
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::learningProgress (   $a_load_data = true)

Definition at line 360 of file class.ilLPObjectStatisticsGUI.php.

References ilLearningProgressBaseGUI\$tpl.

Referenced by applyLearningProgressFilter(), learningProgressFilter(), resetLearningProgressFilter(), and showLearningProgressGraph().

{
global $tpl;
$this->tabs_gui->activateSubTab('trac_object_stat_lp');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
$lp_table = new ilLPObjectStatisticsLPTableGUI($this, "learningProgress", null, $a_load_data);
if(!$a_load_data)
{
$lp_table->disable("content");
$lp_table->disable("header");
}
$tpl->setContent($lp_table->getHTML());
}

+ Here is the caller graph for this function:

ilLPObjectStatisticsGUI::learningProgressFilter ( )

Definition at line 355 of file class.ilLPObjectStatisticsGUI.php.

References learningProgress().

{
$this->learningProgress(false);
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::resetAccessFilter ( )

Definition at line 84 of file class.ilLPObjectStatisticsGUI.php.

References access().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
$lp_table = new ilLPObjectStatisticsTableGUI($this, "access", null, false);
$lp_table->resetOffset();
$lp_table->resetFilter();
$this->access();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::resetDailyFilter ( )

Definition at line 204 of file class.ilLPObjectStatisticsGUI.php.

References daily().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
$lp_table = new ilLPObjectStatisticsDailyTableGUI($this, "daily", null, false);
$lp_table->resetOffset();
$lp_table->resetFilter();
$this->daily();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::resetLearningProgressFilter ( )

Definition at line 346 of file class.ilLPObjectStatisticsGUI.php.

References learningProgress().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
$lp_table = new ilLPObjectStatisticsLPTableGUI($this, "learningProgress", null, false);
$lp_table->resetOffset();
$lp_table->resetFilter();
$this->learningProgress();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::resetTypesFilter ( )

Definition at line 145 of file class.ilLPObjectStatisticsGUI.php.

References types().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
$lp_table = new ilLPObjectStatisticsTypesTableGUI($this, "types", null, false);
$lp_table->resetOffset();
$lp_table->resetFilter();
$this->types();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::setTabs ( )
protected

Definition at line 31 of file class.ilLPObjectStatisticsGUI.php.

Referenced by executeCommand().

{
global $ilAccess;
$this->tabs_gui->addSubTab('trac_object_stat_access',
$this->lng->txt('trac_object_stat_access'),
$this->ctrl->getLinkTarget($this, 'accessFilter'));
$this->tabs_gui->addSubTab('trac_object_stat_daily',
$this->lng->txt('trac_object_stat_daily'),
$this->ctrl->getLinkTarget($this, 'dailyFilter'));
$this->tabs_gui->addSubTab('trac_object_stat_lp',
$this->lng->txt('trac_object_stat_lp'),
$this->ctrl->getLinkTarget($this, 'learningProgressFilter'));
$this->tabs_gui->addSubTab('trac_object_stat_types',
$this->lng->txt('trac_object_stat_types'),
$this->ctrl->getLinkTarget($this, 'typesFilter'));
if($ilAccess->checkAccess("write", "", $this->ref_id))
{
$this->tabs_gui->addSubTab('trac_object_stat_admin',
$this->lng->txt('trac_object_stat_admin'),
$this->ctrl->getLinkTarget($this, 'admin'));
}
}

+ Here is the caller graph for this function:

ilLPObjectStatisticsGUI::showAccessGraph ( )

Definition at line 118 of file class.ilLPObjectStatisticsGUI.php.

References $_POST, ilLearningProgressBaseGUI\$lng, ilLearningProgressBaseGUI\$tpl, access(), and ilUtil\sendFailure().

{
global $lng, $tpl;
if(!$_POST["item_id"])
{
ilUtil::sendFailure($lng->txt("no_checkbox"));
return $this->access();
}
$this->tabs_gui->activateSubTab('trac_object_stat_access');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTableGUI.php");
$lp_table = new ilLPObjectStatisticsTableGUI($this, "access", $_POST["item_id"]);
$tpl->setContent($lp_table->getGraph($_POST["item_id"]).$lp_table->getHTML());
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::showAggregationInfo (   $a_show_link = true)
protected

Definition at line 409 of file class.ilLPObjectStatisticsGUI.php.

References $ilCtrl, ilLearningProgressBaseGUI\$lng, ilDatePresentation\formatDate(), ilTrQuery\getObjectStatisticsLogInfo(), IL_CAL_UNIX, and ilUtil\sendInfo().

Referenced by access(), admin(), and daily().

{
global $ilAccess, $lng, $ilCtrl;
include_once "Services/Tracking/classes/class.ilTrQuery.php";
$info_date = ilDatePresentation::formatDate(new ilDateTime($info["tstamp"], IL_CAL_UNIX));
$link = "";
if($a_show_link && $ilAccess->checkAccess("write", "", $this->ref_id))
{
$link = " <a href=\"".$ilCtrl->getLinkTarget($this, "admin")."\">&raquo;".
$lng->txt("trac_log_info_link")."</a>";
}
ilUtil::sendInfo(sprintf($lng->txt("trac_log_info"), $info_date, $info["counter"]).$link);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPObjectStatisticsGUI::showDailyGraph ( )

Definition at line 238 of file class.ilLPObjectStatisticsGUI.php.

References $_POST, ilLearningProgressBaseGUI\$lng, ilLearningProgressBaseGUI\$tpl, daily(), and ilUtil\sendFailure().

{
global $lng, $tpl;
if(!$_POST["item_id"])
{
ilUtil::sendFailure($lng->txt("no_checkbox"));
return $this->daily();
}
$this->tabs_gui->activateSubTab('trac_object_stat_daily');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsDailyTableGUI.php");
$lp_table = new ilLPObjectStatisticsDailyTableGUI($this, "daily", $_POST["item_id"]);
$tpl->setContent($lp_table->getGraph($_POST["item_id"]).$lp_table->getHTML());
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::showLearningProgressDetails ( )

Definition at line 396 of file class.ilLPObjectStatisticsGUI.php.

References $_GET, exit, and ilUtil\getImagePath().

{
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
$lp_table = new ilLPObjectStatisticsLPTableGUI($this, "showLearningProgressDetails", array($_GET["item_id"]), true, false, true);
$a_tpl = new ilTemplate("tpl.lp_object_statistics_lp_details.html", true, true, "Services/Tracking");
$a_tpl->setVariable("CONTENT", $lp_table->getHTML());
$a_tpl->setVariable('CLOSE_IMG_SRC', ilUtil::getImagePath('icon_close2_s.png'));
$a_tpl->setVariable('CLOSE_IMG_TXT', $this->lng->txt('close'));
echo $a_tpl->get();
exit();
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::showLearningProgressGraph ( )

Definition at line 378 of file class.ilLPObjectStatisticsGUI.php.

References $_POST, ilLearningProgressBaseGUI\$lng, ilLearningProgressBaseGUI\$tpl, learningProgress(), and ilUtil\sendFailure().

{
global $lng, $tpl;
if(!$_POST["item_id"])
{
ilUtil::sendFailure($lng->txt("no_checkbox"));
return $this->learningProgress();
}
$this->tabs_gui->activateSubTab('trac_object_stat_lp');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsLPTableGUI.php");
$lp_table = new ilLPObjectStatisticsLPTableGUI($this, "learningProgress", $_POST["item_id"], true, true);
$tpl->setContent($lp_table->getGraph($_POST["item_id"]).$lp_table->getHTML());
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::showTypesGraph ( )

Definition at line 177 of file class.ilLPObjectStatisticsGUI.php.

References $_POST, ilLearningProgressBaseGUI\$lng, ilLearningProgressBaseGUI\$tpl, ilUtil\sendFailure(), and types().

{
global $lng, $tpl;
if(!$_POST["item_id"])
{
ilUtil::sendFailure($lng->txt("no_checkbox"));
return $this->types();
}
$this->tabs_gui->activateSubTab('trac_object_stat_types');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
$lp_table = new ilLPObjectStatisticsTypesTableGUI($this, "types", $_POST["item_id"]);
$tpl->setContent($lp_table->getGraph($_POST["item_id"]).$lp_table->getHTML());
}

+ Here is the call graph for this function:

ilLPObjectStatisticsGUI::types (   $a_load_data = true)

Definition at line 159 of file class.ilLPObjectStatisticsGUI.php.

References ilLearningProgressBaseGUI\$tpl.

Referenced by applyTypesFilter(), resetTypesFilter(), showTypesGraph(), and typesFilter().

{
global $tpl;
$this->tabs_gui->activateSubTab('trac_object_stat_types');
include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsTypesTableGUI.php");
$lp_table = new ilLPObjectStatisticsTypesTableGUI($this, "types", null, $a_load_data);
if(!$a_load_data)
{
$lp_table->disable("content");
$lp_table->disable("header");
}
$tpl->setContent($lp_table->getHTML());
}

+ Here is the caller graph for this function:

ilLPObjectStatisticsGUI::typesFilter ( )

Definition at line 154 of file class.ilLPObjectStatisticsGUI.php.

References types().

{
$this->types(false);
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: