ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjLearningResourcesSettingsGUI Class Reference

Learning Resources Settings. More...

+ Inheritance diagram for ilObjLearningResourcesSettingsGUI:
+ Collaboration diagram for ilObjLearningResourcesSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editSettings ()
 Edit learning resources settings. More...
 
 saveSettings ()
 Save learning resources settings. More...
 
 addToExternalSettingsForm ($a_form_id)
 
- 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...
 

Protected Attributes

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

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
 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

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

@access public

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

38 {
39 global $DIC;
40
41 $this->rbacsystem = $DIC->rbac()->system();
42 $this->error = $DIC["ilErr"];
43 $this->access = $DIC->access();
44 $this->settings = $DIC->settings();
45 $this->ctrl = $DIC->ctrl();
46 $this->lng = $DIC->language();
47 $this->type = 'lrss';
48 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
49
50 $this->lng->loadLanguageModule('content');
51 }
error($a_errmsg)
set error message @access public
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, error(), and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjLearningResourcesSettingsGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 360 of file class.ilObjLearningResourcesSettingsGUI.php.

361 {
362 switch ($a_form_id) {
364
366
367 $fields = array('enable_sahs_protocol_data' => array($privacy->enabledSahsProtocolData(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
368
369 return array(array("editSettings", $fields));
370 }
371 }
static _getInstance()
Get instance of ilPrivacySettings.

References ilPrivacySettings\_getInstance(), ilAdministrationSettingsFormHandler\FORM_PRIVACY, and ilAdministrationSettingsFormHandler\VALUE_BOOL.

+ Here is the call graph for this function:

◆ editSettings()

ilObjLearningResourcesSettingsGUI::editSettings ( )

Edit learning resources settings.

Definition at line 142 of file class.ilObjLearningResourcesSettingsGUI.php.

143 {
147
148 $lm_set = new ilSetting("lm");
149 $lic_set = new ilSetting("license");
150 $lng->loadLanguageModule("license");
151 $lng->loadLanguageModule("scormdebug");
152
153 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
154 $form = new ilPropertyFormGUI();
155 $form->setFormAction($ilCtrl->getFormAction($this));
156 $form->setTitle($lng->txt("cont_lrs_settings"));
157
158 // Page History
159 $cb_prop = new ilCheckboxInputGUI(
160 $lng->txt("cont_enable_page_history"),
161 "page_history"
162 );
163 $cb_prop->setInfo($lng->txt("cont_enable_page_history_info"));
164 $cb_prop->setChecked($lm_set->get("page_history", 1));
165 $form->addItem($cb_prop);
166
167 // Time scheduled page activation
168 $cb_prop = new ilCheckboxInputGUI(
169 $lng->txt("cont_enable_time_scheduled_page_activation"),
170 "time_scheduled_page_activation"
171 );
172 $cb_prop->setInfo($lng->txt("cont_enable_time_scheduled_page_activation_info"));
173 $cb_prop->setChecked($lm_set->get("time_scheduled_page_activation"));
174 $form->addItem($cb_prop);
175
176 // lm starting point
177 $options = array(
178 "" => $this->lng->txt("cont_last_visited_page"),
179 "first" => $this->lng->txt("cont_first_page")
180 );
181 $si = new ilSelectInputGUI($this->lng->txt("cont_lm_starting_point"), "lm_starting_point");
182 $si->setOptions($options);
183 $si->setValue($lm_set->get("lm_starting_point"));
184 $si->setInfo($this->lng->txt("cont_lm_starting_point_info"));
185 $form->addItem($si);
186
187 // Activate replace media object function
188 $cb_prop = new ilCheckboxInputGUI(
189 $lng->txt("cont_replace_mob_feature"),
190 "replace_mob_feature"
191 );
192 $cb_prop->setInfo($lng->txt("cont_replace_mob_feature_info"));
193 $cb_prop->setChecked($lm_set->get("replace_mob_feature"));
194 $form->addItem($cb_prop);
195
196 // Activate HTML export IDs
197 $cb_prop = new ilCheckboxInputGUI(
198 $lng->txt("cont_html_export_ids"),
199 "html_export_ids"
200 );
201 $cb_prop->setInfo($lng->txt("cont_html_export_ids_info"));
202 $cb_prop->setChecked($lm_set->get("html_export_ids"));
203 $form->addItem($cb_prop);
204
205 // Upload dir for learning resources
206 $tx_prop = new ilTextInputGUI(
207 $lng->txt("cont_upload_dir"),
208 "cont_upload_dir"
209 );
210 $tx_prop->setInfo($lng->txt("cont_upload_dir_info"));
211 $tx_prop->setValue($lm_set->get("cont_upload_dir"));
212 $form->addItem($tx_prop);
213
214
215 // license activation
216 $cb_prop = new ilCheckboxInputGUI(
217 $lng->txt("license_counter"),
218 "license_counter"
219 );
220 $cb_prop->setInfo($lng->txt("license_counter_info"));
221 $cb_prop->setChecked($lic_set->get("license_counter"));
222 $form->addItem($cb_prop);
223
224 // license warning
225 $tx_prop = new ilNumberInputGUI(
226 $lng->txt("license_warning"),
227 "license_warning"
228 );
229 $tx_prop->setSize(5);
230 $tx_prop->setInfo($lng->txt("license_warning_info"));
231 $tx_prop->setValue($lic_set->get("license_warning"));
232 $form->addItem($tx_prop);
233
234 // scormDebugger activation
235 $cb_prop = new ilCheckboxInputGUI($lng->txt("scormdebug_global_activate"), "scormdebug_global_activate");
236 $cb_prop->setInfo($lng->txt("scormdebug_global_activate_info"));
237 $cb_prop->setChecked($lm_set->get("scormdebug_global_activate"));
238 $form->addItem($cb_prop);
239
240 // scorm2004 disableRTECaching
241 $cb_prop = new ilCheckboxInputGUI(
242 $lng->txt("scormdebug_disable_cache"),
243 "scormdebug_disable_cache"
244 );
245 $cb_prop->setInfo($lng->txt("scormdebug_disable_cache_info"));
246 $cb_prop->setChecked($lm_set->get("scormdebug_disable_cache"));
247 $form->addItem($cb_prop);
248
249 // scorm2004 without session
250 $cb_prop = new ilCheckboxInputGUI(
251 $lng->txt("scorm_without_session"),
252 "scorm_without_session"
253 );
254 $cb_prop->setInfo($lng->txt("scorm_without_session_info"));
255 $cb_prop->setChecked($lm_set->get("scorm_without_session"));
256 $form->addItem($cb_prop);
257
259 $check = new ilCheckboxInputGui($lng->txt('enable_sahs_protocol_data'), 'enable_sahs_pd');
260 $check->setInfo($this->lng->txt('enable_sahs_protocol_data_desc'));
261 $check->setChecked($privacy->enabledSahsProtocolData());
262 $form->addItem($check);
263
264 // show and export protocol data with name
265 $check = new ilCheckboxInputGui($this->lng->txt('ps_export_scorm'), 'export_scorm');
266 $check->setInfo($this->lng->txt('enable_export_scorm_desc'));
267 $check->setChecked($privacy->enabledExportSCORM());
268 $form->addItem($check);
269
270 // scorm auto-setting for learning progress
271 $cb_prop = new ilCheckboxInputGUI($lng->txt("scorm_lp_auto_activate"), "scorm_lp_auto_activate");
272 $cb_prop->setInfo($lng->txt("scorm_lp_auto_activate_info"));
273 $cb_prop->setChecked($lm_set->get("scorm_lp_auto_activate"));
274 $form->addItem($cb_prop);
275
276 // command buttons
277 if ($this->checkPermissionBool("write")) {
278 $form->addCommandButton("saveSettings", $lng->txt("save"));
279 $form->addCommandButton("view", $lng->txt("cancel"));
280 }
281
282 $this->tpl->setContent($form->getHTML());
283 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
This class represents a checkbox property in a property form.
This class represents a number property in a property form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
This class represents a property form user interface.
This class represents a selection list property in a property form.
ILIAS Setting Class.
This class represents a text property in a property form.
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
if(isset($_POST['submit'])) $form
$lm_set

References ilObjectGUI\$ctrl, $form, $ilCtrl, $ilSetting, $lm_set, ilObjectGUI\$lng, $options, ilObjectGUI\$settings, $si, ilPrivacySettings\_getInstance(), and ilObjectGUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjLearningResourcesSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

Definition at line 59 of file class.ilObjLearningResourcesSettingsGUI.php.

60 {
63 $ilAccess = $this->access;
64
65 $next_class = $this->ctrl->getNextClass($this);
66 $cmd = $this->ctrl->getCmd();
67
68 $this->prepareOutput();
69
70 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
71 $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
72 }
73
74 switch ($next_class) {
75 case 'illicenseoverviewgui':
76 include_once("./Services/License/classes/class.ilLicenseOverviewGUI.php");
78 $ret = $this->ctrl->forwardCommand($license_gui);
79 break;
80
81 case 'ilpermissiongui':
82 $this->tabs_gui->setTabActive('perm_settings');
83 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
84 $perm_gui = new ilPermissionGUI($this);
85 $ret = $this->ctrl->forwardCommand($perm_gui);
86 break;
87
88 default:
89 if (!$cmd || $cmd == 'view') {
90 $cmd = "editSettings";
91 }
92
93 $this->$cmd();
94 break;
95 }
96 return true;
97 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, $rbacsystem, $ret, ilLicenseOverviewGUI\LIC_MODE_ADMINISTRATION, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjLearningResourcesSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

Definition at line 105 of file class.ilObjLearningResourcesSettingsGUI.php.

106 {
108 $ilAccess = $this->access;
110
111 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
112 $this->tabs_gui->addTarget(
113 "cont_edit_lrs_settings",
114 $this->ctrl->getLinkTarget($this, "editSettings"),
115 array("editSettings", "view")
116 );
117
118 include_once("Services/License/classes/class.ilLicenseAccess.php");
120 $this->tabs_gui->addTarget(
121 "licenses",
122 $this->ctrl->getLinkTargetByClass('illicenseoverviewgui', ''),
123 "",
124 "illicenseoverviewgui"
125 );
126 }
127 }
128
129 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
130 $this->tabs_gui->addTarget(
131 "perm_settings",
132 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
133 array(),
134 'ilpermissiongui'
135 );
136 }
137 }
static _isEnabled()
Check, if licencing is enabled This check is called from the ilAccessHandler class.

References ilObjectGUI\$access, $ilSetting, $rbacsystem, ilObjectGUI\$settings, and ilLicenseAccess\_isEnabled().

+ Here is the call graph for this function:

◆ saveSettings()

ilObjLearningResourcesSettingsGUI::saveSettings ( )

Save learning resources settings.

Definition at line 288 of file class.ilObjLearningResourcesSettingsGUI.php.

289 {
292
293 $this->checkPermission("write");
294
295 $lm_set = new ilSetting("lm");
296 $lm_set->set(
297 "time_scheduled_page_activation",
298 ilUtil::stripSlashes($_POST["time_scheduled_page_activation"])
299 );
300 $lm_set->set(
301 "lm_starting_point",
302 ilUtil::stripSlashes($_POST["lm_starting_point"])
303 );
304 $lm_set->set(
305 "page_history",
306 (int) ilUtil::stripSlashes($_POST["page_history"])
307 );
308 $lm_set->set(
309 "replace_mob_feature",
310 ilUtil::stripSlashes($_POST["replace_mob_feature"])
311 );
312 $lm_set->set(
313 "html_export_ids",
314 ilUtil::stripSlashes($_POST["html_export_ids"])
315 );
316 $lm_set->set(
317 "cont_upload_dir",
318 ilUtil::stripSlashes($_POST["cont_upload_dir"])
319 );
320 $lm_set->setScormDebug(
321 "scormdebug_global_activate",
322 ilUtil::stripSlashes($_POST["scormdebug_global_activate"])
323 );
324 $lm_set->set(
325 "scorm_login_as_learner_id",
326 ilUtil::stripSlashes($_POST["scorm_login_as_learner_id"])
327 );
328 $lm_set->set(
329 "scormdebug_disable_cache",
330 ilUtil::stripSlashes($_POST["scormdebug_disable_cache"])
331 );
332 $lm_set->set(
333 "scorm_without_session",
334 ilUtil::stripSlashes($_POST["scorm_without_session"])
335 );
336 $lm_set->set(
337 "scorm_lp_auto_activate",
338 ilUtil::stripSlashes($_POST["scorm_lp_auto_activate"])
339 );
340 $lic_set = new ilSetting("license");
341 $lic_set->set(
342 "license_counter",
343 ilUtil::stripSlashes($_POST["license_counter"])
344 );
345 $lic_set->set(
346 "license_warning",
347 ilUtil::stripSlashes($_POST["license_warning"])
348 );
349
351 $privacy->enableSahsProtocolData((int) $_POST['enable_sahs_pd']);
352 $privacy->enableExportSCORM((int) $_POST['export_scorm']);
353 $privacy->save();
354
355 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
356
357 $ilCtrl->redirect($this, "view");
358 }
$_POST["username"]
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, $lm_set, ilObjectGUI\$settings, ilPrivacySettings\_getInstance(), ilObjectGUI\checkPermission(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjLearningResourcesSettingsGUI::$error
protected

Definition at line 29 of file class.ilObjLearningResourcesSettingsGUI.php.

Referenced by executeCommand().

◆ $ERROR_MESSAGE

ilObjLearningResourcesSettingsGUI::$ERROR_MESSAGE
staticprivate

Definition at line 31 of file class.ilObjLearningResourcesSettingsGUI.php.

◆ $rbacsystem

ilObjLearningResourcesSettingsGUI::$rbacsystem
protected

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

Referenced by executeCommand(), and getAdminTabs().


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