ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSParticipantSettingsGUI Class Reference
+ Collaboration diagram for ilECSParticipantSettingsGUI:

Public Member Functions

 __construct ($a_server_id, $a_mid)
 Constructor.
 getServerId ()
 getMid ()
 getTemplate ()
 getCtrl ()
 getLang ()
 return ilLanguage
 getParticipant ()
 executeCommand ()
 Execute command.

Protected Member Functions

 abort ()
 Abort editing.
 settings (ilPropertyFormGUI $form=null)
 Settings.
 saveSettings ()
 Save settings.
 initFormSettings ()
 Init settings form.
 setTabs ()
 Set tabs.
 initSettings ()
 Init settings.
 initParticipant ()
 init participant

Protected Attributes

 $tpl
 $lng
 $ctrl
 $tabs

Private Attributes

 $server_id = 0
 $mid = 0
 $participant = null

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 14 of file class.ilECSParticipantSettingsGUI.php.

Constructor & Destructor Documentation

ilECSParticipantSettingsGUI::__construct (   $a_server_id,
  $a_mid 
)

Constructor.

public

Definition at line 32 of file class.ilECSParticipantSettingsGUI.php.

References $ilCtrl, $lng, $tpl, initParticipant(), and initSettings().

{
global $lng,$tpl,$ilCtrl,$ilTabs;
$this->server_id = $a_server_id;
$this->mid = $a_mid;
$this->tpl = $tpl;
$this->lng = $lng;
$this->lng->loadLanguageModule('ecs');
$this->ctrl = $ilCtrl;
$this->tabs = $ilTabs;
$this->initSettings();
$this->initParticipant();
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSParticipantSettingsGUI::abort ( )
protected

Abort editing.

Definition at line 134 of file class.ilECSParticipantSettingsGUI.php.

References getCtrl().

{
$this->getCtrl()->returnToParent($this);
}

+ Here is the call graph for this function:

ilECSParticipantSettingsGUI::executeCommand ( )

Execute command.

public

Parameters

Definition at line 110 of file class.ilECSParticipantSettingsGUI.php.

References $cmd, getCtrl(), and setTabs().

{
$this->getCtrl()->saveParameter($this, 'server_id');
$this->getCtrl()->saveParameter($this, 'mid');
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd('settings');
$this->setTabs();
switch($next_class)
{
default:
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilECSParticipantSettingsGUI::getCtrl ( )
Returns
ilCtrl

Definition at line 80 of file class.ilECSParticipantSettingsGUI.php.

References $ctrl.

Referenced by abort(), executeCommand(), initFormSettings(), and saveSettings().

{
return $this->ctrl;
}

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::getLang ( )

return ilLanguage

Definition at line 88 of file class.ilECSParticipantSettingsGUI.php.

References $lng.

Referenced by initFormSettings(), and saveSettings().

{
return $this->lng;
}

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::getMid ( )
Returns
int

Definition at line 62 of file class.ilECSParticipantSettingsGUI.php.

References $mid.

Referenced by initParticipant().

{
return $this->mid;
}

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::getParticipant ( )
Returns
ilECSParticipantSetting

Definition at line 97 of file class.ilECSParticipantSettingsGUI.php.

References $participant.

Referenced by initFormSettings(), and saveSettings().

{
}

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::getServerId ( )
Returns
int

Definition at line 53 of file class.ilECSParticipantSettingsGUI.php.

References $server_id.

Referenced by initParticipant(), and initSettings().

{
}

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::getTemplate ( )
Returns
ilTemplate

Definition at line 71 of file class.ilECSParticipantSettingsGUI.php.

References $tpl.

Referenced by settings().

{
return $this->tpl;
}

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::initFormSettings ( )
protected

Init settings form.

Definition at line 181 of file class.ilECSParticipantSettingsGUI.php.

References getCtrl(), getLang(), getParticipant(), ilECSUtils\getPossibleReleaseTypes(), and ilECSUtils\getPossibleRemoteTypes().

Referenced by saveSettings(), and settings().

{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->getCtrl()->getFormAction($this));
$form->setTitle($this->getLang()->txt('ecs_part_settings').' '.$this->getParticipant()->getTitle());
$token = new ilCheckboxInputGUI($this->getLang()->txt('ecs_token_mechanism'),'token');
$token->setInfo($this->getLang()->txt('ecs_token_mechanism_info'));
$token->setValue(1);
$token->setChecked($this->getParticipant()->isTokenEnabled());
$form->addItem($token);
$dtoken = new ilCheckboxInputGUI($this->getLang()->txt('ecs_deprecated_token'),'dtoken');
$dtoken->setInfo($this->getLang()->txt('ecs_deprecated_token_info'));
$dtoken->setValue(1);
$dtoken->setChecked($this->getParticipant()->isDeprecatedTokenEnabled());
$form->addItem($dtoken);
// Export
$export = new ilCheckboxInputGUI($this->getLang()->txt('ecs_tbl_export'), 'export');
$export->setValue(1);
$export->setChecked($this->getParticipant()->isExportEnabled());
$form->addItem($export);
// Export types
$obj_types = new ilCheckboxGroupInputGUI($this->getLang()->txt('ecs_export_types'), 'export_types');
$obj_types->setValue($this->getParticipant()->getExportTypes());
include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php';
foreach(ilECSUtils::getPossibleReleaseTypes(TRUE) as $type => $trans)
{
$obj_types->addOption(new ilCheckboxOption($trans, $type));
}
$export->addSubItem($obj_types);
// Import
$import = new ilCheckboxInputGUI($this->getLang()->txt('ecs_tbl_import'), 'import');
$import->setValue(1);
$import->setChecked($this->getParticipant()->isImportEnabled());
$form->addItem($import);
// Export types
$imp_types = new ilCheckboxGroupInputGUI($this->getLang()->txt('ecs_import_types'), 'import_types');
$imp_types->setValue($this->getParticipant()->getImportTypes());
include_once './Services/WebServices/ECS/classes/class.ilECSUtils.php';
foreach(ilECSUtils::getPossibleRemoteTypes(TRUE) as $type => $trans)
{
$imp_types->addOption(new ilCheckboxOption($trans, $type));
}
$import->addSubItem($imp_types);
$form->addCommandButton('saveSettings', $this->getLang()->txt('save'));
$form->addCommandButton('abort', $this->getLang()->txt('cancel'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::initParticipant ( )
protected

init participant

Definition at line 270 of file class.ilECSParticipantSettingsGUI.php.

References getMid(), and getServerId().

Referenced by __construct().

{
include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
$this->participant = new ilECSParticipantSetting($this->getServerId(),$this->getMid());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::initSettings ( )
protected

Init settings.

protected

Definition at line 261 of file class.ilECSParticipantSettingsGUI.php.

References ilECSSetting\getInstanceByServerId(), getServerId(), and settings().

Referenced by __construct().

{
include_once('Services/WebServices/ECS/classes/class.ilECSSetting.php');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::saveSettings ( )
protected

Save settings.

Definition at line 156 of file class.ilECSParticipantSettingsGUI.php.

References getCtrl(), getLang(), getParticipant(), initFormSettings(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and settings().

{
$form = $this->initFormSettings();
if($form->checkInput())
{
$this->getParticipant()->enableToken($form->getInput('token'));
$this->getParticipant()->enableDeprecatedToken($form->getInput('dtoken'));
$this->getParticipant()->enableExport($form->getInput('export'));
$this->getParticipant()->setExportTypes($form->getInput('export_types'));
$this->getParticipant()->enableImport($form->getInput('import'));
$this->getParticipant()->setImportTypes($form->getInput('import_types'));
$this->getParticipant()->update();
ilUtil::sendSuccess($this->getLang()->txt('settings_saved'),TRUE);
$this->getCtrl()->redirect($this,'settings');
return TRUE;
}
$form->setValuesByPost();
ilUtil::sendFailure($this->getLang()->txt('err_check_input'));
$this->settings($form);
}

+ Here is the call graph for this function:

ilECSParticipantSettingsGUI::setTabs ( )
protected

Set tabs.

Definition at line 247 of file class.ilECSParticipantSettingsGUI.php.

Referenced by executeCommand().

{
$this->tabs->clearTargets();
$this->tabs->setBackTarget(
$this->lng->txt('back'),
$this->ctrl->getParentReturn($this)
);
}

+ Here is the caller graph for this function:

ilECSParticipantSettingsGUI::settings ( ilPropertyFormGUI  $form = null)
protected

Settings.

Parameters
ilPropertyFormGUI$form

Definition at line 144 of file class.ilECSParticipantSettingsGUI.php.

References getTemplate(), and initFormSettings().

Referenced by initSettings(), and saveSettings().

{
if(!$form instanceof ilPropertyFormGUI)
{
$form = $this->initFormSettings();
}
$this->getTemplate()->setContent($form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilECSParticipantSettingsGUI::$ctrl
protected

Definition at line 23 of file class.ilECSParticipantSettingsGUI.php.

Referenced by getCtrl().

ilECSParticipantSettingsGUI::$lng
protected

Definition at line 22 of file class.ilECSParticipantSettingsGUI.php.

Referenced by __construct(), and getLang().

ilECSParticipantSettingsGUI::$mid = 0
private

Definition at line 17 of file class.ilECSParticipantSettingsGUI.php.

Referenced by getMid().

ilECSParticipantSettingsGUI::$participant = null
private

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

Referenced by getParticipant().

ilECSParticipantSettingsGUI::$server_id = 0
private

Definition at line 16 of file class.ilECSParticipantSettingsGUI.php.

Referenced by getServerId().

ilECSParticipantSettingsGUI::$tabs
protected

Definition at line 24 of file class.ilECSParticipantSettingsGUI.php.

ilECSParticipantSettingsGUI::$tpl
protected

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

Referenced by __construct(), and getTemplate().


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