Public Member Functions

ilObjGroupGUI Class Reference

Inheritance diagram for ilObjGroupGUI:
Collaboration diagram for ilObjGroupGUI:

Public Member Functions

 ilObjGroupGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=false)
 Constructor public.
 viewObject ()
 list childs of current object
executeCommand ()
 execute command note: this method is overwritten in all container objects
 listExportFilesObject ()
 __exportMenu ()
 exportXMLObject ()
 confirmDeleteExportFileObject ()
 downloadExportFileObject ()
 createObject ()
 create new object form
 canceledObject ()
 canceledObject is called when operation is canceled, method links back public
 cancelMemberObject ()
 canceledObject is called when operation is canceled, method links back public
 saveObject ()
 save group object public
 updateObject ()
 update GroupObject public
 editObject ()
 edit Group public
 confirmationObject ($user_id="", $confirm, $cancel, $info="", $status="", $a_cmd_return_location="")
 displays confirmation form public
 leaveGrpObject ()
 leave Group public
 assignMemberObject ()
 displays confirmation formular with users that shall be assigned to group public
 addUserObject ()
 displays confirmation formular with users that shall be assigned to group public
 removeMemberObject ()
 displays confirmation formular with users that shall be removed from group public
 confirmedRemoveMemberObject ()
 remove members from group public
 changeMemberObject ()
 displays form in which the member-status can be changed public
 membersObject ()
 display group members
 mailMembersObject ()
 setSubTabs ($a_tab)
 set sub tabs
 showNewRegistrationsObject ()
 assignApplicantsObject ()
 adds applicant to group as member public
 refuseApplicantsObject ()
 adds applicant to group as member public
 updateMemberStatusObject ()
 displays form in which the member-status can be changed public
 searchUserFormObject ()
 __appendToStoredResults ($a_result)
 cancelSearchObject ()
 searchObject ()
 searchCancelledObject ()
 getTabs (&$tabs_gui)
 common tabs for all container objects (should be called at the end of child getTabs() method
 importFileObject ()
 initCourseContentInterface ()
 cciEditObject ()
 cciUpdateObject ()
 cciMoveObject ()
 __unsetSessionVariables ()
 __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)
 __showSearchGroupTable ($a_result_set, $a_grp_ids=NULL)
 __showMembersTable ($a_result_set, $a_user_ids=NULL)
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 listUsersRoleObject ()
 removeSmallIconObject ()
 remove small icon
 removeBigIconObject ()
 remove big icon
 listUsersGroupObject ()
 initConditionHandlerGUI ($item_id)
 chi_updateObject ()
 chi_deleteObject ()
 chi_selectorObject ()
 chi_assignObject ()
 exportObject ()
 Creates the output form for group member export.
 exportMembersObject ()
 Exports group members to Microsoft Excel file.
 cleanString ($str)
 Clean output string from german umlauts.
 __setSubTabs ($a_tab)
 set sub tabs

Detailed Description

Definition at line 41 of file class.ilObjGroupGUI.php.


Member Function Documentation

ilObjGroupGUI::__appendToStoredResults ( a_result  ) 

Definition at line 1424 of file class.ilObjGroupGUI.php.

References $_SESSION, and $result.

Referenced by __search(), listUsersGroupObject(), and listUsersRoleObject().

        {
                $tmp_array = array();
                foreach($a_result as $result)
                {
                        if(is_array($result))
                        {
                                $tmp_array[] = $result['id'];
                        }
                        elseif($result)
                        {
                                $tmp_array[] = $result;
                        }
                }
                // merge results
                
                $_SESSION['grp_usr_search_result'] = array_unique(array_merge((array) $_SESSION['grp_usr_search_result'],$tmp_array));
                return $_SESSION['grp_usr_search_result'];
        }

Here is the caller graph for this function:

ilObjGroupGUI::__exportMenu (  ) 

Definition at line 240 of file class.ilObjGroupGUI.php.

Referenced by listExportFilesObject().

        {
                // create xml export file button
                $this->tpl->setCurrentBlock("btn_cell");
                $this->tpl->setVariable("BTN_LINK", $this->ctrl->getLinkTarget($this, "exportXML"));
                $this->tpl->setVariable("BTN_TXT", $this->lng->txt("cont_create_export_file_xml"));
                $this->tpl->parseCurrentBlock();
        }

Here is the caller graph for this function:

& ilObjGroupGUI::__initTableGUI (  ) 

Reimplemented from ilObjectGUI.

Definition at line 2070 of file class.ilObjGroupGUI.php.

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

        {
                include_once "class.ilTableGUI.php";

                return new ilTableGUI(0,false);
        }

Here is the caller graph for this function:

ilObjGroupGUI::__search ( a_search_string,
a_search_for 
)

Definition at line 1759 of file class.ilObjGroupGUI.php.

References $_SESSION, __appendToStoredResults(), sendInfo(), and ilUtil::stripSlashes().

