ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Attributes

 $error
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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...
 
 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 30 of file class.ilObjLearningResourcesSettingsGUI.php.

31 {
32 global $DIC;
33
34 $this->error = $DIC["ilErr"];
35 $this->access = $DIC->access();
36 $this->settings = $DIC->settings();
37 $this->ctrl = $DIC->ctrl();
38 $this->lng = $DIC->language();
39 $this->type = 'lrss';
40 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
41
42 $this->lng->loadLanguageModule('content');
43 }
error($a_errmsg)
set error message @access public
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), error(), and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjLearningResourcesSettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

287 {
288 switch ($a_form_id) {
290
292
293 $fields = array('enable_sahs_protocol_data' => array($privacy->enabledSahsProtocolData(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
294
295 return array(array("editSettings", $fields));
296 }
297 }
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 113 of file class.ilObjLearningResourcesSettingsGUI.php.

114 {
115 $ilCtrl = $this->ctrl;
118
119 $lm_set = new ilSetting("lm");
120 $lng->loadLanguageModule("scormdebug");
121
122 $form = new ilPropertyFormGUI();
123 $form->setFormAction($ilCtrl->getFormAction($this));
124 $form->setTitle($lng->txt("cont_lrs_settings"));
125
126 // Page History
127 $cb_prop = new ilCheckboxInputGUI(
128 $lng->txt("cont_enable_page_history"),
129 "page_history"
130 );
131 $cb_prop->setInfo($lng->txt("cont_enable_page_history_info"));
132 $cb_prop->setChecked($lm_set->get("page_history", 1));
133 $form->addItem($cb_prop);
134
135 // Time scheduled page activation
136 $cb_prop = new ilCheckboxInputGUI(
137 $lng->txt("cont_enable_time_scheduled_page_activation"),
138 "time_scheduled_page_activation"
139 );
140 $cb_prop->setInfo($lng->txt("cont_enable_time_scheduled_page_activation_info"));
141 $cb_prop->setChecked($lm_set->get("time_scheduled_page_activation"));
142 $form->addItem($cb_prop);
143
144 // lm starting point
145 $options = array(
146 "" => $this->lng->txt("cont_last_visited_page"),
147 "first" => $this->lng->txt("cont_first_page")
148 );
149 $si = new ilSelectInputGUI($this->lng->txt("cont_lm_starting_point"), "lm_starting_point");
150 $si->setOptions($options);
151 $si->setValue($lm_set->get("lm_starting_point"));
152 $si->setInfo($this->lng->txt("cont_lm_starting_point_info"));
153 $form->addItem($si);
154
155 // Activate replace media object function
156 $cb_prop = new ilCheckboxInputGUI(
157 $lng->txt("cont_replace_mob_feature"),
158 "replace_mob_feature"
159 );
160 $cb_prop->setInfo($lng->txt("cont_replace_mob_feature_info"));
161 $cb_prop->setChecked($lm_set->get("replace_mob_feature"));
162 $form->addItem($cb_prop);
163
164 // Activate HTML export IDs
165 $cb_prop = new ilCheckboxInputGUI(
166 $lng->txt("cont_html_export_ids"),
167 "html_export_ids"
168 );
169 $cb_prop->setInfo($lng->txt("cont_html_export_ids_info"));
170 $cb_prop->setChecked($lm_set->get("html_export_ids"));
171 $form->addItem($cb_prop);
172
173 // scormDebugger activation
174 $cb_prop = new ilCheckboxInputGUI($lng->txt("scormdebug_global_activate"), "scormdebug_global_activate");
175 $cb_prop->setInfo($lng->txt("scormdebug_global_activate_info"));
176 $cb_prop->setChecked($lm_set->get("scormdebug_global_activate"));
177 $form->addItem($cb_prop);
178
179 // scorm2004 disableRTECaching
180 $cb_prop = new ilCheckboxInputGUI(
181 $lng->txt("scormdebug_disable_cache"),
182 "scormdebug_disable_cache"
183 );
184 $cb_prop->setInfo($lng->txt("scormdebug_disable_cache_info"));
185 $cb_prop->setChecked($lm_set->get("scormdebug_disable_cache"));
186 $form->addItem($cb_prop);
187
188 // scorm2004 without session
189 $cb_prop = new ilCheckboxInputGUI(
190 $lng->txt("scorm_without_session"),
191 "scorm_without_session"
192 );
193 $cb_prop->setInfo($lng->txt("scorm_without_session_info"));
194 $cb_prop->setChecked($lm_set->get("scorm_without_session"));
195 $form->addItem($cb_prop);
196
198 $check = new ilCheckboxInputGui($lng->txt('enable_sahs_protocol_data'), 'enable_sahs_pd');
199 $check->setInfo($this->lng->txt('enable_sahs_protocol_data_desc'));
200 $check->setChecked($privacy->enabledSahsProtocolData());
201 $form->addItem($check);
202
203 // show and export protocol data with name
204 $check = new ilCheckboxInputGui($this->lng->txt('ps_export_scorm'), 'export_scorm');
205 $check->setInfo($this->lng->txt('enable_export_scorm_desc'));
206 $check->setChecked($privacy->enabledExportSCORM());
207 $form->addItem($check);
208
209 // scorm auto-setting for learning progress
210 $cb_prop = new ilCheckboxInputGUI($lng->txt("scorm_lp_auto_activate"), "scorm_lp_auto_activate");
211 $cb_prop->setInfo($lng->txt("scorm_lp_auto_activate_info"));
212 $cb_prop->setChecked($lm_set->get("scorm_lp_auto_activate"));
213 $form->addItem($cb_prop);
214
215 // command buttons
216 if ($this->checkPermissionBool("write")) {
217 $form->addCommandButton("saveSettings", $lng->txt("save"));
218 $form->addCommandButton("view", $lng->txt("cancel"));
219 }
220
221 $this->tpl->setContent($form->getHTML());
222 }
This class represents a checkbox 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.
global $ilSetting
Definition: privfeed.php:17
$lm_set

References ilObjectGUI\$ctrl, $ilSetting, $lm_set, ilObjectGUI\$lng, 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 51 of file class.ilObjLearningResourcesSettingsGUI.php.

52 {
54
55 $next_class = $this->ctrl->getNextClass($this);
56 $cmd = $this->ctrl->getCmd();
57
58 $this->prepareOutput();
59
60 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
61 $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
62 }
63
64 switch ($next_class) {
65 case 'ilpermissiongui':
66 $this->tabs_gui->setTabActive('perm_settings');
67 $perm_gui = new ilPermissionGUI($this);
68 $ret = $this->ctrl->forwardCommand($perm_gui);
69 break;
70
71 default:
72 if (!$cmd || $cmd == 'view') {
73 $cmd = "editSettings";
74 }
75
76 $this->$cmd();
77 break;
78 }
79 return true;
80 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $error, ilObjectGUI\$ilErr, $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjLearningResourcesSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

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

89 {
91
92 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
93 $this->tabs_gui->addTarget(
94 "cont_edit_lrs_settings",
95 $this->ctrl->getLinkTarget($this, "editSettings"),
96 array("editSettings", "view")
97 );
98 }
99
100 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
101 $this->tabs_gui->addTarget(
102 "perm_settings",
103 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
104 array(),
105 'ilpermissiongui'
106 );
107 }
108 }

References ilObjectGUI\$rbacsystem.

◆ saveSettings()

ilObjLearningResourcesSettingsGUI::saveSettings ( )

Save learning resources settings.

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

228 {
229 $ilCtrl = $this->ctrl;
231
232 $this->checkPermission("write");
233
234 $lm_set = new ilSetting("lm");
235 $lm_set->set(
236 "time_scheduled_page_activation",
237 ilUtil::stripSlashes($_POST["time_scheduled_page_activation"])
238 );
239 $lm_set->set(
240 "lm_starting_point",
241 ilUtil::stripSlashes($_POST["lm_starting_point"])
242 );
243 $lm_set->set(
244 "page_history",
245 (int) ilUtil::stripSlashes($_POST["page_history"])
246 );
247 $lm_set->set(
248 "replace_mob_feature",
249 ilUtil::stripSlashes($_POST["replace_mob_feature"])
250 );
251 $lm_set->set(
252 "html_export_ids",
253 ilUtil::stripSlashes($_POST["html_export_ids"])
254 );
255 $lm_set->setScormDebug(
256 "scormdebug_global_activate",
257 ilUtil::stripSlashes($_POST["scormdebug_global_activate"])
258 );
259 $lm_set->set(
260 "scorm_login_as_learner_id",
261 ilUtil::stripSlashes($_POST["scorm_login_as_learner_id"])
262 );
263 $lm_set->set(
264 "scormdebug_disable_cache",
265 ilUtil::stripSlashes($_POST["scormdebug_disable_cache"])
266 );
267 $lm_set->set(
268 "scorm_without_session",
269 ilUtil::stripSlashes($_POST["scorm_without_session"])
270 );
271 $lm_set->set(
272 "scorm_lp_auto_activate",
273 ilUtil::stripSlashes($_POST["scorm_lp_auto_activate"])
274 );
275
277 $privacy->enableSahsProtocolData((int) $_POST['enable_sahs_pd']);
278 $privacy->enableExportSCORM((int) $_POST['export_scorm']);
279 $privacy->save();
280
281 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
282
283 $ilCtrl->redirect($this, "view");
284 }
$_POST["username"]
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

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

+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjLearningResourcesSettingsGUI::$error
protected

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

Referenced by executeCommand().

◆ $ERROR_MESSAGE

ilObjLearningResourcesSettingsGUI::$ERROR_MESSAGE
staticprivate

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


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