ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjCertificateSettingsGUI Class Reference

Certificate Settings. More...

+ Inheritance diagram for ilObjCertificateSettingsGUI:
+ Collaboration diagram for ilObjCertificateSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 settings ()
 Edit settings. More...
 
 save ()
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Protected Attributes

 $hierarchical_access
 
 $access
 
 $error
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Static Private Attributes

static $ERROR_MESSAGE
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Certificate Settings.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

@ilCtrl_Calls ilObjCertificateSettingsGUI: ilPermissionGUI @ilCtrl_IsCalledBy ilObjCertificateSettingsGUI: ilAdministrationGUI

Definition at line 37 of file class.ilObjCertificateSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjCertificateSettingsGUI::__construct (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Contructor.

@access public

Definition at line 61 of file class.ilObjCertificateSettingsGUI.php.

62 {
63 global $DIC;
64
65 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
66 $this->type = 'cert';
67 $this->lng->loadLanguageModule("certificate");
68 $this->lng->loadLanguageModule("trac");
69
70 $this->access = $DIC['rbacsystem'];
71 $this->error = $DIC['ilErr'];
72 $this->hierarchical_access = $DIC['ilAccess'];
73 }
error($a_errmsg)
set error message @access public
global $DIC
Definition: saml.php:7

References $DIC, and error().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilObjCertificateSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

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

82 {
83 $next_class = $this->ctrl->getNextClass($this);
84 $cmd = $this->ctrl->getCmd();
85
86 $this->prepareOutput();
87
88 if (!$this->hierarchical_access->checkAccess('read', '', $this->object->getRefId())) {
89 $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
90 }
91
92 switch ($next_class) {
93 case 'ilpermissiongui':
94 $this->tabs_gui->setTabActive('perm_settings');
95 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
96 $perm_gui = new ilPermissionGUI($this);
97 $this->ctrl->forwardCommand($perm_gui);
98 break;
99
100 default:
101 if (!$cmd || $cmd == 'view') {
102 $cmd = "settings";
103 }
104
105 $this->$cmd();
106 break;
107 }
108 return true;
109 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.

References error(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjCertificateSettingsGUI::getAdminTabs ( )

Get tabs.

Reimplemented from ilObjectGUI.

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

115 {
116 if ($this->access->checkAccess("visible,read", $this->object->getRefId())) {
117 $this->tabs_gui->addTarget(
118 "settings",
119 $this->ctrl->getLinkTarget($this, "settings"),
120 array("settings", "view")
121 );
122 }
123
124 if ($this->access->checkAccess('edit_permission', $this->object->getRefId())) {
125 $this->tabs_gui->addTarget(
126 "perm_settings",
127 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
128 array(),
129 'ilpermissiongui'
130 );
131 }
132 }

◆ save()

ilObjCertificateSettingsGUI::save ( )

Definition at line 228 of file class.ilObjCertificateSettingsGUI.php.

229 {
230 $form_settings = new ilSetting("certificate");
231
232 $mode = $_POST["persistent_certificate_mode"];
233 $previousMode = $form_settings->get('persistent_certificate_mode', 'persistent_certificate_mode_cron');
234 if ($mode !== $previousMode && $mode === 'persistent_certificate_mode_instant') {
235 $cron = new ilCertificateCron();
236 $cron->init();
237 $cron->run();
238 }
239
240 $form_settings->set("pageformat", $_POST["pageformat"]);
241 $form_settings->set("active", $_POST["active"]);
242 $form_settings->set("persistent_certificate_mode", $mode);
243
244 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
245 $this->settings();
246 }
$_POST["username"]
ILIAS Setting Class.
$cron
Definition: cron.php:16

References $_POST, $cron, and settings().

+ Here is the call graph for this function:

◆ settings()

ilObjCertificateSettingsGUI::settings ( )

Edit settings.

Definition at line 137 of file class.ilObjCertificateSettingsGUI.php.

138 {
139 $this->tabs_gui->setTabActive('settings');
140 $form_settings = new ilSetting("certificate");
141
142 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
143 $form = new ilPropertyFormGUI();
144 $form->setFormAction($this->ctrl->getFormAction($this));
145 $form->setTitle($this->lng->txt('certificate_settings'));
146
147 $active = new ilCheckboxInputGUI($this->lng->txt("active"), "active");
148 $active->setChecked($form_settings->get("active"));
149 $form->addItem($active);
150
151 $info = new ilNonEditableValueGUI($this->lng->txt("info"), "info");
152 $info->setValue($this->lng->txt("certificate_usage"));
153 $form->addItem($info);
154
155 $bgimage = new ilImageFileInputGUI($this->lng->txt("certificate_background_image"), "background");
156 $bgimage->setRequired(false);
157 if (count($_POST)) {
158 // handle the background upload
159 if (strlen($_FILES["background"]["tmp_name"])) {
160 if ($bgimage->checkInput()) {
161 $result = $this->object->uploadBackgroundImage($_FILES["background"]["tmp_name"]);
162 if ($result == false) {
163 $bgimage->setAlert($this->lng->txt("certificate_error_upload_bgimage"));
164 }
165 }
166 }
167 }
168 if (strlen($this->object->hasBackgroundImage())) {
169 require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
171 $bgimage->setImage(ilWACSignedPath::signFile($this->object->getBackgroundImageThumbPathWeb()));
172 }
173 $bgimage->setInfo($this->lng->txt("default_background_info"));
174 $form->addItem($bgimage);
175 $format = new ilSelectInputGUI($this->lng->txt("certificate_page_format"), "pageformat");
176 $defaultformats = array(
177 "a4" => $this->lng->txt("certificate_a4"), // (297 mm x 210 mm)
178 "a4landscape" => $this->lng->txt("certificate_a4_landscape"), // (210 mm x 297 mm)",
179 "a5" => $this->lng->txt("certificate_a5"), // (210 mm x 148.5 mm)
180 "a5landscape" => $this->lng->txt("certificate_a5_landscape"), // (148.5 mm x 210 mm)
181 "letter" => $this->lng->txt("certificate_letter"), // (11 inch x 8.5 inch)
182 "letterlandscape" => $this->lng->txt("certificate_letter_landscape") // (11 inch x 8.5 inch)
183 );
184 $format->setOptions($defaultformats);
185 $format->setValue($form_settings->get("pageformat"));
186 $format->setInfo($this->lng->txt("certificate_page_format_info"));
187 $form->addItem($format);
188
189
190 if ($this->hierarchical_access->checkAccess('write', '', $this->object->getRefId())) {
191 $form->addCommandButton('save', $this->lng->txt('save'));
192 }
193
197 $form,
198 $this
199 );
200 }
201
202 $persistentCertificateMode = new ilRadioGroupInputGUI($this->lng->txt('persistent_certificate_mode'), 'persistent_certificate_mode');
203 $persistentCertificateMode->setRequired(true);
204
205 $cronJobMode = new ilRadioOption($this->lng->txt('persistent_certificate_mode_cron'), 'persistent_certificate_mode_cron');
206 $cronJobMode->setInfo($this->lng->txt('persistent_certificate_mode_cron_info'));
207
208 $instantMode = new ilRadioOption($this->lng->txt('persistent_certificate_mode_instant'), 'persistent_certificate_mode_instant');
209 $instantMode->setInfo($this->lng->txt('persistent_certificate_mode_instant_info'));
210
211 $persistentCertificateMode->addOption($cronJobMode);
212 $persistentCertificateMode->addOption($instantMode);
213
214 $persistentCertificateMode->setValue($form_settings->get('persistent_certificate_mode', 'persistent_certificate_mode_cron'));
215
216 $form->addItem($persistentCertificateMode);
217
218
219 $this->tpl->setContent($form->getHTML());
220
221 if (strcmp($this->ctrl->getCmd(), "save") == 0) {
222 if ($_POST["background_delete"]) {
223 $this->object->deleteBackgroundImage();
224 }
225 }
226 }
$result
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a checkbox property in a property form.
This class represents an image file property in a property form.
This class represents a non editable value in a property form.
static _enabledLearningProgress()
check wether learing progress is enabled or not
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
static signFile($path_to_file)
static setTokenMaxLifetimeInSeconds($token_max_lifetime_in_seconds)
$format
Definition: metadata.php:141
$info
Definition: index.php:5
if(isset($_POST['submit'])) $form

References $_POST, $form, $format, $info, $result, ilObjUserTracking\_enabledLearningProgress(), ilAdministrationSettingsFormHandler\addFieldsToForm(), ilAdministrationSettingsFormHandler\FORM_CERTIFICATE, ilWACSignedPath\setTokenMaxLifetimeInSeconds(), and ilWACSignedPath\signFile().

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilObjCertificateSettingsGUI::$access
protected

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

◆ $error

ilObjCertificateSettingsGUI::$error
protected

Definition at line 52 of file class.ilObjCertificateSettingsGUI.php.

◆ $ERROR_MESSAGE

ilObjCertificateSettingsGUI::$ERROR_MESSAGE
staticprivate

Definition at line 54 of file class.ilObjCertificateSettingsGUI.php.

◆ $hierarchical_access

ilObjCertificateSettingsGUI::$hierarchical_access
protected

Definition at line 42 of file class.ilObjCertificateSettingsGUI.php.


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