Referenced by searchObject().

        {
                include_once("class.ilSearch.php");

                $this->lng->loadLanguageModule("content");
                $search =& new ilSearch($_SESSION["AccountId"]);
                $search->setPerformUpdate(false);
                $search->setMinWordLength(1);
                $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
                {
                        sendInfo($message,true);
                        $this->ctrl->redirect($this,"searchUserForm");
                }

                if($a_search_for == 'usr')
                {
                        $this->__appendToStoredResults($search->getResultByType($a_search_for));
                        return $_SESSION['grp_usr_search_result'];
                }

                return $search->getResultByType($a_search_for);
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjGroupGUI::__setSubTabs ( a_tab  ) 

set sub tabs

Definition at line 2527 of file class.ilObjGroupGUI.php.

References $ilUser, and $rbacsystem.

Referenced by cciEditObject(), and executeCommand().

        {
                global $rbacsystem,$ilUser;
        
                switch ($a_tab)
                {
                                
                        case "activation":
                                $this->tabs_gui->addSubTabTarget("activation",
                                                                                                 $this->ctrl->getLinkTarget($this,'cciEdit'),
                                                                                                 "cciEdit", get_class($this));
                                $this->tabs_gui->addSubTabTarget("preconditions",
                                                                                                 $this->ctrl->getLinkTargetByClass('ilConditionHandlerInterface','listConditions'),
                                                                                                 "", "ilConditionHandlerInterface");
                                break;
                }
        }

Here is the caller graph for this function:

ilObjGroupGUI::__setTableGUIBasicData ( &$  tbl,
&$  result_set,
a_from = "" 
)

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

Reimplemented from ilObjectGUI.

Definition at line 2077 of file class.ilObjGroupGUI.php.

References $_GET, and $tbl.

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

        {
        switch($from)
                {
                        case "subscribers":
                                $offset = $_GET["update_subscribers"] ? $_GET["offset"] : 0;
                                $order = $_GET["update_subscribers"] ? $_GET["sort_by"] : 'login';
                                $direction = $_GET["update_subscribers"] ? $_GET["sort_order"] : '';
                                break;

                        case "group":
                                $offset = $_GET["offset"];
                        $order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
                                $direction = $_GET["sort_order"];
                                break;
                                
                        case "role":
                                $offset = $_GET["offset"];
                        $order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
                                $direction = $_GET["sort_order"];
                                break;

                        default:
                                $offset = $_GET["offset"];
                                // init sort_by (unfortunatly sort_by is preset with 'title'
                        if ($_GET["sort_by"] == "title" or empty($_GET["sort_by"]))
                {
                    $_GET["sort_by"] = "login";
                }
                $order = $_GET["sort_by"];
                                $direction = $_GET["sort_order"];
                                break;
                }

                $tbl->setOrderColumn($order);
                $tbl->setOrderDirection($direction);
                $tbl->setOffset($offset);
                $tbl->setLimit($_GET["limit"]);
                //$tbl->setMaxCount(count($result_set));
                $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
                $tbl->setData($result_set);
        }

Here is the caller graph for this function:

ilObjGroupGUI::__showMembersTable ( a_result_set,
a_user_ids = NULL 
)

Definition at line 1987 of file class.ilObjGroupGUI.php.

References ilObjectGUI::$actions, $ilBench, $rbacsystem, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilUtil::array_php2js(), and ilUtil::getImagePath().

Referenced by membersObject().

        {
        global $rbacsystem,$ilBench;
        
                $ilBench->start("GroupGUI", "__showMembersTable");

                $actions = array("RemoveMember"  => $this->lng->txt("remove"),"changeMember"  => $this->lng->txt("change"));

        $tbl =& $this->__initTableGUI();
                $tpl =& $tbl->getTemplateObject();

                $tpl->setCurrentBlock("tbl_form_header");
                $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
                $tpl->parseCurrentBlock();

                $tpl->setCurrentBlock("tbl_action_row");
                
                //INTERIMS:quite a circumstantial way to show the list on rolebased accessrights
                if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
                {                       //user is administrator
            $tpl->setCurrentBlock("plain_button");
                    $tpl->setVariable("PBTN_NAME","searchUserForm");
                    $tpl->setVariable("PBTN_VALUE",$this->lng->txt("grp_add_member"));
                    $tpl->parseCurrentBlock();
                    $tpl->setCurrentBlock("plain_buttons");
                    $tpl->parseCurrentBlock();
                
                        $tpl->setVariable("COLUMN_COUNTS",7);
                        $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));

            foreach ($actions as $name => $value)
                        {
                                $tpl->setCurrentBlock("tbl_action_btn");
                                $tpl->setVariable("BTN_NAME",$name);
                                $tpl->setVariable("BTN_VALUE",$value);
                                $tpl->parseCurrentBlock();
                        }
                        
                        if (!empty($a_user_ids))
                        {
                                // set checkbox toggles
                                $tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
                                $tpl->setVariable("JS_VARNAME","user_id");                      
                                $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->setVariable("TPLPATH",$this->tpl->tplPath);
                }

                $this->ctrl->setParameter($this,"cmd","members");


                // title & header columns
                $tbl->setTitle($this->lng->txt("members"),"icon_usr_b.gif",$this->lng->txt("group_members"));

                //INTERIMS:quite a circumstantial way to show the list on rolebased accessrights
                if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
                {
                        //user must be administrator
                        $tbl->setHeaderNames(array("",$this->lng->txt("username"),$this->lng->txt("firstname"),$this->lng->txt("lastname"),$this->lng->txt("last_visit"),$this->lng->txt("role"),$this->lng->txt("grp_options")));
                        $tbl->setHeaderVars(array("","login","firstname","lastname","date","role","functions"),$this->ctrl->getParameterArray($this,"",false));
                        $tbl->setColumnWidth(array("","22%","22%","22%","22%","10%"));
                }
                else
                {
                        //user must be member
                        $tbl->setHeaderNames(array($this->lng->txt("username"),$this->lng->txt("firstname"),$this->lng->txt("lastname"),$this->lng->txt("last_visit"),$this->lng->txt("role"),$this->lng->txt("grp_options")));
                        $tbl->setHeaderVars(array("login","firstname","lastname","date","role","functions"),$this->ctrl->getParameterArray($this,"",false));
                        $tbl->setColumnWidth(array("22%","22%","22%","22%","10%"));
                }

                $this->__setTableGUIBasicData($tbl,$a_result_set,"members");
                $tbl->render();
                $this->tpl->setVariable("MEMBER_TABLE",$tbl->tpl->get());
                
                $ilBench->stop("GroupGUI", "__showMembersTable");

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjGroupGUI::__showSearchGroupTable ( a_result_set,
a_grp_ids = NULL 
)

Definition at line 1927 of file class.ilObjGroupGUI.php.

References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI::__showButton(), ilUtil::array_php2js(), and ilUtil::getImagePath().

Referenced by searchObject().

        {
                $this->__showButton('searchUserForm',$this->lng->txt("back"));

        $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->object->getRefId(),
                                                                  "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:

ilObjGroupGUI::__showSearchRoleTable ( a_result_set,
a_role_ids = NULL 
)

Definition at line 1867 of file class.ilObjGroupGUI.php.

References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI::__showButton(), ilUtil::array_php2js(), and ilUtil::getImagePath().

Referenced by searchObject().

        {
                $this->__showButton('searchUserForm',$this->lng->txt("back"));

                $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->object->getRefId(),
                                                                  "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:

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

Definition at line 1791 of file class.ilObjGroupGUI.php.

References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI::__showButton(), ilUtil::array_php2js(), and ilUtil::getImagePath().

Referenced by listUsersGroupObject(), listUsersRoleObject(), and searchObject().

        {
                $this->__showButton('searchUserForm',$this->lng->txt("back"));
        
        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","addUser");
                $tpl->setVariable("BTN_VALUE",$this->lng->txt("add"));
                $tpl->parseCurrentBlock();

                $tpl->setCurrentBlock("plain_button");
                $tpl->setVariable("PBTN_NAME",'searchUserForm');
                $tpl->setVariable("PBTN_VALUE",$this->lng->txt('append_search'));
                $tpl->parseCurrentBlock();
                
                $tpl->setCurrentBlock("plain_button");
                $tpl->setVariable("PBTN_NAME",'cancelSearch');
                $tpl->setVariable("PBTN_VALUE",$this->lng->txt("grp_new_search"));
                $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->object->getRefId(),
                                                                  "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:

ilObjGroupGUI::__unsetSessionVariables (  ) 

Definition at line 1748 of file class.ilObjGroupGUI.php.

References $_SESSION.

Referenced by searchUserFormObject().

        {
                unset($_SESSION["grp_delete_member_ids"]);
                unset($_SESSION["grp_delete_subscriber_ids"]);
                unset($_SESSION["grp_search_str"]);
                unset($_SESSION["grp_search_for"]);
                unset($_SESSION["grp_role"]);
                unset($_SESSION["grp_group"]);
                unset($_SESSION["grp_archives"]);
        }

Here is the caller graph for this function:

ilObjGroupGUI::addUserObject (  ) 

displays confirmation formular with users that shall be assigned to group public

Definition at line 846 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, ilUtil::redirect(), and sendInfo().

        {
                $user_ids = $_POST["user"];
                
                $mail = new ilMail($_SESSION["AccountId"]);

                if (empty($user_ids[0]))
                {
                        // TODO: jumps back to grp content. go back to last search result
                        $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
                }

                foreach ($user_ids as $new_member)
                {
                        if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
                        {
                                $this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
                        }
                        
                        $user_obj = $this->ilias->obj_factory->getInstanceByObjId($new_member);
                
                        $user_obj->addDesktopItem($this->object->getRefId(),"grp");
                        $mail->sendMail($user_obj->getLogin(),"","",$this->lng->txtlng("common","grp_mail_subj_new_subscription",$user_obj->getLanguage()).": ".$this->object->getTitle(),$this->lng->txtlng("common","grp_mail_body_new_subscription",$user_obj->getLanguage()),array(),array('normal'));      

                        unset($user_obj);
                }
                
                unset($_SESSION["saved_post"]);
                unset($_SESSION['grp_usr_search_result']);

                sendInfo($this->lng->txt("grp_msg_member_assigned"),true);
                ilUtil::redirect($this->ctrl->getLinkTarget($this,"members"));
        }

Here is the call graph for this function:

ilObjGroupGUI::assignApplicantsObject (  ) 

adds applicant to group as member public

Definition at line 1308 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, $user, ilUtil::redirect(), and sendInfo().

        {
                $user_ids = $_POST["user_id"];

                if (empty($user_ids[0]))
                {
                        $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
                }

                $mail = new ilMail($_SESSION["AccountId"]);

                foreach ($user_ids as $new_member)
                {
                        $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);

                        if (!$this->object->addMember($new_member, $this->object->getDefaultMemberRole()))
                        {
                                $this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
                        }

                        $this->object->deleteApplicationListEntry($new_member);
                        $mail->sendMail($user->getLogin(),"","","New Membership in Group: ".$this->object->getTitle(),"You have been assigned to the group as a member. You can now access all group specific objects like forums, learningmodules,etc..",array(),array('normal'));
                }

                sendInfo($this->lng->txt("grp_msg_applicants_assigned"),true);
                ilUtil::redirect($this->ctrl->getLinkTarget($this,"members"));
        }

Here is the call graph for this function:

ilObjGroupGUI::assignMemberObject (  ) 

displays confirmation formular with users that shall be assigned to group public

Definition at line 818 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, ilUtil::redirect(), and sendInfo().

        {
                $user_ids = $_POST["id"];

                if (empty($user_ids[0]))
                {
                        // TODO: jumps back to grp content. go back to last search result
                        $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
                }

                foreach ($user_ids as $new_member)
                {
                        if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
                        {
                                $this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
                        }
                }

                unset($_SESSION["saved_post"]);

                sendInfo($this->lng->txt("grp_msg_member_assigned"),true);
                ilUtil::redirect($this->ctrl->getLinkTarget($this,"members"));
        }

Here is the call graph for this function:

ilObjGroupGUI::canceledObject (  ) 

canceledObject is called when operation is canceled, method links back public

Definition at line 457 of file class.ilObjGroupGUI.php.

References $_GET, ilObjectGUI::$return_location, and sendInfo().

        {
                $return_location = $_GET["cmd_return_location"];
                if (strcmp($return_location, "") == 0)
                {
                        $return_location = "";
                }

                sendInfo($this->lng->txt("action_aborted"),true);
                $this->ctrl->redirect($this, $return_location);
        }

Here is the call graph for this function:

ilObjGroupGUI::cancelMemberObject (  ) 

canceledObject is called when operation is canceled, method links back public

Definition at line 473 of file class.ilObjGroupGUI.php.

References $_SESSION, ilObjectGUI::$return_location, ilUtil::redirect(), and sendInfo().

        {
                unset($_SESSION['grp_usr_search_result']);
                $return_location = "members";
                
                sendInfo($this->lng->txt("action_aborted"),true);
                ilUtil::redirect($this->ctrl->getLinkTarget($this,$return_location));
        }

Here is the call graph for this function:

ilObjGroupGUI::cancelSearchObject (  ) 

Definition at line 1444 of file class.ilObjGroupGUI.php.

References $_SESSION, and searchUserFormObject().

        {
                $_SESSION['grp_usr_search_result'] = array();
                $_SESSION['grp_search_str'] = '';
                $this->searchUserFormObject();
        }

Here is the call graph for this function:

ilObjGroupGUI::cciEditObject (  ) 

Definition at line 1693 of file class.ilObjGroupGUI.php.

References $_GET, $rbacsystem, __setSubTabs(), and initCourseContentInterface().

Referenced by chi_assignObject(), chi_deleteObject(), and chi_updateObject().

        {
                global $rbacsystem;

                // CHECK ACCESS
                if(!$rbacsystem->checkAccess("write", $this->ref_id))
                {
                        $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
                }

                $this->ctrl->setParameter($this, "item_id", $_GET["item_id"]);
                $this->__setSubTabs('activation');
                $this->tabs_gui->setTabActive('view_content');

                $this->initCourseContentInterface();
                $this->cci_obj->cci_setContainer($this);
                $this->cci_obj->cci_edit();

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjGroupGUI::cciMoveObject (  ) 

Definition at line 1731 of file class.ilObjGroupGUI.php.

References $rbacsystem, and initCourseContentInterface().

        {
                global $rbacsystem;

                // CHECK ACCESS
                if(!$rbacsystem->checkAccess("write", $this->ref_id))
                {
                        $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
                }

                $this->initCourseContentInterface();
                $this->cci_obj->cci_setContainer($this);
                $this->cci_obj->cci_move();

                return true;
        }

Here is the call graph for this function:

ilObjGroupGUI::cciUpdateObject (  ) 

Definition at line 1714 of file class.ilObjGroupGUI.php.

References $rbacsystem, and initCourseContentInterface().

        {
                global $rbacsystem;

                // CHECK ACCESS
                if(!$rbacsystem->checkAccess("write", $this->ref_id))
                {
                        $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
                }

                $this->initCourseContentInterface();
                $this->cci_obj->cci_setContainer($this);
                $this->cci_obj->cci_update();

                return true;
        }

Here is the call graph for this function:

ilObjGroupGUI::changeMemberObject (  ) 

displays form in which the member-status can be changed public

Definition at line 974 of file class.ilObjGroupGUI.php.

References $_GET, $_POST, $_SESSION, $output, $tbl, formatDate(), ilUtil::formSelect(), ilUtil::getImagePath(), infoPanel(), and ilUtil::sortArray().

        {
                if ($_GET["sort_by"] == "title" or $_GET["sort_by"] == "")
                {
                        $_GET["sort_by"] = "login";
                }

                $member_ids = array();

                if (isset($_POST["user_id"]))
                {
                        $member_ids = $_POST["user_id"];
                }
                else if (isset($_GET["mem_id"]))
                {
                        $member_ids[0] = $_GET["mem_id"];
                }

                if (empty($member_ids[0]))
                {
                        $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
                }

                if (!in_array(SYSTEM_ROLE_ID,$_SESSION["RoleId"]) 
                        and !in_array($this->ilias->account->getId(),$this->object->getGroupAdminIds()))
                {
                        $this->ilErr->raiseError($this->lng->txt("grp_err_no_permission"),$this->ilErr->MESSAGE);
                }

                $stati = array_flip($this->object->getLocalGroupRoles(true));
                //var_dump($stati);exit;

                //build data structure
                foreach ($member_ids as $member_id)
                {
                        $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
                        $mem_status = $this->object->getMemberRoles($member_id);

                        $this->data["data"][$member->getId()]= array(
                                        "login"         => $member->getLogin(),
                                        "firstname"     => $member->getFirstname(),
                                        "lastname"      => $member->getLastname(),
                                        "last_visit"=> ilFormat::formatDate($member->getLastLogin()),
                                        "grp_role"      => ilUtil::formSelect($mem_status,"member_status_select[".$member->getId()."][]",$stati,true,true,3)
                                );
                }
                
                unset($member);
                
                infoPanel();

                $this->tpl->addBlockfile("ADM_CONTENT", "member_table", "tpl.table.html");

                // load template for table content data
                $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));

                $this->data["buttons"] = array( "updateMemberStatus"  => $this->lng->txt("confirm"),
                                                                                "members"  => $this->lng->txt("back"));

                $this->tpl->setCurrentBlock("tbl_action_row");
                $this->tpl->setVariable("COLUMN_COUNTS",5);
                //$this->tpl->setVariable("TPLPATH",$this->tpl->tplPath);
                $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));

                foreach ($this->data["buttons"] as $name => $value)
                {
                        $this->tpl->setCurrentBlock("tbl_action_btn");
                        $this->tpl->setVariable("BTN_NAME",$name);
                        $this->tpl->setVariable("BTN_VALUE",$value);
                        $this->tpl->parseCurrentBlock();
                }

                //sort data array
                $this->data["data"] = ilUtil::sortArray($this->data["data"], $_GET["sort_by"], $_GET["sort_order"]);
                $output = array_slice($this->data["data"],$_GET["offset"],$_GET["limit"]);
                
                // create table
                include_once "./classes/class.ilTableGUI.php";

                $tbl = new ilTableGUI($output);

                // title & header columns
                $tbl->setTitle($this->lng->txt("grp_mem_change_status"),"icon_usr_b.gif",$this->lng->txt("grp_mem_change_status"));
                //$tbl->setHelp("tbl_help.php","icon_help.gif",$this->lng->txt("help"));
                $tbl->setHeaderNames(array($this->lng->txt("username"),$this->lng->txt("firstname"),$this->lng->txt("lastname"),$this->lng->txt("last_visit"),$this->lng->txt("role")));
                $tbl->setHeaderVars(array("login","firstname","lastname","last_visit","role"),$this->ctrl->getParameterArray($this,"",false));

                $tbl->setColumnWidth(array("20%","20%","20%","40%"));

                $this->tpl->setCurrentBlock("tbl_action_row");
                $this->tpl->parseCurrentBlock();

                // control
                $tbl->setOrderColumn($_GET["sort_by"]);
                $tbl->setOrderDirection($_GET["sort_order"]);
                $tbl->setLimit($_GET["limit"]);
                $tbl->setOffset($_GET["offset"]);
                $tbl->setMaxCount(count($this->data["data"]));

                $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));

                // render table
                $tbl->render();
        }

