ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLMStatisticsGUI Class Reference
+ Inheritance diagram for ilLMStatisticsGUI:
+ Collaboration diagram for ilLMStatisticsGUI:

Public Member Functions

 ilLMStatisticsGUI ($a_mode, $a_ref_id)
 show ()
 Anzeige der Stats-Auswahlm�glichkeiten.
 outputStatistics ()
 output statistics der Stats
 searchUserForm ()
 add users
 cancelMember ()
 members ()
 search ()
 searchCancelled ()
 __search ($a_search_string, $a_search_for)
 __showSearchUserTable ($a_result_set, $a_user_ids=NULL, $a_cmd="search")
 __showSearchRoleTable ($a_result_set, $a_role_ids=NULL)
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showSearchGroupTable ($a_result_set, $a_grp_ids=NULL)
 listUsersRole ()
 listUsersGroup ()
 addUser ()
executeCommand ()
 execute command
- Public Member Functions inherited from ilLearningProgressBaseGUI
 ilLearningProgressBaseGUI ($a_mode, $a_ref_id=0, $a_usr_id=0)
 activePDF ()
 __checkPDF ()
 isAnonymized ()
 isObjectAnonymized ()
 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)

Data Fields

 $lm_statistics
- Data Fields inherited from ilLearningProgressBaseGUI
 $tpl = null
 $ctrl = null
 $lng = null
 $ref_id = 0
 $mode = 0
 $statistics_activated = false

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")

Detailed Description

Definition at line 29 of file class.ilLMStatisticsGUI.php.

Member Function Documentation

ilLMStatisticsGUI::__search (   $a_search_string,
  $a_search_for 
)

Definition at line 412 of file class.ilLMStatisticsGUI.php.

References $_SESSION, ilUtil\sendFailure(), and ilUtil\stripSlashes().

Referenced by search().

{
include_once ("classes/class.ilSearch.php");
$this->lng->loadLanguageModule("content");
$search = & new ilSearch($_SESSION["AccountId"]);
$search->setPerformUpdate(false);
$search->setSearchString(ilUtil :: stripSlashes($a_search_string));
$search->setCombination("and");
$search->setSearchFor(array (0 => $a_search_for));
$search->setSearchType('new');
if ($search->validate($message))
{
$search->performSearch();
}
else
{
ilUtil::sendFailure($message, true);
$this->ctrl->redirect($this, "searchUserForm");
}
return $search->getResultByType($a_search_for);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLMStatisticsGUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $a_from = "" 
)

standard implementation for tables use 'from' variable use different initial setting of table

Definition at line 542 of file class.ilLMStatisticsGUI.php.

References $_GET.

Referenced by __showSearchGroupTable(), __showSearchRoleTable(), and __showSearchUserTable().

{
switch ($a_from)
{
case "clipboardObject":
$offset = $_GET["offset"];
$order = $_GET["sort_by"];
$direction = $_GET["sort_order"];
$tbl->disable("footer");
break;
default:
$offset = $_GET["offset"];
$order = $_GET["sort_by"];
$direction = $_GET["sort_order"];
break;
}
$tbl->setOrderColumn($order);
$tbl->setOrderDirection($direction);
$tbl->setOffset($offset);
$tbl->setLimit($_GET["limit"]);
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
$tbl->setData($result_set);
}

+ Here is the caller graph for this function:

ilLMStatisticsGUI::__showSearchGroupTable (   $a_result_set,
  $a_grp_ids = NULL 
)

Definition at line 568 of file class.ilLMStatisticsGUI.php.

References $_GET, ilLearningProgressBaseGUI\$tpl, ilLearningProgressBaseGUI\__initTableGUI(), __setTableGUIBasicData(), ilUtil\array_php2js(), and ilUtil\getImagePath().

Referenced by search().

