4 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
5 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
36 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
40 $this->rbacsystem = $DIC->rbac()->system();
41 $this->error = $DIC[
"ilErr"];
42 $this->access = $DIC->access();
44 $this->ctrl = $DIC->ctrl();
45 $this->lng = $DIC->language();
47 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
49 $this->lng->loadLanguageModule(
'content');
63 $next_class = $this->ctrl->getNextClass($this);
64 $cmd = $this->ctrl->getCmd();
68 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
69 $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
72 switch ($next_class) {
73 case 'ilpermissiongui':
74 $this->tabs_gui->setTabActive(
'perm_settings');
75 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
77 $ret = $this->ctrl->forwardCommand($perm_gui);
81 if (!$cmd || $cmd ==
'view') {
82 $cmd =
"editSettings";
101 if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
102 $this->tabs_gui->addTarget(
103 "cont_edit_lrs_settings",
104 $this->ctrl->getLinkTarget($this,
"editSettings"),
105 array(
"editSettings",
"view")
109 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
110 $this->tabs_gui->addTarget(
112 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
129 $lng->loadLanguageModule(
"scormdebug");
131 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
134 $form->setTitle(
$lng->txt(
"cont_lrs_settings"));
138 $lng->txt(
"cont_enable_page_history"),
141 $cb_prop->
setInfo(
$lng->txt(
"cont_enable_page_history_info"));
142 $cb_prop->setChecked(
$lm_set->get(
"page_history", 1));
143 $form->addItem($cb_prop);
147 $lng->txt(
"cont_enable_time_scheduled_page_activation"),
148 "time_scheduled_page_activation" 150 $cb_prop->
setInfo(
$lng->txt(
"cont_enable_time_scheduled_page_activation_info"));
151 $cb_prop->setChecked(
$lm_set->get(
"time_scheduled_page_activation"));
152 $form->addItem($cb_prop);
156 "" => $this->lng->txt(
"cont_last_visited_page"),
157 "first" => $this->lng->txt(
"cont_first_page")
159 $si =
new ilSelectInputGUI($this->lng->txt(
"cont_lm_starting_point"),
"lm_starting_point");
161 $si->setValue(
$lm_set->get(
"lm_starting_point"));
162 $si->setInfo($this->lng->txt(
"cont_lm_starting_point_info"));
167 $lng->txt(
"cont_replace_mob_feature"),
168 "replace_mob_feature" 170 $cb_prop->
setInfo(
$lng->txt(
"cont_replace_mob_feature_info"));
171 $cb_prop->setChecked(
$lm_set->get(
"replace_mob_feature"));
172 $form->addItem($cb_prop);
176 $lng->txt(
"cont_html_export_ids"),
179 $cb_prop->
setInfo(
$lng->txt(
"cont_html_export_ids_info"));
180 $cb_prop->setChecked(
$lm_set->get(
"html_export_ids"));
181 $form->addItem($cb_prop);
185 $lng->txt(
"cont_upload_dir"),
188 $tx_prop->
setInfo(
$lng->txt(
"cont_upload_dir_info"));
189 $tx_prop->setValue(
$lm_set->get(
"cont_upload_dir"));
190 $form->addItem($tx_prop);
194 $cb_prop->
setInfo(
$lng->txt(
"scormdebug_global_activate_info"));
195 $cb_prop->setChecked(
$lm_set->get(
"scormdebug_global_activate"));
196 $form->addItem($cb_prop);
200 $lng->txt(
"scormdebug_disable_cache"),
201 "scormdebug_disable_cache" 203 $cb_prop->
setInfo(
$lng->txt(
"scormdebug_disable_cache_info"));
204 $cb_prop->setChecked(
$lm_set->get(
"scormdebug_disable_cache"));
205 $form->addItem($cb_prop);
209 $lng->txt(
"scorm_without_session"),
210 "scorm_without_session" 212 $cb_prop->
setInfo(
$lng->txt(
"scorm_without_session_info"));
213 $cb_prop->setChecked(
$lm_set->get(
"scorm_without_session"));
214 $form->addItem($cb_prop);
217 $check =
new ilCheckboxInputGui(
$lng->txt(
'enable_sahs_protocol_data'),
'enable_sahs_pd');
218 $check->setInfo($this->lng->txt(
'enable_sahs_protocol_data_desc'));
219 $check->setChecked($privacy->enabledSahsProtocolData());
220 $form->addItem($check);
223 $check =
new ilCheckboxInputGui($this->lng->txt(
'ps_export_scorm'),
'export_scorm');
224 $check->setInfo($this->lng->txt(
'enable_export_scorm_desc'));
225 $check->setChecked($privacy->enabledExportSCORM());
226 $form->addItem($check);
230 $cb_prop->
setInfo(
$lng->txt(
"scorm_lp_auto_activate_info"));
231 $cb_prop->setChecked(
$lm_set->get(
"scorm_lp_auto_activate"));
232 $form->addItem($cb_prop);
236 $form->addCommandButton(
"saveSettings",
$lng->txt(
"save"));
237 $form->addCommandButton(
"view",
$lng->txt(
"cancel"));
240 $this->tpl->setContent(
$form->getHTML());
255 "time_scheduled_page_activation",
267 "replace_mob_feature",
279 "scormdebug_global_activate",
283 "scorm_login_as_learner_id",
287 "scormdebug_disable_cache",
291 "scorm_without_session",
295 "scorm_lp_auto_activate",
300 $privacy->enableSahsProtocolData((
int)
$_POST[
'enable_sahs_pd']);
301 $privacy->enableExportSCORM((
int) $_POST[
'export_scorm']);
304 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
306 $ilCtrl->redirect($this,
"view");
311 switch ($a_form_id) {
318 return array(array(
"editSettings", $fields));
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
prepareOutput($a_show_subobjects=true)
prepare output
if(isset($_POST['submit'])) $form
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
executeCommand()
Execute command.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Learning Resources Settings.
editSettings()
Edit learning resources settings.
addToExternalSettingsForm($a_form_id)
saveSettings()
Save learning resources settings.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.