public function __construct() { global $ilLog; $this->log = $ilLog; $this->pl = ilCertificatePlugin::getInstance(); // Concrete classes must set their properties here... }
/** * Options array can contain the following key/value pairs * - show_filter : True if filtering data is possible * - columns : Array of columns to display * - definition_id: ID of a definition -> shows certificates only from this definition * - user_id: ID of a user -> shows certificates only from the given user * - newest_version_only : True to display the newest versions of certificates only * - actions : Array of possible actions, currently possible: atm array('download') * - actions_multi: Array of possible multi-actions, atm: array('download_zip') * * @param $a_parent_obj * @param string $a_parent_cmd * @param array $options */ public function __construct($a_parent_obj, $a_parent_cmd = "", array $options = array()) { global $ilCtrl, $ilUser; $_options = array('show_filter' => true, 'columns' => self::$default_columns, 'definition_id' => 0, 'user_id' => 0, 'newest_version_only' => true, 'actions' => array('download'), 'actions_multi' => array('download_zip'), 'build_data' => true); $this->options = array_merge($_options, $options); $this->setPrefix('cert_'); $this->setId($this->getOption('user_id') . '_' . $this->getOption('definition_id')); $this->columns = $this->getOption('columns'); $this->pl = ilCertificatePlugin::getInstance(); $this->ctrl = $ilCtrl; $this->user = $ilUser; $this->setShowRowsSelector(true); parent::__construct($a_parent_obj, $a_parent_cmd, ""); $this->setRowTemplate('tpl.cert_row.html', $this->pl->getDirectory()); $this->setFormAction($this->ctrl->getFormAction($a_parent_obj)); $this->addColumns(); $this->setExportFormats(array(self::EXPORT_EXCEL)); if ($this->getOption('show_filter')) { $this->initFilter(); } if ($this->getOption('build_data')) { $this->buildData(); } if ($this->has_any_certs && count($this->getOption('actions_multi'))) { $this->setSelectAllCheckbox("cert_id[]"); $this->addMultiCommand("downloadCertificates", $this->pl->txt('download_zip')); } }
/** * @param srCertificate $certificate * @param string $email */ function __construct(srCertificate $certificate, $email = '') { $this->email = $email; $this->certificate = $certificate; $this->mailer = new ilMimeMail(); $this->pl = ilCertificatePlugin::getInstance(); }
public function __construct() { global $ilCtrl, $tpl; $this->pl = ilCertificatePlugin::getInstance(); $this->ctrl = $ilCtrl; $this->tpl = $tpl; }
public function __construct() { global $ilCtrl, $ilUser, $ilAccess; $this->ctrl = $ilCtrl; $this->pl = ilCertificatePlugin::getInstance(); $this->user = $ilUser; $this->access = $ilAccess; }
/** * @param ilCertificateConfigGUI $parent_gui */ public function __construct(ilCertificateConfigGUI $parent_gui) { global $ilCtrl, $lng; $this->parent_gui = $parent_gui; $this->ctrl = $ilCtrl; $this->lng = $lng; $this->pl = ilCertificatePlugin::getInstance(); $this->setFormAction($this->ctrl->getFormAction($this->parent_gui)); $this->initForm(); }
public function __construct() { global $ilCtrl, $tpl, $ilUser, $rbacreview, $ilMainMenu; $this->ctrl = $ilCtrl; $this->tpl = $tpl; $this->user = $ilUser; $this->rbac = $rbacreview; $this->pl = ilCertificatePlugin::getInstance(); $this->tpl->setTitleIcon(ilCertificatePlugin::getPluginIconImage()); $ilMainMenu->setActive('none'); }
/** * @param srCertificateTypeGUI $parent_gui * @param srCertificateSignature $signature * @param srCertificateType $type */ function __construct($parent_gui, srCertificateSignature $signature, srCertificateType $type) { global $ilCtrl, $lng; $this->parent_gui = $parent_gui; $this->type = $type; $this->signature = $signature; $this->ctrl = $ilCtrl; $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->lng->loadLanguageModule('meta'); $this->initForm(); }
/** * @param $parent_gui * @param srCertificateDefinition $definition */ function __construct($parent_gui, $definition) { global $tpl, $ilCtrl, $lng, $ilUser; $this->parent_gui = $parent_gui; $this->definition = $definition; $this->tpl = $tpl; $this->ctrl = $ilCtrl; $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->user = $ilUser; $this->initForm(); }
/** * @param $parent_gui * @param $type */ function __construct($parent_gui, srCertificateType $type) { global $tpl, $ilCtrl, $lng, $rbacreview; $this->parent_gui = $parent_gui; $this->type = $type; $this->tpl = $tpl; $this->ctrl = $ilCtrl; $this->rbac = $rbacreview; $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->isNew = $this->type->getId() ? false : true; $this->lng->loadLanguageModule('meta'); $this->initForm(); }
/** * @param $parent_gui * @param srCertificatePlaceholder $placeholder */ function __construct($parent_gui, srCertificatePlaceholder $placeholder) { global $tpl, $ilCtrl, $lng, $rbacreview, $ilUser; $this->parent_gui = $parent_gui; $this->placeholder = $placeholder; $this->tpl = $tpl; $this->ctrl = $ilCtrl; $this->rbac = $rbacreview; $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->lng->loadLanguageModule('meta'); $this->user = $ilUser; $this->initForm(); }
/** * @param $parent_gui * @param srCertificateDefinition $definition */ function __construct($parent_gui, $definition) { global $tpl, $ilCtrl, $lng, $rbacreview, $ilUser; $this->parent_gui = $parent_gui; $this->definition = $definition; $this->tpl = $tpl; $this->ctrl = $ilCtrl; $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->isNew = $this->definition->getId() ? false : true; $this->rbac = $rbacreview; $this->user = $ilUser; $this->initForm(); }
/** * @param $a_parent_obj * @param string $a_parent_cmd */ public function __construct($a_parent_obj, $a_parent_cmd) { global $ilCtrl, $ilToolbar; $this->setId('cert_type_standard_placeholders'); parent::__construct($a_parent_obj, $a_parent_cmd); $this->pl = ilCertificatePlugin::getInstance(); $this->ctrl = $ilCtrl; $this->toolbar = $ilToolbar; $this->setRowTemplate('tpl.type_standard_placeholders_row.html', $this->pl->getDirectory()); $this->initColumns(); $this->setFormAction($this->ctrl->getFormAction($a_parent_obj)); $this->setTitle($this->pl->txt('standard_placeholders')); $this->setDescription($this->pl->txt('standard_placeholders_desc')); $this->buildData(); }
/** * @param $a_parent_obj * @param string $a_parent_cmd * @param srCertificateType $type */ public function __construct($a_parent_obj, $a_parent_cmd, srCertificateType $type) { global $ilCtrl, $ilToolbar; $this->setId('cert_type_signatures'); parent::__construct($a_parent_obj, $a_parent_cmd); $this->type = $type; $this->pl = ilCertificatePlugin::getInstance(); $this->ctrl = $ilCtrl; $this->toolbar = $ilToolbar; $this->setRowTemplate('tpl.type_signatures_row.html', $this->pl->getDirectory()); $this->initColumns(); $this->setFormAction($this->ctrl->getFormAction($a_parent_obj)); $this->toolbar->addButton($this->pl->txt('add_new_signature'), $this->ctrl->getLinkTarget($a_parent_obj, 'addSignature')); $this->buildData(); }
/** * @param $a_parent_obj * @param string $a_parent_cmd * @param srCertificateType $type */ public function __construct($a_parent_obj, $a_parent_cmd, srCertificateType $type) { global $ilCtrl, $ilToolbar; $this->setId('cert_type_table_settings'); parent::__construct($a_parent_obj, $a_parent_cmd); $this->type = $type; $this->pl = ilCertificatePlugin::getInstance(); $this->ctrl = $ilCtrl; $this->toolbar = $ilToolbar; $this->setRowTemplate('tpl.type_settings_row.html', $this->pl->getDirectory()); $this->initColumns(); $this->addColumn($this->pl->txt('actions')); $this->setFormAction($this->ctrl->getFormAction($a_parent_obj)); $this->setTitle($this->pl->txt('standard_settings')); $this->buildData(); }
/** * @param $parent_gui * @param srCertificateCustomTypeSetting $setting */ public function __construct($parent_gui, srCertificateCustomTypeSetting $setting) { global $tpl, $ilCtrl, $lng, $rbacreview, $ilUser; $this->parent_gui = $parent_gui; $this->tpl = $tpl; $this->ctrl = $ilCtrl; $this->lng = $lng; $this->rbac = $rbacreview; $this->user = $ilUser; $this->setting = $setting; $this->pl = ilCertificatePlugin::getInstance(); $this->lng->loadLanguageModule('meta'); $this->setFormAction($this->ctrl->getFormAction($parent_gui)); $this->addCommandButton('saveCustomSetting', $this->lng->txt('save')); $this->initForm(); }
public function __construct($a_parent_obj, $a_parent_cmd) { global $ilCtrl, $ilToolbar; $this->setId('cert_type_table'); parent::__construct($a_parent_obj, $a_parent_cmd); $this->pl = ilCertificatePlugin::getInstance(); $this->ctrl = $ilCtrl; $this->toolbar = $ilToolbar; $this->setRowTemplate('tpl.type_row.html', $this->pl->getDirectory()); $this->initColumns(); $this->addColumn($this->pl->txt('actions')); $this->setFormAction($this->ctrl->getFormAction($a_parent_obj)); $this->toolbar->addButton($this->pl->txt('add_new_type'), $this->ctrl->getLinkTargetByClass('srcertificatetypegui', 'addType')); $data = srCertificateType::getArray(); $this->setData($data); }
/** * @param $a_parent_obj * @param string $a_parent_cmd * @param srCertificateType $type */ public function __construct($a_parent_obj, $a_parent_cmd, srCertificateType $type) { global $ilCtrl, $ilToolbar; $this->setId('cert_type_placeholders'); parent::__construct($a_parent_obj, $a_parent_cmd); $this->type = $type; $this->pl = ilCertificatePlugin::getInstance(); $this->ctrl = $ilCtrl; $this->toolbar = $ilToolbar; $this->setRowTemplate('tpl.type_placeholders_row.html', $this->pl->getDirectory()); $this->initColumns(); $this->addColumn($this->pl->txt('actions')); $this->setFormAction($this->ctrl->getFormAction($a_parent_obj)); $this->toolbar->addButton($this->pl->txt('add_new_placeholder'), $this->ctrl->getLinkTargetByClass('srcertificatetypegui', 'addPlaceholder')); $this->buildData(); $this->setTitle($this->pl->txt('custom_placeholders')); }
/** * @param $parent_gui * @param srCertificateType $type * @param string $identifier */ function __construct($parent_gui, srCertificateType $type, $identifier) { global $tpl, $ilCtrl, $lng, $rbacreview; $this->parent_gui = $parent_gui; $this->type = $type; $this->identifier = $identifier; $this->checkIdentifier(); $this->setting = $this->type->getSettingByIdentifier($this->identifier); $this->tpl = $tpl; $this->ctrl = $ilCtrl; $this->rbac = $rbacreview; $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->lng->loadLanguageModule('meta'); $this->lng->loadLanguageModule('form'); $this->initForm(); }
public function __construct() { global $tpl, $ilCtrl, $ilToolbar, $ilTabs, $lng, $ilAccess, $ilDB, $rbacreview, $ilUser; /** @var ilCtrl ctrl */ $this->ctrl = $ilCtrl; $this->tpl = $tpl; $this->toolbar = $ilToolbar; $this->tabs = $ilTabs; $this->type = isset($_GET['type_id']) ? srCertificateType::find((int) $_GET['type_id']) : null; $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->access = $ilAccess; $this->db = $ilDB; $this->tpl->addJavaScript($this->pl->getStyleSheetLocation('uihk_certificate.js')); $this->lng->loadLanguageModule('common'); $this->tpl->setTitleIcon(ilCertificatePlugin::getPluginIconImage()); $this->rbac = $rbacreview; $this->user = $ilUser; }
public function __construct() { global $tpl, $ilCtrl, $ilToolbar, $ilTabs, $lng, $ilAccess, $ilDB, $ilLocator; $this->ctrl = $ilCtrl; $this->tpl = $tpl; $this->toolbar = $ilToolbar; $this->tabs = $ilTabs; $this->ref_id = (int) $_GET['ref_id']; $this->crs = ilObjectFactory::getInstanceByRefId($this->ref_id); $this->definition = srCertificateDefinition::where(array('ref_id' => $this->ref_id))->first(); $this->pl = ilCertificatePlugin::getInstance(); $this->lng = $lng; $this->access = $ilAccess; $this->db = $ilDB; $this->ctrl->saveParameter($this, 'ref_id'); $this->tpl->addJavaScript($this->pl->getStyleSheetLocation('uihk_certificate.js')); $this->lng->loadLanguageModule('common'); $ilLocator->addRepositoryItems(); $this->tpl->setVariable("LOCATOR", $ilLocator->getHTML()); }
/** * @param array $data */ function __construct($data) { $_COOKIE['ilClientId'] = $data[3]; $_POST['username'] = $data[1]; $_POST['password'] = $data[2]; $this->initILIAS(); global $ilDB, $ilUser, $ilCtrl, $ilLog, $ilias; if (self::DEBUG) { $ilLog->write('Auth passed for async Certificate'); } /** * @var $ilDB ilDB * @var $ilUser ilObjUser * @var $ilCtrl ilCtrl */ $this->db = $ilDB; $this->user = $ilUser; $this->ctrl = $ilCtrl; $this->ilias = $ilias; $this->pl = ilCertificatePlugin::getInstance(); }
/** * Check if a given user is allowed to select a given certificate type to create a new definition for the given ref_id. * This method checks the following steps: * 1) Is the type restricted to certain object types, e.g. is the object type of the given ref_id valid? * 2) Is the type restricted to certain roles, e.g. check if the a user has at least one role * * @param srCertificateType $type * @param $ref_id * @param int $user_id If empty, the current user is used * @return bool */ public static function isSelectable(srCertificateType $type, $ref_id, $user_id = 0) { global $ilUser, $rbacreview; $user_id = $user_id ? $user_id : $ilUser->getId(); $pl = ilCertificatePlugin::getInstance(); $object_type = $pl->isCourseTemplate($ref_id) ? 'crs-tpl' : ilObject::_lookupType($ref_id, true); if (!in_array($object_type, $type->getAvailableObjects())) { return false; } // Access restricted by roles. Check if current user has a role to choose the type if (count($type->getRoles()) && !$rbacreview->isAssignedToAtLeastOneGivenRole($user_id, $type->getRoles())) { return false; } return true; }
public function __construct($id = 0) { global $ilLog, $ilAppEventHandler; parent::__construct($id); $this->log = $ilLog; $this->pl = ilCertificatePlugin::getInstance(); $this->event_handler = $ilAppEventHandler; }
/** * @param srCertificate $cert * @param bool $anonymized True to anonymize placeholder values */ public function __construct(srCertificate $cert, $anonymized = false) { $this->certificate = $cert; $this->anonymized = $anonymized; $this->pl = ilCertificatePlugin::getInstance(); }
public function __construct($id = 0) { parent::__construct($id); $this->pl = ilCertificatePlugin::getInstance(); }