Here is the call graph for this function:

ilObjGroupGUI::chi_assignObject (  ) 

Definition at line 2328 of file class.ilObjGroupGUI.php.

References $_GET, cciEditObject(), editObject(), and initConditionHandlerGUI().

        {
                $this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
                $this->chi_obj->chi_assign();

                if($_GET['item_id'])
                {
                        $this->cciEditObject();
                }
                else
                {
                        $this->editObject();
                }
        }

Here is the call graph for this function:

ilObjGroupGUI::chi_deleteObject (  ) 

Definition at line 2307 of file class.ilObjGroupGUI.php.

References $_GET, cciEditObject(), editObject(), and initConditionHandlerGUI().

        {
                $this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
                $this->chi_obj->chi_delete();

                if($_GET['item_id'])
                {
                        $this->cciEditObject();
                }
                else
                {
                        $this->editObject();
                }
        }

Here is the call graph for this function:

ilObjGroupGUI::chi_selectorObject (  ) 

Definition at line 2322 of file class.ilObjGroupGUI.php.

References $_GET, and initConditionHandlerGUI().

        {
                $this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
                $this->chi_obj->chi_selector();
        }               

Here is the call graph for this function:

ilObjGroupGUI::chi_updateObject (  ) 

Definition at line 2293 of file class.ilObjGroupGUI.php.

References $_GET, cciEditObject(), editObject(), and initConditionHandlerGUI().

        {
                $this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
                $this->chi_obj->chi_update();

                if($_GET['item_id'])
                {
                        $this->cciEditObject();
                }
                else
                {
                        $this->editObject();
                }
        }               

Here is the call graph for this function:

ilObjGroupGUI::cleanString ( str  ) 

Clean output string from german umlauts.

Clean output string from german umlauts. Replaces ä -> ae etc.

Parameters:
string $str String to clean
Returns:
string Cleaned string

Definition at line 2518 of file class.ilObjGroupGUI.php.

Referenced by exportMembersObject().

        {
                return str_replace(array("ä","ö","ü","ß","Ä","Ö","Ü"), array("ae","oe","ue","ss","Ae","Oe","Ue"), $str);
        }

Here is the caller graph for this function:

ilObjGroupGUI::confirmationObject ( user_id = "",
confirm,
cancel,
info = "",
status = "",
a_cmd_return_location = "" 
)

displays confirmation form public

Definition at line 690 of file class.ilObjGroupGUI.php.

References $_SESSION, $counter, $id, $key, $status, $user_id, ilUtil::getImagePath(), ilUtil::getImageTagByType(), ilObjectGUI::getTemplateFile(), infoPanel(), sendInfo(), and ilUtil::switchColor().

Referenced by leaveGrpObject(), and removeMemberObject().

        {
                $this->data["cols"] = array("type", "title", "description", "last_change");

                if (is_array($user_id))
                {
                        foreach ($user_id as $id)
                        {
                                $obj_data =& $this->ilias->obj_factory->getInstanceByObjId($id);

                                $this->data["data"]["$id"] = array(
                                        "type"        => $obj_data->getType(),
                                        "title"       => $obj_data->getTitle(),
                                        "desc"        => $obj_data->getDescription(),
                                        "last_update" => $obj_data->getLastUpdateDate(),

                                        );
                        }
                }
                else
                {
                        $obj_data =& $this->ilias->obj_factory->getInstanceByObjId($user_id);

                        $this->data["data"]["$id"] = array(
                                "type"        => $obj_data->getType(),
                                "title"       => $obj_data->getTitle(),
                                "desc"        => $obj_data->getDescription(),
                                "last_update" => $obj_data->getLastUpdateDate(),
                                );
                }

                //write  in sessionvariables
                if(is_array($user_id))
                {
                        $_SESSION["saved_post"]["user_id"] = $user_id;
                }
                else
                {
                        $_SESSION["saved_post"]["user_id"][0] = $user_id;
                }

                if (isset($status))
                {
                        $_SESSION["saved_post"]["status"] = $status;
                }

                $this->data["buttons"] = array( $cancel  => $this->lng->txt("cancel"),
                                                $confirm  => $this->lng->txt("confirm"));

                $this->getTemplateFile("confirm");

                $this->tpl->setVariable("TPLPATH",$this->tpl->tplPath);

                infoPanel();

                sendInfo($this->lng->txt($info));

                $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this)."&cmd_return_location=".$a_cmd_return_location);

                // BEGIN TABLE HEADER
                foreach ($this->data["cols"] as $key)
                {
                        $this->tpl->setCurrentBlock("table_header");
                        $this->tpl->setVariable("TEXT",$this->lng->txt($key));
                        $this->tpl->parseCurrentBlock();
                }
                // END TABLE HEADER

                // BEGIN TABLE DATA
                $counter = 0;

                foreach ($this->data["data"] as $key => $value)
                {
                        // BEGIN TABLE CELL
                        foreach ($value as $key => $cell_data)
                        {
                                $this->tpl->setCurrentBlock("table_cell");

                                // CREATE TEXT STRING
                                if ($key == "type")
                                {
                                        $this->tpl->setVariable("TEXT_CONTENT",ilUtil::getImageTagByType($cell_data,$this->tpl->tplPath));
                                }
                                else
                                {
                                        $this->tpl->setVariable("TEXT_CONTENT",$cell_data);
                                }
                                $this->tpl->parseCurrentBlock();
                        }

                        $this->tpl->setCurrentBlock("table_row");
                        $this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
                        $this->tpl->parseCurrentBlock();
                        // END TABLE CELL
                }
                // END TABLE DATA

                // BEGIN OPERATION_BTN
                foreach ($this->data["buttons"] as $name => $value)
                {
                        $this->tpl->setCurrentBlock("operation_btn");
                        $this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("spacer.gif"));
                        $this->tpl->setVariable("BTN_NAME",$name);
                        $this->tpl->setVariable("BTN_VALUE",$value);
                        $this->tpl->parseCurrentBlock();
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjGroupGUI::confirmDeleteExportFileObject (  ) 

Definition at line 265 of file class.ilObjGroupGUI.php.

References $_POST, $rbacsystem, listExportFilesObject(), and sendInfo().

        {
                global $rbacsystem;

                if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
                {
                        $this->ilErr->raiseError($this->lng->txt("permission_denied"),$this->ilErr->MESSAGE);
                }

                if(!count($_POST['file']))
                {
                        sendInfo('grp_select_one_file');
                }
                else
                {
                        $this->object->deleteExportFiles($_POST['file']);
                        sendInfo('grp_deleted_export_files');
                }

                $this->listExportFilesObject();

                return true;
        }

Here is the call graph for this function:

ilObjGroupGUI::confirmedRemoveMemberObject (  ) 

remove members from group public

Definition at line 925 of file class.ilObjGroupGUI.php.

