/**
  * Parse table content
  */
 public function parse()
 {
     $this->initTable();
     include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
     $users = ilSCORMOfflineMode::usersInOfflineMode($this->getObjId());
     foreach ($users as $user) {
         $tmp = array();
         $tmp['user'] = $user['user_id'];
         $tmp['firstname'] = $user['firstname'];
         $tmp['lastname'] = $user['lastname'];
         $data[] = $tmp;
     }
     $this->setData($data);
 }
 function confirmedStopUserOfflineMode()
 {
     include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
     foreach ($_POST["user"] as $id) {
         ilSCORMOfflineMode::stopOfflineModeForUser($this->object->getId(), $id);
     }
     $this->offlineModeManager();
 }
 /**
  * Initialize properties form
  *
  * @param
  * @return
  */
 function initPropertiesForm()
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($ilCtrl->getFormAction($this));
     $this->form->setTitle($this->lng->txt("cont_lm_properties"));
     // SCORM-type
     $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
     $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
     $this->form->addItem($ne);
     // version
     $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
     $ne->setValue($this->object->getModuleVersion());
     $this->form->addItem($ne);
     // online
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
     $cb->setValue("y");
     if ($this->object->getOnline()) {
         $cb->setChecked(true);
     }
     $this->form->addItem($cb);
     // offline Mode
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
     $cb->setValue("y");
     $cb->setChecked($this->object->getOfflineMode());
     include_once "./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php";
     if ($this->object->getOfflineMode() == true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
         $cb->setDisabled(true);
         $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
     } else {
         $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
     }
     $this->form->addItem($cb);
     //
     // presentation
     //
     $sh = new ilFormSectionHeaderGUI();
     $sh->setTitle($this->lng->txt("cont_presentation"));
     $this->form->addItem($sh);
     // display mode (open)
     $options = array("0" => $this->lng->txt("cont_open_normal"), "1" => $this->lng->txt("cont_open_iframe_max"), "2" => $this->lng->txt("cont_open_iframe_defined"), "5" => $this->lng->txt("cont_open_window_undefined"), "6" => $this->lng->txt("cont_open_window_defined"));
     $si = new ilSelectInputGUI($this->lng->txt("cont_open"), "open_mode");
     $si->setOptions($options);
     $si->setValue($this->object->getOpenMode());
     $this->form->addItem($si);
     // width
     $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width");
     $ni->setMaxLength(4);
     $ni->setSize(4);
     $ni->setValue($this->object->getWidth());
     $this->form->addItem($ni);
     // height
     $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height");
     $ni->setMaxLength(4);
     $ni->setSize(4);
     $ni->setValue($this->object->getHeight());
     $this->form->addItem($ni);
     // disable top menu
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_nomenu"), "cobj_nomenu");
     $cb->setValue("y");
     $cb->setChecked($this->object->getNoMenu());
     $this->form->addItem($cb);
     // disable left-side navigation
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_hidenavig"), "cobj_hidenavig");
     $cb->setValue("y");
     $cb->setChecked($this->object->getHideNavig());
     $this->form->addItem($cb);
     // auto navigation to last visited item
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
     $cb->setValue("y");
     $cb->setChecked($this->object->getAuto_last_visited());
     $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
     $this->form->addItem($cb);
     // set IE compatibility mode
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_ie_compatibility"), "cobj_ie_compatibility");
     $cb->setValue("y");
     $cb->setChecked($this->object->getIe_compatibility());
     $cb->setInfo($this->lng->txt("cont_ie_compatibility_info"));
     $this->form->addItem($cb);
     // force IE to render again
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_ie_force_render"), "cobj_ie_force_render");
     $cb->setValue("y");
     $cb->setChecked($this->object->getIe_force_render());
     $cb->setInfo($this->lng->txt("cont_ie_force_render_info"));
     $this->form->addItem($cb);
     //
     // scorm options
     //
     $sh = new ilFormSectionHeaderGUI();
     $sh->setTitle($this->lng->txt("cont_scorm_options"));
     $this->form->addItem($sh);
     // max attempts
     $ni = new ilNumberInputGUI($this->lng->txt("cont_sc_max_attempt"), "max_attempt");
     $ni->setMaxLength(3);
     $ni->setSize(3);
     $ni->setValue($this->object->getMaxAttempt());
     $this->form->addItem($ni);
     // lesson mode
     $options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"), "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
     $si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
     $si->setOptions($options);
     $si->setValue($this->object->getDefaultLessonMode());
     $this->form->addItem($si);
     // credit mode
     $options = array("credit" => $this->lng->txt("cont_credit_on"), "no_credit" => $this->lng->txt("cont_credit_off"));
     $si = new ilSelectInputGUI($this->lng->txt("cont_credit_mode"), "credit_mode");
     $si->setOptions($options);
     $si->setValue($this->object->getCreditMode());
     $si->setInfo($this->lng->txt("cont_credit_mode_info"));
     $this->form->addItem($si);
     // set lesson mode review when completed
     $options = array("n" => $this->lng->txt("cont_sc_auto_review_no"), "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"), "p" => $this->lng->txt("cont_sc_auto_review_passed"), "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"), "c" => $this->lng->txt("cont_sc_auto_review_completed"), "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"), "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"));
     $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
     $si->setOptions($options);
     $si->setValue($this->object->getAutoReviewChar());
     $si->setInfo($this->lng->txt("cont_sc_auto_review_info_2004"));
     $this->form->addItem($si);
     //
     // rte settings
     //
     $sh = new ilFormSectionHeaderGUI();
     $sh->setTitle($this->lng->txt("cont_rte_settings"));
     $this->form->addItem($sh);
     // unlimited session timeout
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
     $cb->setValue("y");
     $cb->setChecked($this->object->getSession());
     $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
     $this->form->addItem($cb);
     // SCORM 2004 fourth edition features
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_fourth_edition"), "cobj_fourth_edition");
     $cb->setValue("y");
     $cb->setChecked($this->object->getFourth_edition());
     $cb->setInfo($this->lng->txt("cont_fourth_edition_info"));
     $this->form->addItem($cb);
     // sequencing
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sequencing"), "cobj_sequencing");
     $cb->setValue("y");
     $cb->setChecked($this->object->getSequencing());
     $cb->setInfo($this->lng->txt("cont_sequencing_info"));
     $this->form->addItem($cb);
     // storage of interactions
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
     $cb->setValue("y");
     $cb->setChecked($this->object->getInteractions());
     $this->form->addItem($cb);
     // objectives
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
     $cb->setValue("y");
     $cb->setChecked($this->object->getObjectives());
     $this->form->addItem($cb);
     // comments
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_comments"), "cobj_comments");
     $cb->setValue("y");
     $cb->setChecked($this->object->getComments());
     $this->form->addItem($cb);
     // time from lms
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
     $cb->setValue("y");
     $cb->setChecked($this->object->getTime_from_lms());
     $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
     $this->form->addItem($cb);
     // check values
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
     $cb->setValue("y");
     $cb->setChecked($this->object->getCheck_values());
     $this->form->addItem($cb);
     // auto cmi.exit to suspend
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
     $cb->setValue("y");
     $cb->setChecked($this->object->getAutoSuspend());
     $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
     $this->form->addItem($cb);
     //
     // debugging
     //
     $sh = new ilFormSectionHeaderGUI();
     $sh->setTitle($this->lng->txt("cont_debugging"));
     $this->form->addItem($sh);
     // test tool
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
     $cb->setValue("y");
     $cb->setChecked($this->object->getDebug());
     if ($this->object->getDebugActivated() == false) {
         $cb->setDisabled(true);
         $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
     } else {
         $cb->setInfo($this->lng->txt("cont_debug_deactivate"));
     }
     $this->form->addItem($cb);
     $this->form->addCommandButton("saveProperties", $lng->txt("save"));
 }