ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjiLincUserGUI Class Reference

Class ilObjiLincUserGUI iLinc related user settings. More...

+ Collaboration diagram for ilObjiLincUserGUI:

Public Member Functions

 ilObjiLincUserGUI (&$a_user_obj, &$a_usrf_ref_id)
 Constructor public.
executeCommand ()
 view ()
 cancel ()
 save ()
 __initSubTabs ($a_cmd)

Detailed Description

Class ilObjiLincUserGUI iLinc related user settings.

Author
Sascha Hofmann sasch.nosp@m.ahof.nosp@m.mann@.nosp@m.gmx..nosp@m.de
Version
Id:
class.ilObjiLincUserGUI.php 15689 2008-01-08 15:55:14Z akill

Definition at line 38 of file class.ilObjiLincUserGUI.php.

Member Function Documentation

ilObjiLincUserGUI::__initSubTabs (   $a_cmd)

Definition at line 222 of file class.ilObjiLincUserGUI.php.

{
global $ilTabs;
$perm = ($a_cmd == 'perm') ? true : false;
$info = ($a_cmd == 'info') ? true : false;
$owner = ($a_cmd == 'owner') ? true : false;
$ilTabs->addSubTabTarget("permission_settings", $this->ctrl->getLinkTarget($this, "perm"),
"", "", "", $perm);
$ilTabs->addSubTabTarget("info_status_info", $this->ctrl->getLinkTarget($this, "info"),
"", "", "", $info);
$ilTabs->addSubTabTarget("owner", $this->ctrl->getLinkTarget($this, "owner"),
"", "", "", $owner);
}
ilObjiLincUserGUI::cancel ( )

Definition at line 172 of file class.ilObjiLincUserGUI.php.

References $_GET, and ilUtil\sendInfo().

{
session_unregister("saved_post");
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
if(strtolower($_GET["baseClass"]) == 'iladministrationgui')
{
$this->ctrl->redirectByClass("ilobjusergui", "view");
}
else
{
$this->ctrl->redirectByClass('ilobjcategorygui','listUsers');
}
}

+ Here is the call graph for this function:

& ilObjiLincUserGUI::executeCommand ( )

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

References $cmd, $ilErr, and USER_FOLDER_ID.