{
$tbl = & $this->__initTableGUI();
$tpl = & $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME", "searchUserForm");
$tpl->setVariable("BTN_VALUE", $this->lng->txt("back"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME", "listUsersGroup");
$tpl->setVariable("BTN_VALUE", $this->lng->txt("grp_list_users"));
$tpl->parseCurrentBlock();
if (!empty ($a_grp_ids)) {
// set checkbox toggles
$tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
$tpl->setVariable("JS_VARNAME", "group");
$tpl->setVariable("JS_ONCLICK", ilUtil :: array_php2js($a_grp_ids));
$tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS", 5);
$tpl->setVariable("IMG_ARROW", ilUtil :: getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("grp_header_edit_members"), "icon_usr_b.gif", $this->lng->txt("grp_header_edit_members"));
$tbl->setHeaderNames(array ("", $this->lng->txt("obj_grp"), $this->lng->txt("grp_count_members")));
$tbl->setHeaderVars(array ("", "title", "nr_members"), array ("ref_id" => $this->ref_id, "cmd" => "search", "cmdClass" => "ilobjgroupgui", "cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array ("", "80%", "19%"));
$this->__setTableGUIBasicData($tbl, $a_result_set, "group");
$tbl->render();
$this->tpl->setVariable("SEARCH_RESULT_TABLE", $tbl->tpl->get());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLMStatisticsGUI::__showSearchRoleTable (   $a_result_set,
  $a_role_ids = NULL 
)

Definition at line 490 of file class.ilLMStatisticsGUI.php.

References $_GET, ilLearningProgressBaseGUI\$tpl, ilLearningProgressBaseGUI\__initTableGUI(), __setTableGUIBasicData(), ilUtil\array_php2js(), and ilUtil\getImagePath().

Referenced by search().

{
$tbl = & $this->__initTableGUI();
$tpl = & $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME", "searchUserForm");
$tpl->setVariable("BTN_VALUE", $this->lng->txt("back"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME", "listUsersRole");
$tpl->setVariable("BTN_VALUE", $this->lng->txt("grp_list_users"));
$tpl->parseCurrentBlock();
if (!empty ($a_role_ids)) {
// set checkbox toggles
$tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
$tpl->setVariable("JS_VARNAME", "role");
$tpl->setVariable("JS_ONCLICK", ilUtil :: array_php2js($a_role_ids));
$tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS", 5);
$tpl->setVariable("IMG_ARROW", ilUtil :: getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("grp_header_edit_members"), "icon_usr_b.gif", $this->lng->txt("grp_header_edit_members"));
$tbl->setHeaderNames(array ("", $this->lng->txt("obj_role"), $this->lng->txt("grp_count_members")));
$tbl->setHeaderVars(array ("", "title", "nr_members"), array ("ref_id" => $this->ref_id, "cmd" => "search", "cmdClass" => "ilobjgroupgui", "cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array ("", "80%", "19%"));
$this->__setTableGUIBasicData($tbl, $a_result_set, "role");
$tbl->render();
$this->tpl->setVariable("SEARCH_RESULT_TABLE", $tbl->tpl->get());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLMStatisticsGUI::__showSearchUserTable (   $a_result_set,
  $a_user_ids = NULL,
  $a_cmd = "search" 
)

Definition at line 436 of file class.ilLMStatisticsGUI.php.

References $_GET, ilLearningProgressBaseGUI\$tpl, ilLearningProgressBaseGUI\__initTableGUI(), __setTableGUIBasicData(), ilUtil\array_php2js(), and ilUtil\getImagePath().

Referenced by listUsersGroup(), listUsersRole(), and search().

{
$return_to = "searchUserForm";
if ($a_cmd == "listUsersRole" or $a_cmd == "listUsersGroup") {
$return_to = "search";
}
$tbl = & $this->__initTableGUI();
$tpl = & $tbl->getTemplateObject();
// SET FORMACTION
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME", $return_to);
$tpl->setVariable("BTN_VALUE", $this->lng->txt("back"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME", "addUser");
$tpl->setVariable("BTN_VALUE", $this->lng->txt("add"));
$tpl->parseCurrentBlock();
if (!empty ($a_user_ids)) {
// set checkbox toggles
$tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
$tpl->setVariable("JS_VARNAME", "user");
$tpl->setVariable("JS_ONCLICK", ilUtil :: array_php2js($a_user_ids));
$tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS", 5);
$tpl->setVariable("IMG_ARROW", ilUtil :: getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("grp_header_edit_members"), "icon_usr_b.gif", $this->lng->txt("grp_header_edit_members"));
$tbl->setHeaderNames(array ("", $this->lng->txt("username"), $this->lng->txt("firstname"), $this->lng->txt("lastname"), $this->lng->txt("last_visit")));
$tbl->setHeaderVars(array ("", "login", "firstname", "lastname", "last_visit"), array ("ref_id" => $this->ref_id, "cmd" => $a_cmd, "cmdClass" => "ilobjgroupgui", "cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array ("", "33%", "33%", "33%"));
$this->__setTableGUIBasicData($tbl, $a_result_set);
$tbl->render();
$this->tpl->setVariable("SEARCH_RESULT_TABLE", $tbl->tpl->get());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLMStatisticsGUI::addUser ( )

Definition at line 731 of file class.ilLMStatisticsGUI.php.

References $_POST, $_SESSION, and show().

{
//echo "addUserObject() ausgefuehrt;";
$user_ids = $_POST["user"];
if (empty ($user_ids[0])) {
//echo "...nix weitergeleitet...";
// TODO: jumps back to grp content. go back to last search result
$this->ilErr->raiseError($this->lng->txt("no_checkbox"), $this->ilErr->MESSAGE);
} else {
//echo "...Daten weitergeleitet...";
}
$_SESSION["il_track_stat2"] = "choice";
$_SESSION["userSelected_stat"] = $_POST["user"];
$this->show();
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::cancelMember ( )

Definition at line 279 of file class.ilLMStatisticsGUI.php.

References ilUtil\redirect().

{
$return_location = "members";
ilUtil :: redirect($this->ctrl->getLinkTarget($this, $return_location));
}

+ Here is the call graph for this function:

& ilLMStatisticsGUI::executeCommand ( )

execute command

Definition at line 751 of file class.ilLMStatisticsGUI.php.

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

{
if (isset($_POST["cmd"]["searchUserForm"]))
{
$cmd = "searchUserForm";
} elseif (isset($_POST["cmd"]["outputStatistics"]))
{
$cmd = "outputStatistics";
} else switch ($this->ctrl->getNextClass()) {
default :
}
$this-> $cmd ();
return true;
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::ilLMStatisticsGUI (   $a_mode,
  $a_ref_id 
)

Definition at line 33 of file class.ilLMStatisticsGUI.php.

References ilLearningProgressBaseGUI\ilLearningProgressBaseGUI().

{
$this->lm_statistics = new ilLMStatistics($this->obj_id);
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::listUsersGroup ( )

Definition at line 670 of file class.ilLMStatisticsGUI.php.

References $_POST, $_SESSION, $user, ilLearningProgressBaseGUI\__showButton(), __showSearchUserTable(), ilFormat\formatDate(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), ilObjectFactory\getInstanceByRefId(), and ilUtil\sendFailure().

{
global $rbacsystem, $rbacreview, $tree;
$_SESSION["grp_group"] = $_POST["group"] = $_POST["group"] ? $_POST["group"] : $_SESSION["grp_group"];
// MINIMUM ACCESS LEVEL = 'administrate'
if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
}
if (!is_array($_POST["group"])) {
ilUtil::sendFailure($this->lng->txt("grp_no_groups_selected"));
$this->searchObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html");
$this->__showButton("searchUserForm", $this->lng->txt("grp_new_search"));
// GET ALL MEMBERS
$members = array ();
foreach ($_POST["group"] as $group_id) {
if (!$tree->isInTree($group_id)) {
continue;
}
if (!$tmp_obj = ilObjectFactory :: getInstanceByRefId($group_id)) {
continue;
}
$members = array_merge($tmp_obj->getGroupMemberIds(), $members);
unset ($tmp_obj);
}
$members = array_unique($members);
// FORMAT USER DATA
$counter = 0;
$f_result = array ();
foreach ($members as $user) {
if (!$tmp_obj = ilObjectFactory :: getInstanceByObjId($user, false)) {
continue;
}
$user_ids[$counter] = $user;
$f_result[$counter][] = ilUtil :: formCheckbox(0, "user[]", $user);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getLastname();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = ilFormat :: formatDate($tmp_obj->getLastLogin());
unset ($tmp_obj);
++ $counter;
}
$this->__showSearchUserTable($f_result, $user_ids, "listUsersGroup");
return true;
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::listUsersRole ( )

Definition at line 614 of file class.ilLMStatisticsGUI.php.

References $_POST, $_SESSION, $user, ilLearningProgressBaseGUI\__showButton(), __showSearchUserTable(), ilFormat\formatDate(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), and ilUtil\sendFailure().

{
global $rbacsystem, $rbacreview;
$_SESSION["grp_role"] = $_POST["role"] = $_POST["role"] ? $_POST["role"] : $_SESSION["grp_role"];
// MINIMUM ACCESS LEVEL = 'administrate'
if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
}
if (!is_array($_POST["role"])) {
ilUtil::sendFailure($this->lng->txt("grp_no_roles_selected"));
$this->searchObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html");
$this->__showButton("searchUserForm", $this->lng->txt("grp_new_search"));
// GET ALL MEMBERS
$members = array ();
foreach ($_POST["role"] as $role_id) {
$members = array_merge($rbacreview->assignedUsers($role_id), $members);
}
$members = array_unique($members);
// FORMAT USER DATA
$counter = 0;
$f_result = array ();
foreach ($members as $user) {
if (!$tmp_obj = ilObjectFactory :: getInstanceByObjId($user, false)) {
continue;
}
if (!$tmp_obj->active) {
continue;
}
$user_ids[$counter] = $user;
$f_result[$counter][] = ilUtil :: formCheckbox(0, "user[]", $user);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getLastname();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = ilFormat :: formatDate($tmp_obj->getLastLogin());
unset ($tmp_obj);
++ $counter;
}
$this->__showSearchUserTable($f_result, $user_ids, "listUsersRole");
return true;
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::members ( )

Definition at line 285 of file class.ilLMStatisticsGUI.php.

References show().

{
$this->show();
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::outputStatistics ( )

output statistics der Stats

Definition at line 233 of file class.ilLMStatisticsGUI.php.

References $_POST.

{
require_once "./Services/Tracking/classes/class.ilLMStatistics.php";
if ($_POST["stat"] == 'u') { //Beobachtungsmodell starten
$this->lm_statistics->outputApplet();
} else { //Session-,Seiten-,Kapitelstats starten
$this->lm_statistics->outputHTML();
}
}
ilLMStatisticsGUI::search ( )

Definition at line 289 of file class.ilLMStatisticsGUI.php.

References $_POST, $_SESSION, $result, $user, __search(), ilLearningProgressBaseGUI\__showButton(), __showSearchGroupTable(), __showSearchRoleTable(), __showSearchUserTable(), ilFormat\formatDate(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), ilObjectFactory\getInstanceByRefId(), searchUserForm(), ilUtil\sendFailure(), and ilUtil\stripSlashes().

{
global $rbacsystem, $tree;
$_SESSION["grp_search_str"] = $_POST["search_str"] = $_POST["search_str"] ? $_POST["search_str"] : $_SESSION["grp_search_str"];
$_SESSION["grp_search_for"] = $_POST["search_for"] = $_POST["search_for"] ? $_POST["search_for"] : $_SESSION["grp_search_for"];
// MINIMUM ACCESS LEVEL = 'administrate'
if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
}
if (!isset ($_POST["search_for"]) or !isset ($_POST["search_str"])) {
ilUtil::sendFailure($this->lng->txt("grp_search_enter_search_string"));
$this->searchUserForm();
return false;
}
if (!count($result = $this->__search(ilUtil :: stripSlashes($_POST["search_str"]), $_POST["search_for"]))) {
ilUtil::sendFailure($this->lng->txt("grp_no_results_found"));
$this->searchUserForm();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html");
$this->__showButton("searchUserForm", $this->lng->txt("grp_new_search"));
$counter = 0;
$f_result = array ();
switch ($_POST["search_for"]) {
case "usr" :
foreach ($result as $user) {
if (!$tmp_obj = ilObjectFactory :: getInstanceByObjId($user["id"], false)) {
continue;
}
$user_ids[$counter] = $user["id"];
$f_result[$counter][] = ilUtil :: formCheckbox(0, "user[]", $user["id"]);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
$f_result[$counter][] = ilFormat :: formatDate($tmp_obj->getLastLogin());
unset ($tmp_obj);
++ $counter;
}
$this->__showSearchUserTable($f_result, $user_ids);
return true;
case "role" :
foreach ($result as $role) {
// exclude anonymous role
if ($role["id"] == ANONYMOUS_ROLE_ID) {
continue;
}
if (!$tmp_obj = ilObjectFactory :: getInstanceByObjId($role["id"], false)) {
continue;
}
// exclude roles with no users assigned to
if ($tmp_obj->getCountMembers() == 0) {
continue;
}
$role_ids[$counter] = $role["id"];
$f_result[$counter][] = ilUtil :: formCheckbox(0, "role[]", $role["id"]);
$f_result[$counter][] = array ($tmp_obj->getTitle(), $tmp_obj->getDescription());
$f_result[$counter][] = $tmp_obj->getCountMembers();
unset ($tmp_obj);
++ $counter;
}
$this->__showSearchRoleTable($f_result, $role_ids);
return true;
case "grp" :
foreach ($result as $group) {
if (!$tree->isInTree($group["id"])) {
continue;
}
if (!$tmp_obj = ilObjectFactory :: getInstanceByRefId($group["id"], false)) {
continue;
}
// exclude myself :-)
if ($tmp_obj->getId() == $this->object->getId()) {
continue;
}
$grp_ids[$counter] = $group["id"];
$f_result[$counter][] = ilUtil :: formCheckbox(0, "group[]", $group["id"]);
$f_result[$counter][] = array ($tmp_obj->getTitle(), $tmp_obj->getDescription());
$f_result[$counter][] = $tmp_obj->getCountMembers();
unset ($tmp_obj);
++ $counter;
}
if (!count($f_result)) {
ilUtil::sendFailure($this->lng->txt("grp_no_results_found"));
$this->searchUserFormObject();
return false;
}
$this->__showSearchGroupTable($f_result, $grp_ids);
return true;
}
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::searchCancelled ( )

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

References ilUtil\redirect().

{
ilUtil :: redirect($this->ctrl->getLinkTarget($this, "members"));
}

+ Here is the call graph for this function:

ilLMStatisticsGUI::searchUserForm ( )

add users

Definition at line 246 of file class.ilLMStatisticsGUI.php.

References $_POST, $_SESSION, and ilUtil\formRadioButton().

Referenced by search().

{
global $rbacsystem;
$this->lng->loadLanguageModule('search');
// MINIMUM ACCESS LEVEL = 'administrate'
if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_members_search.html");
$this->tpl->setVariable("F_ACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("SEARCH_ASSIGN_USR", $this->lng->txt("grp_search_members"));
$this->tpl->setVariable("SEARCH_SEARCH_TERM", $this->lng->txt("search_search_term"));
$this->tpl->setVariable("SEARCH_VALUE", $_SESSION["grp_search_str"] ? $_SESSION["grp_search_str"] : "");
$this->tpl->setVariable("SEARCH_FOR", $this->lng->txt("exc_search_for"));
$this->tpl->setVariable("SEARCH_ROW_TXT_USER", $this->lng->txt("exc_users"));
$this->tpl->setVariable("SEARCH_ROW_TXT_ROLE", $this->lng->txt("exc_roles"));
$this->tpl->setVariable("SEARCH_ROW_TXT_GROUP", $this->lng->txt("exc_groups"));
$this->tpl->setVariable("BTN2_VALUE", $this->lng->txt("cancel"));
$this->tpl->setVariable("BTN1_VALUE", $this->lng->txt("search"));
$usr = ($_POST["search_for"] == "usr" || $_POST["search_for"] == "") ? 1 : 0;
$grp = ($_POST["search_for"] == "grp") ? 1 : 0;
$role = ($_POST["search_for"] == "role") ? 1 : 0;
$this->tpl->setVariable("SEARCH_ROW_CHECK_USER", ilUtil :: formRadioButton($usr, "search_for", "usr"));
$this->tpl->setVariable("SEARCH_ROW_CHECK_ROLE", ilUtil :: formRadioButton($role, "search_for", "role"));
$this->tpl->setVariable("SEARCH_ROW_CHECK_GROUP", ilUtil :: formRadioButton($grp, "search_for", "grp"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLMStatisticsGUI::show ( )

Anzeige der Stats-Auswahlm�glichkeiten.

Definition at line 43 of file class.ilLMStatisticsGUI.php.

References $_SESSION, $ilDB, ilLearningProgressBaseGUI\$lng, $result, $row, ilLearningProgressBaseGUI\$tpl, and ilObjUserTracking\_enabledUserRelatedData().

Referenced by addUser(), and members().

{
global $tpl, $lng, $ilias,$ilDB;
$q = "SELECT obj_id, type,title FROM object_data WHERE type ='lm' and obj_id=".$ilDB->quote($this->obj_id ,'integer');
$result = $ilias->db->query($q);
while ($row = $result->fetchRow()) {
$Lehrmodulanz ++;
$LehrmodulID[$Lehrmodulanz] = $row[0];
$rLehrmodulID[$row[0]] = $Lehrmodulanz;
$LehrmodulName[$Lehrmodulanz] = $row[2];
}
$_SESSION["il_track_rlm_id"] = $rLehrmodulID;
$_SESSION["il_track_lm_name"] = $LehrmodulName;
$q = "SELECT obj_id,title,type,lm_id FROM lm_data WHERE type='pg'";
$result = $ilias->db->query($q);
while ($row = $result->fetchRow()) {
$LMSeitenanz[$rLehrmodulID[$row[3]]]++;
}
$year = array (2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012);
$month = array (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
$day = array (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31);
$tpl->addBlockFile("ADM_CONTENT", "adm_content", "Services/Tracking/templates/default/tpl.lm_statistics_settings.html");
// $tpl->setVariable("SEARCH_ACTION", ".php?ref_id=".$_GET["ref_id"]."&cmd=gateway");
$tpl->setVariable("SEARCH_ACTION", $this->ctrl->getLinkTargetByClass('illmstatisticsgui',''));
$tpl->setVariable("TXT_TRACKING_DATA", $lng->txt("tracking_data"));
$tpl->setVariable("TXT_TIME_SEGMENT", $lng->txt("time_segment"));
$tpl->setVariable("TXT_STATISTIC", $lng->txt("statistic"));
$tpl->setVariable("TXT_STATISTIC_H", $lng->txt("stats_pages_statisics"));
$tpl->setVariable("TXT_STATISTIC_D", $lng->txt("stats_chapter_statisics"));
$tpl->setVariable("TXT_STATISTIC_O", $lng->txt("stats_sessions_statisics"));
$tpl->setVariable("TXT_STATISTIC_U", $lng->txt("stats_navigation"));
$tpl->setVariable("TXT_USER_LANGUAGE", $lng->txt("user_language"));
$tpl->setVariable("TXT_LM", $lng->txt("lm"));
$tpl->setVariable("TXT_SHOW_TR_DATA", $lng->txt("query_data"));
$tpl->setVariable("TXT_SHOW_TR_DATA2", $lng->txt("stats_new_selection"));
$tpl->setVariable("TXT_TRACKED_OBJECTS", $lng->txt("tracked_objects"));
$tpl->setVariable("TXT_TRACKED_USER", $lng->txt("stats_tracked_user"));
$tpl->setVariable("TXT_ALLE", $lng->txt("stats_all"));
$tpl->setVariable("TXT_AUSWAHL", $lng->txt("stats_choice"));
if ($_SESSION["il_track_yearf"] == "") {
$_SESSION["il_track_yearf"] = Date("Y");
$_SESSION["il_track_yeart"] = Date("Y");
$_SESSION["il_track_monthf"] = "1";
$_SESSION["il_track_montht"] = Date("n");
$_SESSION["il_track_dayf"] = "1";
$_SESSION["il_track_dayt"] = Date("j");
}
if ($_SESSION["il_track_stat"] == "") {
$_SESSION["il_track_stat"] = 'h';
}
$languages = $lng->getInstalledLanguages();
$tpl->setCurrentBlock("lm_selection");
$_SESSION["il_track_lm"] = $this->obj_id;
$tpl->setVariable("LM_ID", $LehrmodulID[1]);
$tpl->setVariable("LM_DESC", substr($LehrmodulName[1], 0, 40)." (S:".$LMSeitenanz[1].")");
$tpl->parseCurrentBlock();
if ($_SESSION["il_track_stat2"] == "choice") {
$tpl->setVariable("CHC_CHK", " checked=\"1\" ");
} else {
$tpl->setVariable("ALL_CHK", " checked=\"1\" ");
}
$user_IDs = $_SESSION["userSelected_stat"];
$tpl->setCurrentBlock("user_selection");
if (count($user_IDs) > 0) {
foreach ($_SESSION["userSelected_stat"] as $result_id) {
$tpl->setVariable("USER1", $result_id);
$tpl->setVariable("USER2", $result_id);
}
} else {
$tpl->setCurrentBlock("user_selection");
$tpl->setVariable("USER1", "Alle");
$tpl->setVariable("USER2", "Alle");
}
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
$tpl->setVariable ("DISABLED", "disabled");
$tpl->setVariable("ALL_CHK", " checked=\"1\" ");
$tpl->setVariable("CHC_CHK", "");
} else {
$tpl->setVariable("INFO1", $lng->txt(stats_current).": ".count($_SESSION["userSelected_stat"])." ".$lng->txt("stats_user_selected"));
}
$tpl->parseCurrentBlock();
//Datum von:
foreach ($year as $key) {
$tpl->setCurrentBlock("fromyear_selection");
$tpl->setVariable("YEARFR", $key);
$tpl->setVariable("YEARF", $key);
if ($_SESSION["il_track_yearf"] == $key) {
$tpl->setVariable("YEARF_SEL", " selected=\"1\" ");
}
$tpl->parseCurrentBlock();
}
foreach ($month as $key) {
$tpl->setCurrentBlock("frommonth_selection");
$tpl->setVariable("MONTHFR", $key);
$tpl->setVariable("MONTHF", $key);
if ($_SESSION["il_track_monthf"] == $key) {
$tpl->setVariable("MONTHF_SEL", " selected=\"1\" ");
}
$tpl->parseCurrentBlock();
}
foreach ($day as $key) {
$tpl->setCurrentBlock("fromday_selection");
$tpl->setVariable("DAYFR", $key);
$tpl->setVariable("DAYF", $key);
if ($_SESSION["il_track_dayf"] == $key) {
$tpl->setVariable("DAYF_SEL", " selected=\"1\" ");
}
$tpl->parseCurrentBlock();
}
//Datum nach:
foreach ($day as $key) {
$tpl->setCurrentBlock("today_selection");
$tpl->setVariable("DAYTO", $key);
$tpl->setVariable("DAYT", $key);
if ($_SESSION["il_track_dayt"] == $key) {
$tpl->setVariable("DAYT_SEL", " selected=\"1\" ");
}
$tpl->parseCurrentBlock();
}
foreach ($month as $key) {
$tpl->setCurrentBlock("tomonth_selection");
$tpl->setVariable("MONTHTO", $key);
$tpl->setVariable("MONTHT", $key);
if ($_SESSION["il_track_montht"] == $key) {
$tpl->setVariable("MONTHT_SEL", " selected=\"1\" ");
}
$tpl->parseCurrentBlock();
}
foreach ($year as $key) {
$tpl->setCurrentBlock("toyear_selection");
$tpl->setVariable("YEARTO", $key);
$tpl->setVariable("YEART", $key);
if ($_SESSION["il_track_yeart"] == $key) {
$tpl->setVariable("YEART_SEL", " selected=\"1\" ");
}
$tpl->parseCurrentBlock();
}
// language selection
$tpl->setCurrentBlock("language_selection");
$tpl->setVariable("LANG", $lng->txt("any_language"));
$tpl->setVariable("LANGSHORT", "0");
$tpl->parseCurrentBlock();
foreach ($languages as $lang_key) {
$tpl->setCurrentBlock("language_selection");
$tpl->setVariable("LANG", $lng->txt("lang_".$lang_key));
$tpl->setVariable("LANGSHORT", $lang_key);
if ($_SESSION["il_track_language"] == $lang_key) {
$tpl->setVariable("LANG_SEL", " selected=\"1\" ");
}
$tpl->parseCurrentBlock();
}
// statistic type
if ($_SESSION["il_track_stat"] == "d") {
$tpl->setVariable("D_CHK", " checked=\"1\" ");
}
elseif ($_SESSION["il_track_stat"] == "h") {
$tpl->setVariable("H_CHK", " checked=\"1\" ");
}
elseif ($_SESSION["il_track_stat"] == "o") {
$tpl->setVariable("O_CHK", " checked=\"1\" ");
}
elseif ($_SESSION["il_track_stat"] == "u") {
$tpl->setVariable("U_CHK", " checked=\"1\" ");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilLMStatisticsGUI::$lm_statistics

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


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