References $_SESSION, ilUtil::redirect(), and sendInfo().

        {
                $removed_self = false;
                
                $mail = new ilMail($_SESSION["AccountId"]);

                //User needs to have administrative rights to remove members...
                foreach($_SESSION["saved_post"]["user_id"] as $member_id)
                {
                        $err_msg = $this->object->removeMember($member_id);

                        if (strlen($err_msg) > 0)
                        {
                                sendInfo($this->lng->txt($err_msg),true);
                                ilUtil::redirect($this->ctrl->getLinkTarget($this,"members"));
                        }
                        
                        $user_obj = new ilObjUser($member_id);
                        
                        $user_obj->dropDesktopItem($this->object->getRefId(), "grp");
                        
                        if (!$removed_self and $user_obj->getId() == $this->ilias->account->getId())
                        {
                                $removed_self = true;
                        }
                        else
                        {
                                $mail->sendMail($user_obj->getLogin(),"","",$this->lng->txtlng("common","grp_mail_subj_subscription_cancelled",$user_obj->getLanguage()).": ".$this->object->getTitle(),$this->lng->txtlng("common","grp_mail_body_subscription_cancelled",$user_obj->getLanguage()),array(),array('normal'));
                        }                       

                }

                unset($_SESSION["saved_post"]);

                sendInfo($this->lng->txt("grp_msg_membership_annulled"),true);
                
                if ($removed_self)
                {
                        ilUtil::redirect("repository.php?ref_id=".$this->tree->getParentId($this->ref_id));
                }

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

Here is the call graph for this function:

ilObjGroupGUI::createObject (  ) 

create new object form

Reimplemented from ilObjectGUI.

Definition at line 316 of file class.ilObjGroupGUI.php.

References $_GET, $_POST, $_SESSION, ilObjectGUI::$data, $key, $rbacsystem, ilUtil::formRadioButton(), formSelect(), ilObjectGUI::getFormAction(), ilObjectGUI::getTargetFrame(), ilObjectGUI::getTemplateFile(), ilUtil::prepareFormOutput(), and ilUtil::stripSlashes().

Referenced by importFileObject().

        {
                global $rbacsystem;

                $new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];

                if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $new_type))
                {
                        $this->ilErr->raiseError($this->lng->txt("permission_denied"),$this->ilErr->MESSAGE);
                }

                $data = array();

                if ($_SESSION["error_post_vars"])
                {
                        // fill in saved values in case of error
                        $data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
                        $data["fields"]["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
                        $data["fields"]["password"] = $_SESSION["error_post_vars"]["password"];
                        $data["fields"]["expirationdate"] = $_SESSION["error_post_vars"]["expirationdate"];
                        $data["fields"]["expirationtime"] = $_SESSION["error_post_vars"]["expirationtime"];
                }
                else
                {
                        $data["fields"]["title"] = "";
                        $data["fields"]["desc"] = "";
                        $data["fields"]["password"] = "";
                        $data["fields"]["expirationdate"] = "";
                        $data["fields"]["expirationtime"] = "";
                }

                $this->getTemplateFile("edit",$new_type);

                foreach ($data["fields"] as $key => $val)
                {
                        $this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
                        $this->tpl->setVariable(strtoupper($key), $val);

                        if ($this->prepare_output)
                        {
                                $this->tpl->parseCurrentBlock();
                        }
                }

                $stati  = array(0=>$this->lng->txt("group_status_public"),1=>$this->lng->txt("group_status_closed"));

                $grp_status = $_SESSION["error_post_vars"]["group_status"];

                $checked = array(0=>0,1=>0,2=>0);

                switch ($_SESSION["error_post_vars"]["enable_registration"])
                {
                        case 0:
                                $checked[0]=1;
                                break;

                        case 1:
                                $checked[1]=1;
                                break;

                        case 2:
                                $checked[2]=1;
                                break;

                        default:
                                $checked[0]=1;
                                break;
                }

                //build form
                $cb_registration[0] = ilUtil::formRadioButton($checked[0], "enable_registration", 0);
                $cb_registration[1] = ilUtil::formRadioButton($checked[1], "enable_registration", 1);
                $cb_registration[2] = ilUtil::formRadioButton($checked[2], "enable_registration", 2);

                $opts   = ilUtil::formSelect(1,"group_status",$stati,false,true);

                $this->tpl->setVariable("FORMACTION", $this->getFormAction("save",$this->ctrl->getFormAction($this)."&new_type=".$new_type));

                $this->tpl->setVariable("TXT_HEADER", $this->lng->txt($new_type."_new"));
                $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
                $this->tpl->setVariable("TXT_REGISTRATION", $this->lng->txt("group_registration"));
                $this->tpl->setVariable("TXT_REGISTRATION_MODE", $this->lng->txt("group_registration_mode"));
                $this->tpl->setVariable("TXT_REGISTRATION_TIME", $this->lng->txt("group_registration_time"));

                $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
                $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($new_type."_add"));
                $this->tpl->setVariable("CMD_SUBMIT", "save");
                $this->tpl->setVariable("CMD_CANCEL", "cancel");
                $this->tpl->setVariable("TARGET", $this->getTargetFrame("save"));
                $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));

                $this->tpl->setVariable("TXT_DISABLEREGISTRATION", $this->lng->txt("group_req_direct"));
                $this->tpl->setVariable("TXT_REGISTRATION_UNLIMITED", $this->lng->txt("grp_registration_unlimited"));
                $this->tpl->setVariable("RB_NOREGISTRATION", $cb_registration[0]);
                $this->tpl->setVariable("TXT_ENABLEREGISTRATION", $this->lng->txt("group_req_registration"));
                $this->tpl->setVariable("RB_REGISTRATION", $cb_registration[1]);
                $this->tpl->setVariable("TXT_PASSWORDREGISTRATION", $this->lng->txt("group_req_password"));
                $this->tpl->setVariable("RB_PASSWORDREGISTRATION", $cb_registration[2]);

                $this->tpl->setVariable("TXT_EXPIRATIONDATE", $this->lng->txt("group_registration_expiration_date"));
                $this->tpl->setVariable("TXT_EXPIRATIONTIME", $this->lng->txt("group_registration_expiration_time"));
                $this->tpl->setVariable("TXT_DATE", $this->lng->txt("DD.MM.YYYY"));
                $this->tpl->setVariable("TXT_TIME", $this->lng->txt("HH:MM"));

                $this->tpl->setVariable("CB_KEYREGISTRATION", $cb_keyregistration);
                $this->tpl->setVariable("TXT_KEYREGISTRATION", $this->lng->txt("group_keyregistration"));
                $this->tpl->setVariable("TXT_PASSWORD", $this->lng->txt("password"));
                $this->tpl->setVariable("SELECT_GROUPSTATUS", $opts);
                $this->tpl->setVariable("TXT_GROUP_STATUS", $this->lng->txt("group_status"));
                $this->tpl->setVariable("TXT_GROUP_STATUS_DESC", $this->lng->txt("group_status_desc"));

                // IMPORT
                $this->tpl->setCurrentBlock("create");
                $this->tpl->setVariable("TXT_IMPORT_GRP", $this->lng->txt("import_grp"));
                $this->tpl->setVariable("TXT_GRP_FILE", $this->lng->txt("file"));
                $this->tpl->setVariable("TXT_IMPORT", $this->lng->txt("import"));

                // get the value for the maximal uploadable filesize from the php.ini (if available)
                $umf=get_cfg_var("upload_max_filesize");
                // get the value for the maximal post data from the php.ini (if available)
                $pms=get_cfg_var("post_max_size");

                // use the smaller one as limit
                $max_filesize=min($umf, $pms);
                if (!$max_filesize) 
                        $max_filesize=max($umf, $pms);
        
                // gives out the limit as a littel notice :)
                $this->tpl->setVariable("TXT_FILE_INFO", $this->lng->txt("file_notice").$max_filesize);
                $this->tpl->parseCurrentBlock();

                $this->tpl->setCurrentBlock("fileinfo");
                $this->tpl->setVariable("TXT_FILE_INFO", $this->lng->txt("file_notice").$max_filesize);
                $this->tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjGroupGUI::downloadExportFileObject (  ) 

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

References $_POST, listExportFilesObject(), and sendInfo().

        {
                if(!count($_POST['file']))
                {
                        sendInfo('grp_select_one_file');
                        $this->listExportFilesObject();
                        return false;
                }
                if(count($_POST['file']) > 1)
                {
                        sendInfo('grp_select_one_file_only');
                        $this->listExportFilesObject();
                        return false;
                }
                
                $this->object->downloadExportFile($_POST['file'][0]);
                
                // If file wasn't sent
                sendInfo('grp_error_sending_file');
                
                return true;
        }

Here is the call graph for this function:

ilObjGroupGUI::editObject (  ) 

edit Group public

Reimplemented from ilObjectGUI.

Definition at line 588 of file class.ilObjGroupGUI.php.

References $_SESSION, ilObjectGUI::$data, $key, $rbacsystem, ilUtil::formRadioButton(), ilObjectGUI::getTemplateFile(), ilUtil::prepareFormOutput(), ilContainerGUI::showCustomIconsEditing(), and ilUtil::stripSlashes().

