4 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
5 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
27 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
32 $this->lng->loadLanguageModule(
'content');
43 global $rbacsystem,
$ilErr,$ilAccess;
45 $next_class = $this->ctrl->getNextClass($this);
46 $cmd = $this->ctrl->getCmd();
50 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
52 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
57 case 'illicenseoverviewgui':
58 include_once(
"./Services/License/classes/class.ilLicenseOverviewGUI.php");
60 $ret =& $this->ctrl->forwardCommand($license_gui);
63 case 'ilpermissiongui':
64 $this->tabs_gui->setTabActive(
'perm_settings');
65 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
67 $ret =& $this->ctrl->forwardCommand($perm_gui);
73 $cmd =
"editSettings";
92 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
94 $this->tabs_gui->addTarget(
"cont_edit_lrs_settings",
95 $this->ctrl->getLinkTarget($this,
"editSettings"),
96 array(
"editSettings",
"view"));
98 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
101 $this->tabs_gui->addTarget(
"licenses",
102 $this->ctrl->getLinkTargetByClass(
'illicenseoverviewgui',
''),
103 "",
"illicenseoverviewgui");
107 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
109 $this->tabs_gui->addTarget(
"perm_settings",
110 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
111 array(),
'ilpermissiongui');
124 $lng->loadLanguageModule(
"license");
125 $lng->loadLanguageModule(
"scormdebug");
127 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
129 $form->setFormAction($ilCtrl->getFormAction($this));
130 $form->setTitle($lng->txt(
"cont_lrs_settings"));
135 $cb_prop->
setInfo($lng->txt(
"cont_enable_page_history_info"));
136 $cb_prop->setChecked($lm_set->get(
"page_history", 1));
137 $form->addItem($cb_prop);
140 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"cont_enable_time_scheduled_page_activation"),
141 "time_scheduled_page_activation");
142 $cb_prop->
setInfo($lng->txt(
"cont_enable_time_scheduled_page_activation_info"));
143 $cb_prop->setChecked($lm_set->get(
"time_scheduled_page_activation"));
144 $form->addItem($cb_prop);
148 "replace_mob_feature");
149 $cb_prop->
setInfo($lng->txt(
"cont_replace_mob_feature_info"));
150 $cb_prop->setChecked($lm_set->get(
"replace_mob_feature"));
151 $form->addItem($cb_prop);
156 $cb_prop->
setInfo($lng->txt(
"cont_html_export_ids_info"));
157 $cb_prop->setChecked($lm_set->get(
"html_export_ids"));
158 $form->addItem($cb_prop);
163 $tx_prop->
setInfo($lng->txt(
"cont_upload_dir_info"));
164 $tx_prop->setValue($lm_set->get(
"cont_upload_dir"));
165 $form->addItem($tx_prop);
171 $cb_prop->
setInfo($lng->txt(
"license_counter_info"));
172 $cb_prop->setChecked($lic_set->get(
"license_counter"));
173 $form->addItem($cb_prop);
179 $tx_prop->setInfo($lng->txt(
"license_warning_info"));
180 $tx_prop->setValue($lic_set->get(
"license_warning"));
181 $form->addItem($tx_prop);
184 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"scormdebug_global_activate"),
"scormdebug_global_activate");
185 $cb_prop->
setInfo($lng->txt(
"scormdebug_global_activate_info"));
186 $cb_prop->setChecked($lm_set->get(
"scormdebug_global_activate"));
187 $form->addItem($cb_prop);
191 "scorm_login_as_learner_id");
192 $cb_prop->
setInfo($lng->txt(
"scorm_login_as_learner_id_info"));
193 $cb_prop->setChecked($lm_set->get(
"scorm_login_as_learner_id"));
194 $form->addItem($cb_prop);
198 "scormdebug_disable_cache");
199 $cb_prop->
setInfo($lng->txt(
"scormdebug_disable_cache_info"));
200 $cb_prop->setChecked($lm_set->get(
"scormdebug_disable_cache"));
201 $form->addItem($cb_prop);
205 "scorm_without_session");
206 $cb_prop->
setInfo($lng->txt(
"scorm_without_session_info"));
207 $cb_prop->setChecked($lm_set->get(
"scorm_without_session"));
208 $form->addItem($cb_prop);
211 $check =
new ilCheckboxInputGui($lng->txt(
'enable_sahs_protocol_data'),
'enable_sahs_pd');
212 $check->setInfo($this->lng->txt(
'enable_sahs_protocol_data_desc'));
213 $check->setChecked($privacy->enabledSahsProtocolData());
214 $form->addItem($check);
217 $form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
218 $form->addCommandButton(
"view", $lng->txt(
"cancel"));
220 $this->tpl->setContent($form->getHTML());
231 $lm_set->set(
"time_scheduled_page_activation",
233 $lm_set->set(
"page_history",
235 $lm_set->set(
"replace_mob_feature",
237 $lm_set->set(
"html_export_ids",
239 $lm_set->set(
"cont_upload_dir",
241 $lm_set->setScormDebug(
"scormdebug_global_activate",
243 $lm_set->set(
"scorm_login_as_learner_id",
245 $lm_set->set(
"scormdebug_disable_cache",
247 $lm_set->set(
"scorm_without_session",
250 $lic_set->set(
"license_counter",
252 $lic_set->set(
"license_warning",
256 $privacy->enableSahsProtocolData((
int)
$_POST[
'enable_sahs_pd']);
261 $ilCtrl->redirect($this,
"view");
274 return array(array(
"editSettings", $fields));