30    public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   34        $this->
error = $DIC[
"ilErr"];
 
   35        $this->access = 
$DIC->access();
 
   37        $this->ctrl = 
$DIC->ctrl();
 
   38        $this->lng = 
$DIC->language();
 
   42        $this->lng->loadLanguageModule(
'content');
 
   55        $next_class = $this->ctrl->getNextClass($this);
 
   56        $cmd = $this->ctrl->getCmd();
 
   60        if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
 
   61            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
   64        switch ($next_class) {
 
   65            case 'ilpermissiongui':
 
   66                $this->tabs_gui->setTabActive(
'perm_settings');
 
   68                $ret = $this->ctrl->forwardCommand($perm_gui);
 
   72                if (!$cmd || $cmd == 
'view') {
 
   73                    $cmd = 
"editSettings";
 
   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")
 
  100        if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
 
  101            $this->tabs_gui->addTarget(
 
  103                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui', 
"perm"),
 
  120        $lng->loadLanguageModule(
"scormdebug");
 
  123        $form->setFormAction($ilCtrl->getFormAction($this));
 
  124        $form->setTitle(
$lng->txt(
"cont_lrs_settings"));
 
  128            $lng->txt(
"cont_enable_page_history"),
 
  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);
 
  137            $lng->txt(
"cont_enable_time_scheduled_page_activation"),
 
  138            "time_scheduled_page_activation" 
  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);
 
  146            "" => $this->lng->txt(
"cont_last_visited_page"),
 
  147            "first" => $this->lng->txt(
"cont_first_page")
 
  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"));
 
  157            $lng->txt(
"cont_replace_mob_feature"),
 
  158            "replace_mob_feature" 
  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);
 
  166            $lng->txt(
"cont_html_export_ids"),
 
  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);
 
  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);
 
  181            $lng->txt(
"scormdebug_disable_cache"),
 
  182            "scormdebug_disable_cache" 
  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);
 
  190            $lng->txt(
"scorm_without_session"),
 
  191            "scorm_without_session" 
  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);
 
  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);
 
  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);
 
  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);
 
  217            $form->addCommandButton(
"saveSettings", 
$lng->txt(
"save"));
 
  218            $form->addCommandButton(
"view", 
$lng->txt(
"cancel"));
 
  221        $this->tpl->setContent($form->getHTML());
 
  236            "time_scheduled_page_activation",
 
  248            "replace_mob_feature",
 
  256            "scormdebug_global_activate",
 
  260            "scorm_login_as_learner_id",
 
  264            "scormdebug_disable_cache",
 
  268            "scorm_without_session",
 
  272            "scorm_lp_auto_activate",
 
  277        $privacy->enableSahsProtocolData((
int) 
$_POST[
'enable_sahs_pd']);
 
  278        $privacy->enableExportSCORM((
int) 
$_POST[
'export_scorm']);
 
  281        ilUtil::sendSuccess($this->lng->txt(
"settings_saved"), 
true);
 
  283        $ilCtrl->redirect($this, 
"view");
 
  288        switch ($a_form_id) {
 
  295                return array(array(
"editSettings", $fields));
 
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
Learning Resources Settings.
editSettings()
Edit learning resources settings.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
saveSettings()
Save learning resources settings.
addToExternalSettingsForm($a_form_id)
executeCommand()
Execute command.
Class ilObjectGUI Basic methods of all Output classes.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc