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

Public Member Functions

 ilLicenseGUI (&$a_parent_gui)
 Constructor public.
executeCommand ()
 Execute a command (main entry point) public.
 editLicense ()
 Show the license form public.
 updateLicense ()
 Save the license form public.

Detailed Description

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

Member Function Documentation

ilLicenseGUI::editLicense ( )

Show the license form public.

Definition at line 60 of file class.ilLicenseGUI.php.

{
$licenses = strval($this->license->getLicenses());
$used_licenses = strval($this->license->getAccesses());
$remaining_licenses = $licenses == "0" ? $this->lng->txt("arbitrary") : strval($this->license->getRemainingLicenses());
$potential_accesses = strval($this->license->getPotentialAccesses());
$this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.lic_edit_license.html',$this->module);
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_EDIT_LICENSE", $this->lng->txt("edit_license"));
$this->tpl->setVariable("TXT_EXISTING_LICENSES", $this->lng->txt("existing_licenses"));
$this->tpl->setVariable("LICENSES", $licenses);
$this->tpl->setVariable("TXT_ZERO_LICENSES_EXPLANATION", $this->lng->txt("zero_licenses_explanation"));
$this->tpl->setVariable("TXT_USED_LICENSES", $this->lng->txt("used_licenses"));
$this->tpl->setVariable("USED_LICENSES", $used_licenses);
$this->tpl->setVariable("TXT_USED_LICENSES_EXPLANATION", $this->lng->txt("used_licenses_explanation"));
$this->tpl->setVariable("TXT_REMAINING_LICENSES", $this->lng->txt("remaining_licenses"));
$this->tpl->setVariable("REMAINING_LICENSES", $remaining_licenses);
$this->tpl->setVariable("TXT_REMAINING_LICENSES_EXPLANATION", $this->lng->txt("remaining_licenses_explanation"));
$this->tpl->setVariable("TXT_POTENTIAL_ACCESSES", $this->lng->txt("potential_accesses"));
$this->tpl->setVariable("POTENTIAL_ACCESSES", $potential_accesses);
$this->tpl->setVariable("TXT_POTENTIAL_ACCESSES_EXPLANATION", $this->lng->txt("potential_accesses_explanation"));
$this->tpl->setVariable("TXT_REMARKS", $this->lng->txt("comment"));
$this->tpl->setVariable("REMARKS", $this->license->getRemarks());
$this->tpl->setVariable("BTN_UPDATE", $this->lng->txt("save"));
}
& ilLicenseGUI::executeCommand ( )

Execute a command (main entry point) public.

Definition at line 40 of file class.ilLicenseGUI.php.

References $cmd, and $ilErr.

{
global $rbacsystem, $ilErr;
// access to all functions in this class are only allowed if edit_permission is granted
if (!$rbacsystem->checkAccess("edit_permission",$this->parent_gui->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt("permission_denied"),$ilErr->MESSAGE);
}
$cmd = $this->ctrl->getCmd("editLicense");
$this->$cmd();
return true;
}
ilLicenseGUI::ilLicenseGUI ( $a_parent_gui)

Constructor public.

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

References $ilCtrl, $lng, and $tpl.

{
global $ilCtrl, $tpl, $lng;
$this->module = "Services/License";
$this->ctrl =& $ilCtrl;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->lng->loadLanguageModule("license");
$this->parent_gui =& $a_parent_gui;
$this->license =& new ilLicense($this->parent_gui->object->getId());
}
ilLicenseGUI::updateLicense ( )

Save the license form public.

Definition at line 91 of file class.ilLicenseGUI.php.

References ilUtil\sendInfo().

{
$this->license->setLicenses((int) $_REQUEST["licenses"]);
$this->license->setRemarks($_REQUEST["remarks"]);
$this->license->update();
ilUtil::sendInfo($this->lng->txt('license_updated'), true);
$this->ctrl->redirect($this,"editLicense");
}

+ Here is the call graph for this function:


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