Referenced by chi_assignObject(), chi_deleteObject(), and chi_updateObject().

        {
                global $rbacsystem;

                if (!$rbacsystem->checkAccess("write", $this->ref_id))
                {
                        $this->ilErr->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilErr->MESSAGE);
                }

                $data = array();

                if ($_SESSION["error_post_vars"])
                {
                        // fill in saved values in case of error
                        $data["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
                        $data["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
                        $data["registration"] = $_SESSION["error_post_vars"]["registration"];
                        $data["password"] = $_SESSION["error_post_vars"]["password"];
                        $data["expirationdate"] = $_SESSION["error_post_vars"]["expirationdate"];//$datetime[0];//$this->grp_object->getExpirationDateTime()[0];
                        $data["expirationtime"] = $_SESSION["error_post_vars"]["expirationtime"];//$datetime[1];//$this->grp_object->getExpirationDateTime()[1];

                }
                else
                {
                        $data["title"] = ilUtil::prepareFormOutput($this->object->getTitle());
                        $data["desc"] = $this->object->getDescription();
                        $data["registration"] = $this->object->getRegistrationFlag();
                        $data["password"] = $this->object->getPassword();
                        $datetime = $this->object->getExpirationDateTime();

                        $data["expirationdate"] = $datetime[0];//$this->grp_object->getExpirationDateTime()[0];
                        $data["expirationtime"] =  substr($datetime[1],0,5);//$this->grp_object->getExpirationDateTime()[1];

                }

                $this->getTemplateFile("edit");

                foreach ($data as $key => $val)
                {
                        $this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
                        $this->tpl->setVariable(strtoupper($key), $val);
                        $this->tpl->parseCurrentBlock();
                }

                $checked = array(0=>0,1=>0,2=>0);

                switch ($this->object->getRegistrationFlag())
                {
                        case 0:
                                $checked[0]=1;
                                break;

                        case 1:
                                $checked[1]=1;
                                break;

                        case 2:
                                $checked[2]=1;
                                break;
                }

                $cb_registration[0] = ilUtil::formRadioButton($checked[0], "enable_registration", 0);
                $cb_registration[1] = ilUtil::formRadioButton($checked[1], "enable_registration", 1);
                $cb_registration[2] = ilUtil::formRadioButton($checked[2], "enable_registration", 2);
                
                $this->showCustomIconsEditing(2);
                $this->tpl->setCurrentBlock("adm_content");

                $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));//$this->getFormAction("update",$this->ctrl->getFormAction($this)));
                $this->tpl->setVariable("TXT_HEADER", $this->lng->txt("grp_edit"));
                $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
                $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
                $this->tpl->setVariable("CMD_CANCEL", "canceled");
                $this->tpl->setVariable("CMD_SUBMIT", "update");

                $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
                $this->tpl->setVariable("TXT_REGISTRATION", $this->lng->txt("group_registration"));
                $this->tpl->setVariable("TXT_REGISTRATION_MODE", $this->lng->txt("group_registration_mode"));
                $this->tpl->setVariable("TXT_REGISTRATION_TIME", $this->lng->txt("group_registration_time"));

                $this->tpl->setVariable("TXT_DISABLEREGISTRATION", $this->lng->txt("group_req_direct"));
                $this->tpl->setVariable("TXT_REGISTRATION_UNLIMITED", $this->lng->txt("grp_registration_unlimited"));
                $this->tpl->setVariable("RB_NOREGISTRATION", $cb_registration[0]);
                $this->tpl->setVariable("TXT_ENABLEREGISTRATION", $this->lng->txt("group_req_registration"));
                $this->tpl->setVariable("RB_REGISTRATION", $cb_registration[1]);
                $this->tpl->setVariable("TXT_PASSWORDREGISTRATION", $this->lng->txt("group_req_password"));
                $this->tpl->setVariable("RB_PASSWORDREGISTRATION", $cb_registration[2]);

                $this->tpl->setVariable("TXT_EXPIRATIONDATE", $this->lng->txt("group_registration_expiration_date"));
                $this->tpl->setVariable("TXT_EXPIRATIONTIME", $this->lng->txt("group_registration_expiration_time"));           
                $this->tpl->setVariable("TXT_DATE", $this->lng->txt("DD.MM.YYYY"));
                $this->tpl->setVariable("TXT_TIME", $this->lng->txt("HH:MM"));

                $this->tpl->setVariable("CB_KEYREGISTRATION", $cb_keyregistration);
                $this->tpl->setVariable("TXT_KEYREGISTRATION", $this->lng->txt("group_keyregistration"));
                $this->tpl->setVariable("TXT_PASSWORD", $this->lng->txt("password"));
        }

Here is the call graph for this function:

Here is the caller graph for this function:

& ilObjGroupGUI::executeCommand (  ) 

execute command note: this method is overwritten in all container objects

Reimplemented from ilContainerGUI.

Definition at line 81 of file class.ilObjGroupGUI.php.

References $_GET, $cmd, $ilAccess, $ilErr, $rbacsystem, $reg_gui, __setSubTabs(), ilObjectGUI::getCreationMode(), and ilContainerGUI::prepareOutput().

        {
                global $rbacsystem,$ilAccess;

                $next_class = $this->ctrl->getNextClass($this);
                $cmd = $this->ctrl->getCmd();
                $this->prepareOutput();

                switch($next_class)
                {
                        case "ilconditionhandlerinterface":
                                include_once './classes/class.ilConditionHandlerInterface.php';

                                if($_GET['item_id'])
                                {
                                        $this->ctrl->saveParameter($this,'item_id',$_GET['item_id']);
                                        $this->__setSubTabs('activation');
                                        $this->tabs_gui->setTabActive('view_content');

                                        $new_gui =& new ilConditionHandlerInterface($this,(int) $_GET['item_id']);
                                        $this->ctrl->forwardCommand($new_gui);
                                }
                                else
                                {
                                        $new_gui =& new ilConditionHandlerInterface($this);
                                        $this->ctrl->forwardCommand($new_gui);
                                }
                                break;

                        case "ilregistergui":
                                $this->ctrl->setReturn($this, "");   // ###
                                $reg_gui = new ilRegisterGUI();
                                $ret =& $this->ctrl->forwardCommand($reg_gui);
                                break;

                        case 'ilpermissiongui':
                                include_once("./classes/class.ilPermissionGUI.php");
                                $perm_gui =& new ilPermissionGUI($this);
                                $ret =& $this->ctrl->forwardCommand($perm_gui);
                                break;

                        default:
                                if (!$this->getCreationMode() and !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'grp'))
                                {
                                        $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
                                }
                                
                                if (!$this->getCreationMode()
                                        && !$rbacsystem->checkAccess('read',$this->object->getRefId())
                                        || $cmd == 'join')
                                {
                                        $this->ctrl->redirectByClass("ilRegisterGUI", "showRegistrationForm");
                                }
                                
                                if(!$cmd)
                                {
                                        $cmd = 'view';
                                }
                                $cmd .= 'Object';
                                $this->$cmd();
                                break;
                }
        }

Here is the call graph for this function:

ilObjGroupGUI::exportMembersObject (  ) 

Exports group members to Microsoft Excel file.

Exports group members to Microsoft Excel file

Definition at line 2364 of file class.ilObjGroupGUI.php.

References ilObjectGUI::$data, $result, $row, and cleanString().

        {
                $result = @include_once 'Spreadsheet/Excel/Writer.php';
                if (!$result)
                {
                        include_once './classes/Spreadsheet/Excel/Writer.php';
                }
                // Creating a workbook
                $workbook = new Spreadsheet_Excel_Writer();

                // sending HTTP headers
                $title = preg_replace("/\s/", "_", $this->object->getTitle());
                $workbook->send("export_" . $title . ".xls");

                // Creating a worksheet
                $format_bold =& $workbook->addFormat();
                $format_bold->setBold();
                $format_percent =& $workbook->addFormat();
                $format_percent->setNumFormat("0.00%");
                $format_datetime =& $workbook->addFormat();
                $format_datetime->setNumFormat("DD/MM/YYYY hh:mm:ss");
                $format_title =& $workbook->addFormat();
                $format_title->setBold();
                $format_title->setColor('black');
                $format_title->setPattern(1);
                $format_title->setFgColor('silver');
                $worksheet =& $workbook->addWorksheet();
                $column = 0;
                $profile_data = array("email", "gender", "firstname", "lastname", "person_title", "institution", 
                        "department", "street", "zipcode","city", "country", "phone_office", "phone_home", "phone_mobile",
                        "fax", "matriculation");
                foreach ($profile_data as $data)
                {
                        $worksheet->writeString(0, $column++, $this->cleanString($this->lng->txt($data)), $format_title);
                }
                $member_ids = $this->object->getGroupMemberIds();
                $row = 1;
                foreach ($member_ids as $member_id)
                {
                        $column = 0;
                        $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
                        if ($member->getPref("public_email")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getEmail()));
                        }
                        else
                        {
                                $column++;
                        }
                        $worksheet->writeString($row, $column++, $this->cleanString($this->lng->txt("gender_" . $member->getGender())));
                        $worksheet->writeString($row, $column++, $this->cleanString($member->getFirstname()));
                        $worksheet->writeString($row, $column++, $this->cleanString($member->getLastname()));
                        $worksheet->writeString($row, $column++, $this->cleanString($member->getUTitle()));
                        if ($member->getPref("public_institution")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getInstitution()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_department")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getDepartment()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_street")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getStreet()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_zip")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getZipcode()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_city")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getCity()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_country")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getCountry()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_phone_office")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneOffice()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_phone_home")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneHome()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_phone_mobile")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneMobile()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_fax")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getFax()));
                        }
                        else
                        {
                                $column++;
                        }
                        if ($member->getPref("public_matriculation")=="y")
                        {
                                $worksheet->writeString($row, $column++, $this->cleanString($member->getMatriculation()));
                        }
                        else
                        {
                                $column++;
                        }
                        $row++;
                }
                $workbook->close();
        }

Here is the call graph for this function:

ilObjGroupGUI::exportObject (  ) 

Creates the output form for group member export.

Creates the output form for group member export

Definition at line 2349 of file class.ilObjGroupGUI.php.