{
global $rbacsystem, $ilErr;
// User folder
if($this->usrf_ref_id == USER_FOLDER_ID and !$rbacsystem->checkAccess('visible,read',$this->usrf_ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
}
// if called from local administration $this->usrf_ref_id is category id
// Todo: this has to be fixed. Do not mix user folder id and category id
if($this->usrf_ref_id != USER_FOLDER_ID)
{
// check if user is assigned to category
if(!$rbacsystem->checkAccess('cat_administrate_users',$this->user->getTimeLimitOwner()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
}
}
$next_class = $this->ctrl->getNextClass($this);
switch($next_class)
{
default:
$cmd = $this->ctrl->getCmd();
if ($cmd == '')
{
$cmd = "view";
}
$this->$cmd();
break;
}
return true;
}
ilObjiLincUserGUI::ilObjiLincUserGUI ( $a_user_obj,
$a_usrf_ref_id 
)

Constructor public.

Parameters
array??
integerobject id
booleancall be reference

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

References $ilCtrl, $ilErr, $lng, $tpl, and PEAR_ERROR_CALLBACK.

{
global $ilias, $tpl, $ilCtrl, $ilErr, $lng;
if (!isset($ilErr))
{
$ilErr = new ilErrorHandling();
$ilErr->setErrorHandling(PEAR_ERROR_CALLBACK,array($ilErr,'errorHandler'));
}
else
{
$this->ilErr =& $ilErr;
}
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->ctrl =& $ilCtrl;
$this->lng->loadLanguageModule('ilinc');
$this->usrf_ref_id =& $a_usrf_ref_id;
$this->user =& $a_user_obj;
$this->ilinc_user = new ilObjiLincUser($a_user_obj);
}
ilObjiLincUserGUI::save ( )

Definition at line 188 of file class.ilObjiLincUserGUI.php.

References $_POST, and ilUtil\sendInfo().

{
if (!$this->ilinc_user->id)
{
$this->ilinc_user->setVar('akuservalue1',$_POST['Fobject']['ilinc_akuservalue1']);
$this->ilinc_user->setVar('akuservalue2',$_POST['Fobject']['ilinc_akuservalue2']);
if (!$this->ilinc_user->add())
{
$this->ilErr->raiseError($this->ilinc_user->getErrorMsg(),$this->ilErr->MESSAGE);
}
$info_message = $this->lng->txt("ilinc_user_added");
}
else
{
$this->ilinc_user->setVar('akuservalue1',$_POST['Fobject']['ilinc_akuservalue1']);
$this->ilinc_user->setVar('akuservalue2',$_POST['Fobject']['ilinc_akuservalue2']);
if (!$this->ilinc_user->edit())
{
$this->ilErr->raiseError($this->ilinc_user->getErrorMsg(),$this->ilErr->MESSAGE);
}
$info_message = $this->lng->txt("ilinc_akuservalues_refreshed");
}
ilUtil::sendInfo($info_message,true);
$this->ctrl->redirectByClass("ilobjilincusergui", "view");
}

+ Here is the call graph for this function:

ilObjiLincUserGUI::view ( )

Definition at line 114 of file class.ilObjiLincUserGUI.php.

References $data.

{
// return iLinc user account data if user already exists on iLinc server
if ($this->ilinc_user->id)
{
if (!$data = $this->ilinc_user->find($this->ilinc_user->id))
{
$this->ilErr->raiseError($this->ilinc_user->getErrorMsg(),$this->ilErr->MESSAGE);
}
$this->ilinc_user->setVar('akuservalue1',$data['users'][$this->ilinc_user->id]['akuservalue1']);
$this->ilinc_user->setVar('akuservalue2',$data['users'][$this->ilinc_user->id]['akuservalue2']);
}
if (!$this->ilinc_user->id)
{
$ilinc_id = $this->lng->txt("ilinc_no_account_yet");
$ilinc_login = $ilinc_id;
$ilinc_passwd = $ilinc_id;
$submit_button_title = $this->lng->txt("ilinc_add_user");
}
else
{
$ilinc_id = $this->ilinc_user->id;
$ilinc_login = $this->ilinc_user->login;
$ilinc_passwd = $this->ilinc_user->passwd;
$submit_button_title = $this->lng->txt("refresh");
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.icrs_usr_edit.html","Modules/ILinc");
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_HEADER", $this->lng->txt("ilinc_user_settings"));
$this->tpl->setVariable("TXT_LOGIN_DATA", $this->lng->txt("login_data"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $submit_button_title);
$this->tpl->setVariable("CMD_SUBMIT", "save");
$this->tpl->setVariable("TXT_ILINC_ID", $this->lng->txt("ilinc_user_id"));
$this->tpl->setVariable("ILINC_ID", $ilinc_id);
$this->tpl->setVariable("TXT_ILINC_LOGIN", $this->lng->txt("login"));
$this->tpl->setVariable("ILINC_LOGIN", $ilinc_login);
/*
$this->tpl->setVariable("TXT_ILINC_PASSWD", $this->lng->txt("passwd"));
$this->tpl->setVariable("ILINC_PASSWD", $ilinc_passwd);
*/
$this->tpl->setVariable("TXT_ILINC_AKUSERVALUES", $this->lng->txt("ilinc_akuservalues"));
$this->tpl->setVariable("TXT_ILINC_AKUSERVALUES_DESC", $this->lng->txt("ilinc_akuservalues_desc"));
$this->tpl->setVariable("TXT_ILINC_AKUSERVALUE1", $this->lng->txt("ilinc_akuservalue1"));
$this->tpl->setVariable("ILINC_AKUSERVALUE1", $this->ilinc_user->akuservalue1);
$this->tpl->setVariable("TXT_ILINC_AKUSERVALUE2", $this->lng->txt("ilinc_akuservalue2"));
$this->tpl->setVariable("ILINC_AKUSERVALUE2", $this->ilinc_user->akuservalue2);
}

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