References ilObjectGUI::getFormAction().

        {
                $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.grp_members_export.html");
                $this->tpl->setCurrentBlock("adm_content");
                $this->tpl->setVariable("FORMACTION", $this->getFormAction("export",$this->ctrl->getFormAction($this)));
                $this->tpl->setVariable("BUTTON_EXPORT", $this->lng->txt("export_group_members"));
                $this->tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

ilObjGroupGUI::exportXMLObject (  ) 

Definition at line 249 of file class.ilObjGroupGUI.php.

References $rbacsystem, and listExportFilesObject().

        {
                global $rbacsystem;

                if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
                {
                        $this->ilErr->raiseError($this->lng->txt("permission_denied"),$this->ilErr->MESSAGE);
                }

                $this->object->exportXML();
                
                $this->listExportFilesObject();

                return true;
        }

Here is the call graph for this function:

ilObjGroupGUI::getTabs ( &$  tabs_gui  ) 

common tabs for all container objects (should be called at the end of child getTabs() method

Reimplemented from ilContainerGUI.

Definition at line 1594 of file class.ilObjGroupGUI.php.

References $_GET, $ilUser, $rbacsystem, and ilObjGroup::_isMember().

        {
                global $rbacsystem, $ilUser;

                if ($rbacsystem->checkAccess('read',$this->ref_id))
                {
                        $force_active = (($_GET["cmd"] == "view" || $_GET["cmd"] == "")
                                && $_GET["cmdClass"] == "")
                                ? true
                                : false;
                        $tabs_gui->addTarget("view_content",
                                $this->ctrl->getLinkTarget($this, ""), array("", "view","addToDesk","removeFromDesk"), get_class($this),
                                "", $force_active);
                }

                if ($rbacsystem->checkAccess('write',$this->ref_id))
                {
                        $force_active = ($_GET["cmd"] == "edit" && $_GET["cmdClass"] == "")
                                ? true
                                : false;
                        $tabs_gui->addTarget("edit_properties",
                                $this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this),
                                "", $force_active);
//  Export tab to export group members to an excel file. Only available for group admins
//  commented out for following reason: clearance needed with developer list
//                      $tabs_gui->addTarget("export",
//                              $this->ctrl->getLinkTarget($this, "export"), "export", get_class($this));
                }

                if ($rbacsystem->checkAccess('read',$this->ref_id))
                {
                        $tabs_gui->addTarget("group_members",
                                                                 $this->ctrl->getLinkTarget($this, "members"), array("members",'mailMembers'), get_class($this));
                }
                
                $applications = $this->object->getNewRegistrations();

                if (is_array($applications) and $this->object->isAdmin($this->ilias->account->getId()))
                {
                        $tabs_gui->addTarget("group_new_registrations",
                                $this->ctrl->getLinkTarget($this, "ShownewRegistrations"), "ShownewRegistrations", get_class($this));
                }
                
                if ($rbacsystem->checkAccess('write',$this->object->getRefId()))
                {
                        $tabs_gui->addTarget('export',
                                                                 $this->ctrl->getLinkTarget($this,'listExportFiles'),
                                                                 array('listExportFiles','exportXML','confirmDeleteExportFile','downloadExportFile'),
                                                                 get_class($this));
                }
                
                if ($rbacsystem->checkAccess('join',$this->object->getRefId())
                   and !ilObjGroup::_isMember($ilUser->getId(),$this->object->getRefId()))
                {
                        $tabs_gui->addTarget("join",
                                                                 $this->ctrl->getLinkTarget($this, "join"), 
                                                                 'join',
                                                                 "");
                }

        // parent tabs (all container: edit_permission, clipboard, trash
                parent::getTabs($tabs_gui);
        }

Here is the call graph for this function:

ilObjGroupGUI::ilObjGroupGUI ( a_data,
a_id,
a_call_by_reference,
a_prepare_output = false 
)

Constructor public.

Definition at line 47 of file class.ilObjGroupGUI.php.

References ilContainerGUI::ilContainerGUI().

        {
                $this->type = "grp";
                $this->ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
                
                $this->lng->loadLanguageModule('grp');
        }

Here is the call graph for this function:

ilObjGroupGUI::importFileObject (  ) 

Definition at line 1661 of file class.ilObjGroupGUI.php.

References $_GET, ilObjectGUI::$ref_id, ilObjGroup::_importFromFile(), createObject(), ilUtil::redirect(), and sendInfo().

        {
                if(!is_array($_FILES['xmldoc']))
                {
                        sendInfo($this->lng->txt("import_file_not_valid"));
                        $this->createObject();
                        return false;
                }
                
                include_once 'classes/class.ilObjGroup.php';

                if($ref_id = ilObjGroup::_importFromFile($_FILES['xmldoc'],(int) $_GET['ref_id']))
                {
                        $this->ctrl->setParameter($this, "ref_id", $ref_id);
                        sendInfo($this->lng->txt("import_grp_finished"),true);
                        ilUtil::redirect($this->ctrl->getLinkTarget($this,'edit'));
                }
                
                sendInfo($this->lng->txt("import_file_not_valid"));
                $this->createObject();
        }       

Here is the call graph for this function:

ilObjGroupGUI::initConditionHandlerGUI ( item_id  ) 

Definition at line 2274 of file class.ilObjGroupGUI.php.

References $_GET.

Referenced by chi_assignObject(), chi_deleteObject(), chi_selectorObject(), and chi_updateObject().

        {
                include_once './classes/class.ilConditionHandlerInterface.php';

                if(!is_object($this->chi_obj))
                {
                        if($_GET['item_id'])
                        {
                                $this->chi_obj =& new ilConditionHandlerInterface($this,$item_id);
                                $this->ctrl->saveParameter($this,'item_id',$_GET['item_id']);
                        }
                        else
                        {
                                $this->chi_obj =& new ilConditionHandlerInterface($this);
                        }
                }
                return true;
        }

Here is the caller graph for this function:

ilObjGroupGUI::initCourseContentInterface (  ) 

Definition at line 1683 of file class.ilObjGroupGUI.php.

References $ilCtrl.

Referenced by cciEditObject(), cciMoveObject(), cciUpdateObject(), and viewObject().

        {
                global $ilCtrl;

                include_once "./course/classes/class.ilCourseContentInterface.php";
                
                $this->object->ctrl =& $ilCtrl;
                $this->cci_obj =& new ilCourseContentInterface($this,$this->object->getRefId());
        }

Here is the caller graph for this function:

ilObjGroupGUI::leaveGrpObject (  ) 

leave Group public

Definition at line 802 of file class.ilObjGroupGUI.php.

References $_GET, $status, and confirmationObject().

        {
                $member = array($_GET["mem_id"]);
                //set methods that are called after confirmation
                $confirm = "confirmedDeleteMember";
                $cancel  = "canceled";
                $info    = "info_delete_sure";
                $status  = "";
                $return  = "";
                $this->confirmationObject($member, $confirm, $cancel, $info, $status, $return);
        }

Here is the call graph for this function:

ilObjGroupGUI::listExportFilesObject (  ) 

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

References $_GET, $num, $rbacsystem, $tbl, __exportMenu(), ilUtil::getImagePath(), and ilUtil::switchColor().

Referenced by confirmDeleteExportFileObject(), downloadExportFileObject(), and exportXMLObject().

        {
                global $rbacsystem;

                $this->lng->loadLanguageModule('content');

                if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
                {
                        $this->ilErr->raiseError($this->lng->txt("permission_denied"),$this->ilErr->MESSAGE);
                }

                $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
                $this->__exportMenu();

                $this->object->__initFileObject();
                $export_files = $this->object->file_obj->getExportFiles();
                
                require_once("classes/class.ilTableGUI.php");
                $tbl = new ilTableGUI();

                $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
                $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.grp_export_file_row.html");

                $num = 0;

                $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));

                $tbl->setTitle($this->lng->txt("cont_export_files"));
                $tbl->setHeaderNames(array("", $this->lng->txt("type"),
                        $this->lng->txt("cont_file"),
                        $this->lng->txt("cont_size"), $this->lng->txt("date") ));

                $cols = array("", "type", "file", "size", "date");
                $header_params = array("ref_id" => $_GET["ref_id"],
                                                           "cmd" => "listExportFiles", "cmdClass" => strtolower(get_class($this)));
                $tbl->setHeaderVars($cols, $header_params);
                $tbl->setColumnWidth(array("1%", "9%", "40%", "25%", "25%"));
                
                // control
                $tbl->setOrderColumn($_GET["sort_by"]);
                $tbl->setOrderDirection($_GET["sort_order"]);
                $tbl->setLimit($_GET["limit"]);
                $tbl->setOffset($_GET["offset"]);
                $tbl->setMaxCount($this->maxcount);             // ???
                $tbl->disable("sort");

                $this->tpl->setVariable("COLUMN_COUNTS", 5);

                // delete button
                $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
                $this->tpl->setCurrentBlock("tbl_action_btn");
                $this->tpl->setVariable("BTN_NAME", "confirmDeleteExportFile");
                $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
                $this->tpl->parseCurrentBlock();

                $this->tpl->setCurrentBlock("tbl_action_btn");
                $this->tpl->setVariable("BTN_NAME", "downloadExportFile");
                $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("download"));
                $this->tpl->parseCurrentBlock();

                // footer
                $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));

                $tbl->setMaxCount(count($export_files));
                $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
                $tbl->render();
                foreach($export_files as $exp_file)
                {
                        $this->tpl->setCurrentBlock("tbl_content");
                        $this->tpl->setVariable("TXT_FILENAME", $exp_file["file"]);
                        
                        $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
                        $this->tpl->setVariable("CSS_ROW", $css_row);

                        $this->tpl->setVariable("TXT_SIZE", $exp_file["size"]);
                        $this->tpl->setVariable("TXT_TYPE", $exp_file["type"]);
                        $this->tpl->setVariable("CHECKBOX_ID",$exp_file["file"]);

                        $file_arr = explode("__", $exp_file["file"]);
                        $this->tpl->setVariable("TXT_DATE", date("Y-m-d H:i:s",$file_arr[0]));

                        $this->tpl->parseCurrentBlock();
                }
                if(!count($export_files))
                {
                        $tbl->disable('footer');
                        $this->tpl->setCurrentBlock("notfound");
                        $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
                        $this->tpl->setVariable("NUM_COLS", 4);
                        $this->tpl->parseCurrentBlock();
                }

                $this->tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjGroupGUI::listUsersGroupObject (  ) 

Definition at line 2201 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, $counter, $rbacreview, $rbacsystem, ilObjectGUI::$tree, $user, __appendToStoredResults(), __showSearchUserTable(), formatDate(), ilUtil::formCheckbox(), ilObjectFactory::getInstanceByObjId(), ilObjectFactory::getInstanceByRefId(), searchObject(), and sendInfo().

        {
                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->object->getRefId()))
                {
                        $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
                }

                if(!is_array($_POST["group"]))
                {
                        sendInfo($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("cancelSearch",$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);

                // append users
                $members = $this->__appendToStoredResults($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:

ilObjGroupGUI::listUsersRoleObject (  ) 

Definition at line 2120 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, $counter, $rbacreview, $rbacsystem, $role_id, $user, __appendToStoredResults(), __showSearchUserTable(), formatDate(), ilUtil::formCheckbox(), ilObjectFactory::getInstanceByObjId(), searchObject(), and sendInfo().

        {
                global $rbacsystem,$rbacreview;

                $_SESSION["grp_role"] = $_POST["role"] = $_POST["role"] ? $_POST["role"] : $_SESSION["grp_role"];

                // MINIMUM ACCESS LEVEL = 'administrate'
                if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
                {
                        $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
                }

                if(!is_array($_POST["role"]))
                {
                        sendInfo($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("cancelSearch",$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);
                $members = $this->__appendToStoredResults($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,"listUsersRole");

                return true;
        }

Here is the call graph for this function:

ilObjGroupGUI::mailMembersObject (  ) 

Definition at line 1153 of file class.ilObjGroupGUI.php.

References $rbacreview, ilUtil::formCheckbox(), ilUtil::getImagePath(), and setSubTabs().

        {
                global $rbacreview;

                $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.mail_members.html');

                $this->setSubTabs('members');

                $this->tpl->setVariable("MAILACTION",'mail_new.php?type=role');
                $this->tpl->setVariable("MAIL_MEMBERS",$this->lng->txt('send_mail_members'));
                $this->tpl->setVariable("MAIL_ADMIN",$this->lng->txt('send_mail_admins'));
                $this->tpl->setVariable("CHECK_MEMBER",ilUtil::formCheckbox(1,'roles[]','#il_grp_member_'.$this->object->getRefId()));
                $this->tpl->setVariable("CHECK_ADMIN",ilUtil::formCheckbox(0,'roles[]','#il_grp_admin_'.$this->object->getRefId()));
                $this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.gif'));
                $this->tpl->setVariable("OK",$this->lng->txt('ok'));
        }

Here is the call graph for this function:

ilObjGroupGUI::membersObject (  ) 

display group members

Definition at line 1082 of file class.ilObjGroupGUI.php.

References $counter, $ilBench, $ilUser, $rbacsystem, __showMembersTable(), formatDate(), and setSubTabs().

        {
                global $rbacsystem,$ilBench,$ilDB,$ilUser;

                $this->tpl->addBlockFile("ADM_CONTENT","adm_content","tpl.grp_members.html");
                $this->setSubTabs('members');

                $ilBench->start("GroupGUI", "membersObject");
                
                //if current user is admin he is able to add new members to group
                $val_contact = "<img src=\"".ilUtil::getImagePath("icon_pencil_b.gif")."\" alt=\"".$this->lng->txt("grp_mem_send_mail")."\" title=\"".$this->lng->txt("grp_mem_send_mail")."\" border=\"0\" vspace=\"0\"/>";
                $val_change = "<img src=\"".ilUtil::getImagePath("icon_change_b.gif")."\" alt=\"".$this->lng->txt("grp_mem_change_status")."\" title=\"".$this->lng->txt("grp_mem_change_status")."\" border=\"0\" vspace=\"0\"/>";
                $val_leave = "<img src=\"".ilUtil::getImagePath("icon_group_out_b.gif")."\" alt=\"".$this->lng->txt("grp_mem_leave")."\" title=\"".$this->lng->txt("grp_mem_leave")."\" border=\"0\" vspace=\"0\"/>";

                // store access checks to improve performance
                $access_leave = $rbacsystem->checkAccess("leave",$this->object->getRefId());
                $access_write = $rbacsystem->checkAccess("write",$this->object->getRefId());

                $member_ids = $this->object->getGroupMemberIds();
                
                // fetch all users data in one shot to improve performance
                $members = $this->object->getGroupMemberData($member_ids);
                
                $account_id = $this->ilias->account->getId();
                $counter = 0;

                foreach ($members as $mem)
                {
                        $link_contact = "mail_new.php?type=new&rcp_to=".$mem["login"];
                        $link_change = $this->ctrl->getLinkTarget($this,"changeMember")."&mem_id=".$mem["id"];
                
                        //build function
                        if ($access_write)
                        {
                                $member_functions = "<a href=\"$link_change\">$val_change</a>";
                        }

                        if (($mem["id"] == $account_id && $access_leave) || $access_write)
                        {
                                $link_leave = $this->ctrl->getLinkTarget($this,"RemoveMember")."&mem_id=".$mem["id"];
                                $member_functions .="<a href=\"$link_leave\">$val_leave</a>";
                        }

                        // this is twice as fast than the code above
                        $str_member_roles = $this->object->getMemberRolesTitle($mem["id"]);

                        if ($access_write)
                        {
                                $result_set[$counter][] = ilUtil::formCheckBox(0,"user_id[]",$mem["id"]);
                        }
                        
                        $user_ids[$counter] = $mem["id"];
            
            //discarding the checkboxes
                        $result_set[$counter][] = $mem["login"];
                        $result_set[$counter][] = $mem["firstname"];
                        $result_set[$counter][] = $mem["lastname"];
                        $result_set[$counter][] = ilFormat::formatDate($mem["last_login"]);
                        $result_set[$counter][] = $str_member_roles;
                        $result_set[$counter][] = "<a href=\"$link_contact\">".$val_contact."</a>".$member_functions;

                        ++$counter;

                        unset($member_functions);
                }

                $ilBench->stop("GroupGUI", "membersObject");

                return $this->__showMembersTable($result_set,$user_ids);
    }

Here is the call graph for this function:

ilObjGroupGUI::refuseApplicantsObject (  ) 

adds applicant to group as member public

Definition at line 1340 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, $user, ilUtil::redirect(), and sendInfo().

        {
                $user_ids = $_POST["user_id"];

                if (empty($user_ids[0]))
                {
                        $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
                }

                $mail = new ilMail($_SESSION["AccountId"]);

                foreach ($user_ids as $new_member)
                {
                        $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);

                        $this->object->deleteApplicationListEntry($new_member);
                        $mail->sendMail($user->getLogin(),"","","Membership application refused: Group ".$this->object->getTitle(),"Your application has been refused.",array(),array('normal'));
                }

                sendInfo($this->lng->txt("grp_msg_applicants_removed"),true);
                ilUtil::redirect($this->ctrl->getLinkTarget($this,"members"));
        }

Here is the call graph for this function:

ilObjGroupGUI::removeBigIconObject (  ) 

remove big icon

public

Definition at line 2195 of file class.ilObjGroupGUI.php.

References ilUtil::redirect().

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

Here is the call graph for this function:

ilObjGroupGUI::removeMemberObject (  ) 

displays confirmation formular with users that shall be removed from group public

Definition at line 884 of file class.ilObjGroupGUI.php.

References $_GET, $_POST, $_SESSION, $status, and confirmationObject().

        {
                $user_ids = array();

                if (isset($_POST["user_id"]))
                {
                        $user_ids = $_POST["user_id"];
                }
                else if (isset($_GET["mem_id"]))
                {
                        $user_ids[] = $_GET["mem_id"];
                }

                if (empty($user_ids[0]))
                {
                        $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
                }
                
                if (count($user_ids) == 1 and $this->ilias->account->getId() != $user_ids[0])
                {
                        if (!in_array(SYSTEM_ROLE_ID,$_SESSION["RoleId"]) 
                                and !in_array($this->ilias->account->getId(),$this->object->getGroupAdminIds()))
                        {
                                $this->ilErr->raiseError($this->lng->txt("grp_err_no_permission"),$this->ilErr->MESSAGE);
                        }
                }
                //bool value: says if $users_ids contains current user id
                $is_dismiss_me = array_search($this->ilias->account->getId(),$user_ids);
                
                $confirm = "confirmedRemoveMember";
                $cancel  = "canceled";
                $info    = ($is_dismiss_me !== false) ? "grp_dismiss_myself" : "grp_dismiss_member";
                $status  = "";
                $return  = "members";
                $this->confirmationObject($user_ids, $confirm, $cancel, $info, $status, $return);
        }

Here is the call graph for this function:

ilObjGroupGUI::removeSmallIconObject (  ) 

remove small icon

public

Definition at line 2184 of file class.ilObjGroupGUI.php.

References ilUtil::redirect().

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

Here is the call graph for this function:

ilObjGroupGUI::saveObject (  ) 

save group object public

Reimplemented from ilObjectGUI.

Definition at line 486 of file class.ilObjGroupGUI.php.

References $_GET, $_POST, $rbacadmin, $roles, ilUtil::groupNameExists(), ilObjectGUI::redirectToRefId(), and sendInfo().

        {
                global $rbacadmin;

                // check required fields
                if (empty($_POST["Fobject"]["title"]))
                {
                        $this->ilErr->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilErr->MESSAGE);
                }

                // check registration & password
                if ($_POST["enable_registration"] == 2 and empty($_POST["password"]))
                {
                        $this->ilErr->raiseError($this->lng->txt("no_password"),$this->ilErr->MESSAGE);
                }

                // check groupname
                if (ilUtil::groupNameExists($_POST["Fobject"]["title"]))

                {
                        $this->ilErr->raiseError($this->lng->txt("grp_name_exists"),$this->ilErr->MESSAGE);
                }

                // create and insert group in objecttree
                $groupObj = parent::saveObject();
                
                // setup rolefolder & default local roles (admin & member)
                $roles = $groupObj->initDefaultRoles();

                // ...finally assign groupadmin role to creator of group object
                $groupObj->addMember($this->ilias->account->getId(),$groupObj->getDefaultAdminRole());

                $groupObj->setRegistrationFlag($_POST["enable_registration"]);//0=no registration, 1=registration enabled 2=passwordregistration
                $groupObj->setPassword($_POST["password"]);
                $groupObj->setExpirationDateTime($_POST["expirationdate"]." ".$_POST["expirationtime"].":00");

                $this->ilias->account->addDesktopItem($groupObj->getRefId(),"grp");             
                
                // always send a message
                sendInfo($this->lng->txt("grp_added"),true);

                $this->redirectToRefId($_GET["ref_id"]);
        }

Here is the call graph for this function:

ilObjGroupGUI::searchCancelledObject (  ) 

Definition at line 1587 of file class.ilObjGroupGUI.php.

References ilUtil::redirect(), and sendInfo().

        {
                sendInfo($this->lng->txt("action_aborted"),true);
                ilUtil::redirect($this->ctrl->getLinkTarget($this,"members"));
        }

Here is the call graph for this function:

ilObjGroupGUI::searchObject (  ) 

Definition at line 1451 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, $counter, $rbacsystem, $result, ilObjectGUI::$tree, $user, __search(), __showSearchGroupTable(), __showSearchRoleTable(), __showSearchUserTable(), formatDate(), ilUtil::formCheckbox(), ilObjectFactory::getInstanceByObjId(), ilObjectFactory::getInstanceByRefId(), searchUserFormObject(), sendInfo(), and ilUtil::stripSlashes().

Referenced by listUsersGroupObject(), and listUsersRoleObject().

        {
                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->object->getRefId()))
                {
                        $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"]))
                {
                        sendInfo($this->lng->txt("grp_search_enter_search_string"));
                        $this->searchUserFormObject();
                        
                        return false;
                }

                if(!count($result = $this->__search(ilUtil::stripSlashes($_POST["search_str"]),$_POST["search_for"])))
                {
                        sendInfo($this->lng->txt("grp_no_results_found"));
                        $this->searchUserFormObject();

                        return false;
                }
                
                $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html");
                #$this->__showButton("cancelSearch",$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,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->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))
                                {
                                        sendInfo($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:

Here is the caller graph for this function:

ilObjGroupGUI::searchUserFormObject (  ) 

Definition at line 1388 of file class.ilObjGroupGUI.php.

References $_POST, $_SESSION, $rbacsystem, __unsetSessionVariables(), and ilUtil::formRadioButton().

Referenced by cancelSearchObject(), and searchObject().

        {
                global $rbacsystem;

                $this->lng->loadLanguageModule('search');

                // MINIMUM ACCESS LEVEL = 'administrate'
                if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
                {
                        $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"));

                $this->__unsetSessionVariables();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjGroupGUI::setSubTabs ( a_tab  ) 

set sub tabs

Definition at line 1174 of file class.ilObjGroupGUI.php.

Referenced by mailMembersObject(), and membersObject().

        {
                switch ($a_tab)
                {
                        case 'members':
                                $this->tabs_gui->addSubTabTarget("members",
                                                                                                 $this->ctrl->getLinkTarget($this,'members'),
                                                                                                 "members", get_class($this));
                                $this->tabs_gui->addSubTabTarget("mail_members",
                                                                                                 $this->ctrl->getLinkTarget($this,'mailMembers'),
                                                                                                 "mailMembers", get_class($this));

                                break;

                                
                }
        }

Here is the caller graph for this function:

ilObjGroupGUI::showNewRegistrationsObject (  ) 

Definition at line 1193 of file class.ilObjGroupGUI.php.

References $_GET, $output, $rbacsystem, $tbl, $user, ilUtil::getImagePath(), and ilUtil::sortArray().

        {
                global $rbacsystem;

                //get new applicants
                $applications = $this->object->getNewRegistrations();
                
                if (!$applications)
                {
                        $this->ilErr->raiseError($this->lng->txt("no_applications"),$this->ilErr->MESSAGE);
                }
                
                if ($_GET["sort_by"] == "title" or $_GET["sort_by"] == "")
                {
                        $_GET["sort_by"] = "login";
                }

                $val_contact = "<img src=\"".ilUtil::getImagePath("icon_pencil_b.gif")."\" alt=\"".$this->lng->txt("grp_app_send_mail")."\" title=\"".$this->lng->txt("grp_app_send_mail")."\" border=\"0\" vspace=\"0\"/>";

                foreach ($applications as $applicant)
                {
                        $user =& $this->ilias->obj_factory->getInstanceByObjId($applicant->user_id);

                        $link_contact = "mail_new.php?mobj_id=3&type=new&rcp_to=".$user->getLogin();
                        $link_change = $this->ctrl->getLinkTarget($this,"changeMember")."&mem_id=".$user->getId();
                        $member_functions = "<a href=\"$link_change\">$val_change</a>";
                        if (strcmp($_GET["check"], "all") == 0)
                        {
                                $checked = 1;
                        }
                        else
                        {
                                $checked = 0;
                        }
                        $this->data["data"][$user->getId()]= array(
                                "check"         => ilUtil::formCheckBox($checked,"user_id[]",$user->getId()),
                                "username"      => $user->getLogin(),
                                "fullname"      => $user->getFullname(),
                                "subject"       => $applicant->subject,
                                "date"          => $applicant->application_date,
                                "functions"     => "<a href=\"$link_contact\">".$val_contact."</a>"
                                );

                                unset($member_functions);
                                unset($user);
                }
                // load template for table content data
                //echo $this->ctrl->getFormAction($this,"post");
                //var_dump($this->ctrl->getParameterArray($this,"ShownewRegistrations",false));
                $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this,"post"));

                $this->data["buttons"] = array( "refuseApplicants"  => $this->lng->txt("refuse"),
                                                                                "assignApplicants"  => $this->lng->txt("assign"));

                $this->tpl->addBlockfile("ADM_CONTENT", "member_table", "tpl.table.html");

                //prepare buttons [cancel|assign]
                foreach ($this->data["buttons"] as $name => $value)
                {
                        $this->tpl->setCurrentBlock("tbl_action_btn");
                        $this->tpl->setVariable("BTN_NAME",$name);
                        $this->tpl->setVariable("BTN_VALUE",$value);
                        $this->tpl->parseCurrentBlock();
                }
                
                $this->tpl->setCurrentBlock("tbl_action_plain_select");
                $this->tpl->setVariable("SELECT_ACTION", "<a href=\"" . $this->ctrl->getLinkTarget($this,"ShownewRegistrations") . "&check=all\">" . $this->lng->txt("check_all") . "</a>" . " / " . "<a href=\"" . $this->ctrl->getLinkTarget($this,"ShownewRegistrations") . "&check=none\">" . $this->lng->txt("uncheck_all") . "</a>");
                $this->tpl->parseCurrentBlock();

                if (isset($this->data["data"]))
                {
                        //sort data array
                        $this->data["data"] = ilUtil::sortArray($this->data["data"], $_GET["sort_by"], $_GET["sort_order"]);
                        $output = array_slice($this->data["data"],$_GET["offset"],$_GET["limit"]);
                }

                $this->tpl->setCurrentBlock("tbl_action_row");
                $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
                $this->tpl->setVariable("COLUMN_COUNTS",6);
                $this->tpl->setVariable("TPLPATH",$this->tpl->tplPath);

                // create table
                include_once "./classes/class.ilTableGUI.php";
                $tbl = new ilTableGUI($output);
                // title & header columns
                $tbl->setTitle($this->lng->txt("group_new_registrations"),"icon_usr_b.gif",$this->lng->txt("group_applicants"));
                //$tbl->setHelp("tbl_help.php","icon_help.gif",$this->lng->txt("help"));
                $tbl->setHeaderNames(array("",$this->lng->txt("username"),$this->lng->txt("fullname"),$this->lng->txt("subject"),$this->lng->txt("application_date"),$this->lng->txt("grp_options")));
                $tbl->setHeaderVars(array("","username","fullname","subject","date","functions"),$this->ctrl->getParameterArray($this,"ShownewRegistrations",false));
                $tbl->setColumnWidth(array("","20%","20%","35%","20%","5%"));
                
                if ($_GET["sort_by"] == "login")
                {
                        $_GET["sort_by"] = "username";
                }
                
                if (!$_GET["sort_order"])
                {
                        $_GET["sort_order"] = "asc";
                }
                
                // control
                $tbl->setOrderColumn($_GET["sort_by"]);
                $tbl->setOrderDirection($_GET["sort_order"]);
                $tbl->setLimit($_GET["limit"]);
                $tbl->setOffset($_GET["offset"]);
                $tbl->setMaxCount(count($this->data["data"]));
                $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
                $tbl->render();
        }

Here is the call graph for this function:

ilObjGroupGUI::updateMemberStatusObject (  ) 

displays form in which the member-status can be changed public

Definition at line 1367 of file class.ilObjGroupGUI.php.

References $_POST, $key, $rbacsystem, ilUtil::redirect(), and sendInfo().

        {
                global $rbacsystem;

                if (!$rbacsystem->checkAccess("write",$this->object->getRefId()) )
                {
                        $this->ilErr->raiseError("permission_denied",$this->ilErr->MESSAGE);
                }

                if (isset($_POST["member_status_select"]))
                {
                        foreach ($_POST["member_status_select"] as $key=>$value)
                        {
                                $this->object->setMemberStatus($key,$value);
                        }
                }

                sendInfo($this->lng->txt("msg_obj_modified"),true);
                ilUtil::redirect($this->ctrl->getLinkTarget($this,"members"));
        }

Here is the call graph for this function:

ilObjGroupGUI::updateObject (  ) 

update GroupObject public

Reimplemented from ilObjectGUI.

Definition at line 534 of file class.ilObjGroupGUI.php.

References $_GET, $_POST, $rbacsystem, ilObjectGUI::getReturnLocation(), ilUtil::groupNameExists(), ilUtil::isPassword(), ilUtil::redirect(), sendInfo(), and ilUtil::stripSlashes().

        {
                global $rbacsystem;
                
                if (!$rbacsystem->checkAccess("write",$_GET["ref_id"]) )
                {
                        $this->ilErr->raiseError($this->lng->txt("permission_denied"),$this->ilErr->MESSAGE);
                }

                // check required fields
                if (empty($_POST["Fobject"]["title"]))
                {
                        $this->ilErr->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilErr->MESSAGE);
                }

                if ($_POST["enable_registration"] == 2 && empty($_POST["password"]) || empty($_POST["expirationdate"]) || empty($_POST["expirationtime"]) )//Password-Registration Mode
                {
                        $this->ilErr->raiseError($this->lng->txt("grp_err_registration_data"),$this->ilErr->MESSAGE);
                }
                // check groupname
                if (ilUtil::groupNameExists(ilUtil::stripSlashes($_POST["Fobject"]["title"]),$this->object->getId()))
                {
                        $this->ilErr->raiseError($this->lng->txt("grp_name_exists"),$this->ilErr->MESSAGE);
                }

                $this->object->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
                $this->object->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));

                if ($_POST["enable_registration"] == 2 && !ilUtil::isPassword($_POST["password"]))
                {
                        $this->ilErr->raiseError($this->lng->txt("passwd_invalid"),$this->ilErr->MESSAGE);
                }

                $this->object->setRegistrationFlag($_POST["enable_registration"]);
                $this->object->setPassword($_POST["password"]);
                $this->object->setExpirationDateTime($_POST["expirationdate"]." ".$_POST["expirationtime"].":00");

                //save custom icons
                if ($this->ilias->getSetting("custom_icons"))
                {
                        $this->object->saveIcons($_FILES["cont_big_icon"],
                                $_FILES["cont_small_icon"]);
                }

                $this->update = $this->object->update();

                sendInfo($this->lng->txt("msg_obj_modified"),true);
                ilUtil::redirect($this->getReturnLocation("update",$this->ctrl->getLinkTarget($this,"")));
        }

Here is the call graph for this function:

ilObjGroupGUI::viewObject (  ) 

list childs of current object

public

Reimplemented from ilObjectGUI.

Definition at line 55 of file class.ilObjGroupGUI.php.

References $_GET, ilObjectGUI::$tree, initCourseContentInterface(), and ilContainerGUI::renderObject().

        {
                global $tree;

                if (strtolower($_GET["baseClass"]) == "iladministrationgui")
                {
                        parent::viewObject();
                        return true;
                }
                else if(!$tree->checkForParentType($this->ref_id,'crs'))
                {
                        $this->renderObject();
                        //$this->ctrl->returnToParent($this);
                }
                else
                {
                        $this->initCourseContentInterface();
                        $this->cci_obj->cci_setContainer($this);
                        $this->cci_obj->cci_view();
                }

                $this->tabs_gui->setTabActive('view_content');
                return true;
        }

Here is the call graph for this function:


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