4require_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
 
    5require_once(
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
 
    6require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Export.php");
 
    7include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
 
    8include_once(
"./Services/COPage/Layout/classes/class.ilPageLayout.php");
 
   52    public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = 
true)
 
   56        $this->lng = 
$DIC->language();
 
   57        $this->access = 
$DIC->access();
 
   58        $this->ctrl = 
$DIC->ctrl();
 
   59        $this->tpl = 
$DIC[
"tpl"];
 
   60        $this->tabs = 
$DIC->tabs();
 
   61        $this->rbacsystem = 
$DIC->rbac()->system();
 
   62        $this->tree = 
$DIC->repositoryTree();
 
   63        $this->toolbar = 
$DIC->toolbar();
 
   65        $this->help = 
$DIC[
"ilHelp"];
 
   66        $this->
error = $DIC[
"ilErr"];
 
   67        $this->
user = $DIC->user();
 
   70        $lng->loadLanguageModule(
"content");
 
   71        $lng->loadLanguageModule(
"sahs");
 
   72        $lng->loadLanguageModule(
"search");
 
   73        $lng->loadLanguageModule(
"exp");
 
   75        parent::__construct($a_data, $a_id, $a_call_by_reference, 
false);
 
   76        #$this->tabs_gui = new ilTabsGUI(); 
   90        $next_class = 
$ilCtrl->getNextClass($this);
 
   93        if ($this->object->getEditable() && $cmd != 
"showEditTree") {   
 
   98        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
  101        $form_gui->updateExpanded();
 
  102        switch ($next_class) {
 
  108                switch (
$_GET[
"notes_mode"]) {
 
  110                        $ilTabs->setTabActive(
"sahs_organization");
 
  116            case "ilscorm2004chaptergui":
 
  117                include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ChapterGUI.php");
 
  119                $chap_gui->setParentGUI($this);
 
  120                return $ilCtrl->forwardCommand($chap_gui);
 
  123            case "ilscorm2004seqchaptergui":
 
  124                include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004SeqChapterGUI.php");
 
  126                $chap_gui->setParentGUI($this);
 
  127                return $ilCtrl->forwardCommand($chap_gui);
 
  130            case "ilscorm2004scogui":
 
  131                include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
 
  133                $sco_gui->setParentGUI($this);
 
  134                return $ilCtrl->forwardCommand($sco_gui);
 
  137            case "ilscorm2004assetgui":
 
  138                include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004AssetGUI.php");
 
  140                $ass_gui->setParentGUI($this);
 
  141                return $ilCtrl->forwardCommand($ass_gui);
 
  144            case "ilscorm2004pagenodegui":
 
  145                include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNodeGUI.php");
 
  147                $page_gui->setParentGUI($this);
 
  148                $ilCtrl->forwardCommand($page_gui);
 
  152                parent::executeCommand();
 
  168        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorerGUI.php");
 
  170        if (!$exp->handleCommand()) {
 
  171            $tpl->setLeftNavContent($exp->getHTML());
 
  184        if (
$_GET[
"obj_id"] > 0) {
 
  185            include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
  188        if (in_array(
$type, array(
"sco", 
"chap", 
"seqc", 
"page"))) {
 
  189            $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
  190            $this->ctrl->redirect($this, 
"jumpToNode");
 
  192            if ($a_to_organization) {
 
  193                $this->ctrl->redirect($this, 
"showOrganization");
 
  195                $this->ctrl->redirect($this, 
"properties");
 
  206    public function frameset($a_to_organization = 
false)
 
  208        if ($this->object->getEditable()) {     
 
  209            $this->ctrl->redirect($this, 
"properties");
 
  211            $this->tpl = 
new ilTemplate(
"tpl.sahs_edit_frameset.html", 
false, 
false, 
"Modules/ScormAicc");
 
  212            $this->tpl->setVariable(
 
  214                $this->ctrl->getLinkTarget($this, 
"properties")
 
  216            $this->tpl->show(
"DEFAULT", 
false);
 
  221    public function jumpToNode($a_anchor_node = 
"", $a_highlight_ids = 
"")
 
  225        $anchor = ($a_anchor_node != 
"")
 
  226            ? 
"node_" . $a_anchor_node
 
  229        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
  231        $ilCtrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
  234                $ilCtrl->setParameterByClass(
"ilscorm2004scogui", 
"highlight", $a_highlight_ids);
 
  235                $ilCtrl->redirectByClass(
"ilscorm2004scogui", 
"showOrganization", $anchor);
 
  238                $ilCtrl->setParameterByClass(
"ilscorm2004assetgui", 
"highlight", $a_highlight_ids);
 
  239                $ilCtrl->redirectByClass(
"ilscorm2004assetgui", 
"showOrganization", $anchor);
 
  242                $ilCtrl->setParameterByClass(
"ilscorm2004chaptergui", 
"highlight", $a_highlight_ids);
 
  243                $ilCtrl->redirectByClass(
"ilscorm2004chaptergui", 
"showOrganization", $anchor);
 
  246                $ilCtrl->setParameterByClass(
"ilscorm2004seqchaptergui", 
"highlight", $a_highlight_ids);
 
  247                $ilCtrl->redirectByClass(
"ilscorm2004seqchaptergui", 
"showOrganization", $anchor);
 
  250                $ilCtrl->redirectByClass(
"ilscorm2004pagenodegui", 
"edit");
 
  268        $this->
setSubTabs(
"settings", 
"general_settings");
 
  270        $lng->loadLanguageModule(
"style");
 
  273        if ($this->object->editable != 1) {
 
  275            $ilTabs->setSubTabActive(
'cont_settings');
 
  277            $ilToolbar->addButtonInstance($this->object->getViewButton());
 
  282                $parent_ref_id = 
$tree->getParentId((
int) 
$_GET[
"ref_id"]);
 
  283                if (
$rbacsystem->checkAccess(
"create", $parent_ref_id, 
"glo")) {
 
  284                    $ilToolbar->addButton(
 
  285                        $this->lng->txt(
"cont_glo_create"),
 
  286                        $ilCtrl->getLinkTarget($this, 
"createGlossary")
 
  289                $ilToolbar->addButton(
 
  290                    $this->lng->txt(
"cont_glo_assign"),
 
  291                    $ilCtrl->getLinkTarget($this, 
"assignGlossary")
 
  294                $ilToolbar->addButton(
 
  295                    $this->lng->txt(
"cont_glo_detach"),
 
  296                    $ilCtrl->getLinkTarget($this, 
"detachGlossary")
 
  301            $fixed_style = 
$ilSetting->get(
"fixed_content_style_id");
 
  302            $style_id = $this->
object->getStyleSheetId();
 
  304            if ($fixed_style == 0) {
 
  311                $st_styles[0] = $this->lng->txt(
"default");
 
  317                        $ilToolbar->addSeparator();
 
  320                        $ilToolbar->addButton(
 
  321                            $this->lng->txt(
"cont_edit_style"),
 
  322                            $ilCtrl->getLinkTarget($this, 
"editStyle")
 
  324                        $ilToolbar->addButton(
 
  325                            $this->lng->txt(
"cont_delete_style"),
 
  326                            $ilCtrl->getLinkTarget($this, 
"deleteStyle")
 
  332                    $ilToolbar->addSeparator();
 
  334                    $ilToolbar->addButton(
 
  335                        $this->lng->txt(
"sty_create_ind_style"),
 
  336                        $ilCtrl->getLinkTarget($this, 
"createStyle")
 
  343        if ($this->object->editable != 1) {
 
  345            $tpl->setContent($this->form->getHTML());
 
  349            $tpl->setContent($this->form->getHTML());
 
  365        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  367        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  368        $this->form->setTitle($this->lng->txt(
"cont_lm_properties"));
 
  371        $this->
object->checkMasteryScoreValues();
 
  374        $ti = 
new ilTextInputGUI($this->lng->txt(
"title"), 
"Fobject_title");
 
  375        $ti->setMaxLength(200);
 
  376        $ti->setValue($this->object->getTitle());
 
  377        $this->form->addItem($ti);
 
  381        $ti->setValue($this->object->getDescription());
 
  382        $this->form->addItem($ti);
 
  387        $this->form->addItem($ne);
 
  391        $ne->setValue($this->object->getModuleVersion());
 
  392        $ne->setInfo($this->lng->txt(
"cont_sc_version_info"));
 
  393        $this->form->addItem($ne);
 
  399        $sh->setTitle($this->lng->txt(
"activation"));
 
  400        $this->form->addItem($sh);
 
  404        if (!$this->object->getOfflineStatus()) {
 
  405            $cb->setChecked(
true);
 
  407        $cb->setInfo($this->lng->txt(
"cont_online_info"));
 
  408        $this->form->addItem($cb);
 
  411        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_offline_mode_allow"), 
"cobj_offline_mode");
 
  413        $cb->setChecked($this->object->getOfflineMode());
 
  414        include_once(
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
 
  416            $cb->setDisabled(
true);
 
  417            $cb->setInfo($this->lng->txt(
"cont_offline_mode_disable_not_allowed_info"));
 
  419            $cb->setInfo($this->lng->txt(
"cont_offline_mode_allow_info"));
 
  421        $this->form->addItem($cb);
 
  427        $sh->setTitle($this->lng->txt(
"cont_presentation"));
 
  428        $this->form->addItem($sh);
 
  444        $op0 = 
new ilRadioOption($this->lng->txt(
"cont_open_normal"), 
"0");
 
  445        $radg->addOption($op0);
 
  446        $op1 = 
new ilRadioOption($this->lng->txt(
"cont_open_iframe"), 
"1");
 
  447        $radg->addOption($op1);
 
  448        $op2 = 
new ilRadioOption($this->lng->txt(
"cont_open_window"), 
"5");
 
  449        $radg->addOption($op2);
 
  450        $radg->setValue($this->object->getOpenMode()); 
 
  453        $ni->setMaxLength(4);
 
  455        $ni->setValue($this->object->getWidth());
 
  456        $op1->addSubItem($ni);
 
  458        $ni->setMaxLength(4);
 
  460        $ni->setValue($this->object->getWidth());
 
  461        $op2->addSubItem($ni);
 
  464        $ni->setMaxLength(4);
 
  466        $ni->setValue($this->object->getHeight());
 
  467        $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
 
  468        $op1->addSubItem($ni);
 
  470        $ni->setMaxLength(4);
 
  472        $ni->setValue($this->object->getHeight());
 
  473        $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
 
  474        $op2->addSubItem($ni);
 
  477        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_ie_force_render"), 
"cobj_ie_force_render");
 
  479        $cb->setChecked($this->object->getIe_force_render());
 
  480        $cb->setInfo($this->lng->txt(
"cont_ie_force_render_info"));
 
  481        $op2->addSubItem($cb);
 
  483        $this->form->addItem($radg);
 
  490        $cb->setChecked($this->object->getNoMenu());
 
  491        $cb->setInfo($this->lng->txt(
"cont_nomenu_info"));
 
  492        $this->form->addItem($cb);
 
  498        $cb->setChecked($this->object->getHideNavig());
 
  499        $cb->setInfo($this->lng->txt(
"cont_hidenavig_info"));
 
  500        $this->form->addItem($cb);
 
  503        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_last_visited"), 
"cobj_auto_last_visited");
 
  505        $cb->setChecked($this->object->getAuto_last_visited());
 
  506        $cb->setInfo($this->lng->txt(
"cont_auto_last_visited_info"));
 
  507        $this->form->addItem($cb);
 
  510        $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
 
  516        $sh->setTitle($this->lng->txt(
"cont_scorm_options"));
 
  517        $this->form->addItem($sh);
 
  521        $op0 = 
new ilRadioOption($this->lng->txt(
"cont_sc_less_mode_normal"), 
"normal");
 
  522        $radg->addOption($op0);
 
  523        $op1 = 
new ilRadioOption($this->lng->txt(
"cont_sc_less_mode_browse"), 
"browse");
 
  524        $radg->addOption($op1);
 
  525        $radg->setValue($this->object->getDefaultLessonMode());
 
  528        $cmop0 = 
new ilRadioOption($this->lng->txt(
"cont_credit_on"), 
"credit");
 
  529        $cmradg->addOption($cmop0);
 
  530        $cmop1 = 
new ilRadioOption($this->lng->txt(
"cont_credit_off"), 
"no_credit");
 
  531        $cmradg->addOption($cmop1);
 
  532        $cmradg->setValue($this->object->getCreditMode());
 
  533        $op0->addSubItem($cmradg);
 
  536            "n" => $this->lng->txt(
"cont_sc_auto_review_no"),
 
  537            "r" => $this->lng->txt(
"cont_sc_auto_review_completed_not_failed_or_passed"),
 
  538            "p" => $this->lng->txt(
"cont_sc_auto_review_passed"),
 
  539            "q" => $this->lng->txt(
"cont_sc_auto_review_passed_or_failed"),
 
  540            "c" => $this->lng->txt(
"cont_sc_auto_review_completed"),
 
  541            "d" => $this->lng->txt(
"cont_sc_auto_review_completed_and_passed"),
 
  542            "y" => $this->lng->txt(
"cont_sc_auto_review_completed_or_passed"),
 
  543            "s" => $this->lng->txt(
"cont_sc_store_if_previous_score_was_lower")
 
  547        $si->setValue($this->object->getAutoReviewChar());
 
  548        $si->setInfo($this->lng->txt(
"cont_sc_auto_review_info_2004"));
 
  549        $op0->addSubItem(
$si);
 
  551        $this->form->addItem($radg);
 
  555        if ($this->object->getMasteryScoreValues() != 
"") {
 
  556            $ni = 
new ilNumberInputGUI($this->lng->txt(
"cont_mastery_score_2004"), 
"mastery_score");
 
  557            $ni->setMaxLength(3);
 
  559            $ni->setValue($this->object->getMasteryScore());
 
  560            $ni->setInfo($this->lng->txt(
"cont_mastery_score_2004_info") . $this->object->getMasteryScoreValues());
 
  561            $this->form->addItem($ni);
 
  568        $sh->setTitle($this->lng->txt(
"cont_rte_settings"));
 
  569        $this->form->addItem($sh);
 
  574        $cb->setChecked($this->object->getSession());
 
  575        $cb->setInfo($this->lng->txt(
"cont_sc_usession_info"));
 
  576        $this->form->addItem($cb);
 
  579        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_fourth_edition"), 
"cobj_fourth_edition");
 
  581        $cb->setChecked($this->object->getFourth_edition());
 
  582        $cb->setInfo($this->lng->txt(
"cont_fourth_edition_info"));
 
  583        $this->form->addItem($cb);
 
  588        $cb->setChecked($this->object->getSequencing());
 
  589        $cb->setInfo($this->lng->txt(
"cont_sequencing_info"));
 
  590        $this->form->addItem($cb);
 
  593        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_interactions"), 
"cobj_interactions");
 
  595        $cb->setChecked($this->object->getInteractions());
 
  596        $cb->setInfo($this->lng->txt(
"cont_interactions_info"));
 
  597        $this->form->addItem($cb);
 
  602        $cb->setChecked($this->object->getObjectives());
 
  603        $cb->setInfo($this->lng->txt(
"cont_objectives_info"));
 
  604        $this->form->addItem($cb);
 
  609        $cb->setChecked($this->object->getComments());
 
  610        $cb->setInfo($this->lng->txt(
"cont_comments_info"));
 
  611        $this->form->addItem($cb);
 
  614        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_time_from_lms"), 
"cobj_time_from_lms");
 
  616        $cb->setChecked($this->object->getTime_from_lms());
 
  617        $cb->setInfo($this->lng->txt(
"cont_time_from_lms_info"));
 
  618        $this->form->addItem($cb);
 
  621        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_check_values"), 
"cobj_check_values");
 
  623        $cb->setChecked($this->object->getCheck_values());
 
  624        $cb->setInfo($this->lng->txt(
"cont_check_values_info"));
 
  625        $this->form->addItem($cb);
 
  628        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_suspend"), 
"cobj_auto_suspend");
 
  630        $cb->setChecked($this->object->getAutoSuspend());
 
  631        $cb->setInfo($this->lng->txt(
"cont_auto_suspend_info"));
 
  632        $this->form->addItem($cb);
 
  636            0 => $this->lng->txt(
"cont_sc_id_setting_user_id"),
 
  637            1 => $this->lng->txt(
"cont_sc_id_setting_user_login"),
 
  638            2 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_ref_id"),
 
  639            3 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_ref_id"),
 
  640            4 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_obj_id"),
 
  641            5 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_obj_id")
 
  645        $si->setValue($this->object->getIdSetting());
 
  646        $si->setInfo($this->lng->txt(
"cont_sc_id_setting_info"));
 
  647        $this->form->addItem(
$si);
 
  651            0 => $this->lng->txt(
"cont_sc_name_setting_last_firstname"),
 
  652            1 => $this->lng->txt(
"cont_sc_name_setting_first_lastname"),
 
  653            2 => $this->lng->txt(
"cont_sc_name_setting_fullname"),
 
  654            3 => $this->lng->txt(
"cont_sc_name_setting_salutation_lastname"),
 
  655            4 => $this->lng->txt(
"cont_sc_name_setting_first_name"),
 
  656            9 => $this->lng->txt(
"cont_sc_name_setting_no_name")
 
  660        $si->setValue($this->object->getNameSetting());
 
  661        $si->setInfo($this->lng->txt(
"cont_sc_name_setting_info"));
 
  662        $this->form->addItem(
$si);
 
  668        $sh->setTitle($this->lng->txt(
"cont_debugging"));
 
  669        $this->form->addItem($sh);
 
  674        $cb->setChecked($this->object->getDebug());
 
  675        if ($this->object->getDebugActivated() == 
false) {
 
  676            $cb->setDisabled(
true);
 
  677            $cb->setInfo($this->lng->txt(
"cont_debug_deactivated"));
 
  679            $cb->setInfo($this->lng->txt(
"cont_debug_deactivate"));
 
  681        $this->form->addItem($cb);
 
  682        $this->form->addCommandButton(
"saveProperties", 
$lng->txt(
"save"));
 
  695        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  700            "" => 
$lng->txt(
"please_select"),
 
  702        $langs = 
$lng->getInstalledLanguages();
 
  703        $lng->loadLanguageModule(
"meta");
 
  704        foreach ($langs as 
$l) {
 
  707        $loc = 
new ilSelectInputGUI($this->lng->txt(
"cont_localization"), 
"localization");
 
  709        $loc->setInfo($this->lng->txt(
"cont_localization_info"));
 
  710        $this->form->addItem($loc);
 
  714        $ne->setInfo(
$lng->txt(
"sahs_glo_info"));
 
  715        $this->form->addItem($ne);
 
  718        $lng->loadLanguageModule(
"style");
 
  719        $fixed_style = 
$ilSetting->get(
"fixed_content_style_id");
 
  720        $style_id = $this->
object->getStyleSheetId();
 
  722        if ($fixed_style > 0) {
 
  725                $this->lng->txt(
"global_fixed") . 
")");
 
  726            $this->form->addItem($st);
 
  734            $st_styles[0] = $this->lng->txt(
"default");
 
  742                    $this->form->addItem($st);
 
  755                $style_sel->setOptions($st_styles);
 
  756                $style_sel->setValue($style_id);
 
  757                $this->form->addItem($style_sel);
 
  763        $ni->setInfo(
$lng->txt(
"cont_qtries_info")); 
 
  764        $ni->setMaxLength(3);
 
  766        $this->form->addItem($ni);
 
  769        $this->form->addCommandButton(
"saveProperties", 
$lng->txt(
"save"));
 
  771        $this->form->setTitle(
$lng->txt(
"cont_scorm_ed_properties"));
 
  772        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  785            $values[
"glossary"] = $this->lng->txt(
"cont_no_glossary");
 
  787        $values[
"q_tries"] = $this->
object->getTries();
 
  788        $values[
"localization"] = $this->
object->getLocalization();
 
  789        $values[
"style_id"] = $this->
object->getStyleSheetId();
 
  791        $this->form->setValuesByArray(
$values);
 
  802        $this->form->checkInput();
 
  804        if ($this->object->editable != 1) {
 
  809            if ($tmpOfflineMode == 
true) {
 
  811                $tmpFourth_edition = 
false; 
 
  812                if ($this->object->getOfflineMode() == 
false) {
 
  813                    $this->
object->zipLmForOfflineMode();
 
  817            if (isset(
$_POST[
"mastery_score"])) {
 
  818                $this->
object->setMasteryScore(
$_POST[
"mastery_score"]);
 
  822            $t_auto_review = 
$_POST[
"auto_review"];
 
  825            if ($t_auto_review == 
"s") {
 
  826                $t_auto_suspend = 
true;
 
  831            $t_height = $this->
object->getHeight();
 
  832            if (
$_POST[
"height_0"] != $this->object->getHeight()) {
 
  833                $t_height = 
$_POST[
"height_0"];
 
  835            if (
$_POST[
"height_1"] != $this->object->getHeight()) {
 
  836                $t_height = 
$_POST[
"height_1"];
 
  839            $t_width = $this->
object->getWidth();
 
  840            if (
$_POST[
"width_0"] != $this->object->getWidth()) {
 
  841                $t_width = 
$_POST[
"width_0"];
 
  843            if (
$_POST[
"width_1"] != $this->object->getWidth()) {
 
  844                $t_width = 
$_POST[
"width_1"];
 
  847            $this->
object->setOfflineStatus(!(
$_POST[
'cobj_online']));
 
  848            $this->
object->setOpenMode(
$_POST[
"open_mode"]);
 
  849            $this->
object->setWidth($t_width);
 
  850            $this->
object->setHeight($t_height);
 
  851            $this->
object->setCreditMode(
$_POST[
"credit_mode"]);
 
  852            $this->
object->setMaxAttempt(
$_POST[
"max_attempt"]);
 
  853            $this->
object->setAutoReviewChar($t_auto_review);
 
  854            $this->
object->setDefaultLessonMode(
$_POST[
"lesson_mode"]);
 
  855            $this->
object->setSession($t_session);
 
  860            $this->
object->setFourth_edition($tmpFourth_edition);
 
  861            $this->
object->setSequencing($tmpSequencing);
 
  867            $this->
object->setAutoSuspend($t_auto_suspend);
 
  868            $this->
object->setOfflineMode($tmpOfflineMode);
 
  870            $this->
object->setIdSetting(
$_POST[
"id_setting"]);
 
  871            $this->
object->setNameSetting(
$_POST[
"name_setting"]);
 
  872            $this->
object->setTitle(
$_POST[
"Fobject_title"]);
 
  873            $this->
object->setDescription(
$_POST[
"Fobject_description"]);
 
  876            $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
 
  879            if ($this->form->checkInput()) {
 
  880                $this->
object->setTries(
$_POST[
"q_tries"]);
 
  881                $this->
object->setLocalization(
$_POST[
"localization"]);
 
  883                if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
 
  885                    || $this->object->getStyleSheetId() == 0)) {
 
  890        $this->
object->update();
 
  891        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
  892        $this->ctrl->redirect($this, 
"properties");
 
  902        $this->
object->setAssignedGlossary(0);
 
  903        $this->
object->update();
 
  904        $ilCtrl->redirect($this, 
"properties");
 
  915        $tpl->setContent($this->form->getHTML());
 
  926        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  931        $ti->setRequired(
true);
 
  932        $this->form->addItem($ti);
 
  936        $this->form->addItem($ta);
 
  938        $this->form->addCommandButton(
"saveGlossary", 
$lng->txt(
"save"));
 
  939        $this->form->addCommandButton(
"properties", 
$lng->txt(
"cancel"));
 
  941        $this->form->setTitle(
$lng->txt(
"cont_glo_create"));
 
  942        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  956        $parent_ref_id = 
$tree->getParentId((
int) 
$_GET[
"ref_id"]);
 
  957        if (!
$rbacsystem->checkAccess(
"create", $parent_ref_id, 
"glo")) {
 
  959            $ilCtrl->redirect($this, 
"properties");
 
  963        if ($this->form->checkInput()) {
 
  964            include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
  966            $newObj->setType(
"glo");
 
  967            $newObj->setTitle(
$_POST[
"title"]);
 
  968            $newObj->setDescription(
$_POST[
"description"]);
 
  969            $newObj->setVirtualMode(
"none");
 
  971            $newObj->createReference();
 
  972            $newObj->putInTree($parent_ref_id);
 
  973            $newObj->setPermissions($parent_ref_id);
 
  976            $this->
object->setAssignedGlossary($newObj->getId());
 
  977            $this->
object->update();
 
  979            ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  980            $ilCtrl->redirect($this, 
"properties");
 
  983        $this->form->setValuesByPost();
 
  984        $tpl->setContent($this->form->getHtml());
 
  996        include_once(
"./Modules/Scorm2004/classes/class.ilGlossarySelectorGUI.php");
 
  998            $ilCtrl->getLinkTarget($this, 
"selectGlossary"),
 
  999            "ilobjscorm2004learningmodulegui" 
 1001        $exp->setSelectableTypes(array(
"glo"));
 
 1003        if (
$_GET[
"expand"] == 
"") {
 
 1004            $expanded = 
$tree->readRootId();
 
 1006            $expanded = 
$_GET[
"expand"];
 
 1008        $exp->setExpand($expanded);
 
 1010        $exp->setTargetGet(
"glo_id");
 
 1013        $exp->setParamsGet($this->ctrl->getParameterArray($this, 
"assignGlossary"));
 
 1016        $exp->setFiltered(
true);
 
 1018        $exp->addFilter(
"root");
 
 1019        $exp->addFilter(
"cat");
 
 1020        $exp->addFilter(
"grp");
 
 1021        $exp->addFilter(
"fold");
 
 1022        $exp->addFilter(
"crs");
 
 1023        $exp->addFilter(
"glo");
 
 1027        $tpl->setContent($exp->getOutput());
 
 1038        $this->
object->update();
 
 1039        $ilCtrl->redirect($this, 
"properties");
 
 1047        if ($this->
id != 0) {
 
 1048            if ($this->call_by_reference) {
 
 1064        $tpl->setContent($this->form->getHTML());
 
 1077        $lng->loadLanguageModule(
"style");
 
 1079        $ilTabs->setTabActive(
"settings");
 
 1081        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1084        $fixed_style = 
$ilSetting->get(
"fixed_content_style_id");
 
 1085        $style_id = $this->
object->getStyleSheetId();
 
 1087        if ($fixed_style > 0) {
 
 1090                $this->lng->txt(
"global_fixed") . 
")");
 
 1091            $this->form->addItem($st);
 
 1099            $st_styles[0] = $this->lng->txt(
"default");
 
 1102            if ($style_id > 0) {
 
 1107                    $this->form->addItem($st);
 
 1112                    $this->form->addCommandButton(
 
 1114                        $lng->txt(
"cont_edit_style")
 
 1116                    $this->form->addCommandButton(
 
 1118                        $lng->txt(
"cont_delete_style")
 
 1133                $style_sel->setOptions($st_styles);
 
 1134                $style_sel->setValue($style_id);
 
 1135                $this->form->addItem($style_sel);
 
 1137                $this->form->addCommandButton(
 
 1138                    "saveStyleSettings",
 
 1141                $this->form->addCommandButton(
 
 1143                    $lng->txt(
"sty_create_ind_style")
 
 1147        $this->form->setTitle(
$lng->txt(
"cont_style"));
 
 1148        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
 1158        $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"create");
 
 1168        $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
 1178        $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"delete");
 
 1188        if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
 
 1190            || $this->object->getStyleSheetId() == 0)) {
 
 1192            $this->
object->update();
 
 1193            ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 1195        $this->ctrl->redirect($this, 
"editStyleProperties");
 
 1207        $ilTabs->setTabActive(
"cont_tracking_data");
 
 1208        $ilTabs->setSubTabActive(
"cont_tracking_bysco");
 
 1210        $reports = array(
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'tracInteractionItem',
'tracInteractionUser',
'tracInteractionUserAnswers');
 
 1212        $scoSelected = 
"all";
 
 1213        if (isset(
$_GET[
"scoSelected"])) {
 
 1216        if (isset(
$_POST[
"scoSelected"])) {
 
 1219        $this->ctrl->setParameter($this, 
'scoSelected', $scoSelected);
 
 1222        if (isset(
$_GET[
"report"])) {
 
 1225        if (isset(
$_POST[
"report"])) {
 
 1228        $this->ctrl->setParameter($this, 
'report', $report);
 
 1230        include_once 
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerScoFilterGUI.php';
 
 1232        $filter->parse($scoSelected, $report, $reports);
 
 1233        if ($report == 
"choose") {
 
 1234            $this->tpl->setContent($filter->form->getHTML());
 
 1236            $scosSelected = array();
 
 1237            if ($scoSelected != 
"all") {
 
 1238                $scosSelected[] = $scoSelected;
 
 1240                $tmpscos = $this->
object->getTrackedItems();
 
 1241                for (
$i = 0; 
$i < count($tmpscos); 
$i++) {
 
 1242                    $scosSelected[] = $tmpscos[
$i][
"id"];
 
 1246            include_once 
"Services/Tracking/classes/class.ilTrQuery.php";
 
 1249            include_once 
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
 
 1251            $this->tpl->setContent($filter->form->getHTML() . 
$tbl->getHTML());
 
 1260        $ilTabs->setTabActive(
'cont_tracking_data');
 
 1262        if ($ilAccess->checkAccess(
"read_learning_progress", 
"", 
$_GET[
"ref_id"])) {
 
 1264            $ilTabs->setSubTabActive(
'cont_tracking_byuser');
 
 1266            $reports = array(
'exportSelectedSuccess',
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportObjGlobalToSystem');
 
 1268            $userSelected = 
"all";
 
 1269            if (isset(
$_GET[
"userSelected"])) {
 
 1272            if (isset(
$_POST[
"userSelected"])) {
 
 1275            $this->ctrl->setParameter($this, 
'userSelected', $userSelected);
 
 1278            if (isset(
$_GET[
"report"])) {
 
 1281            if (isset(
$_POST[
"report"])) {
 
 1284            $this->ctrl->setParameter($this, 
'report', $report);
 
 1286            include_once 
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerUserFilterGUI.php';
 
 1288            $filter->parse($userSelected, $report, $reports);
 
 1289            if ($report == 
"choose") {
 
 1290                $this->tpl->setContent($filter->form->getHTML());
 
 1292                $usersSelected = array();
 
 1293                if ($userSelected != 
"all") {
 
 1294                    $usersSelected[] = $userSelected;
 
 1296                    include_once 
"Services/Tracking/classes/class.ilTrQuery.php";
 
 1300                            $usersSelected[] = 
$user;
 
 1304                $scosSelected = array();
 
 1305                $tmpscos = $this->
object->getTrackedItems();
 
 1306                for (
$i = 0; 
$i < count($tmpscos); 
$i++) {
 
 1307                    $scosSelected[] = $tmpscos[
$i][
"id"];
 
 1313                include_once 
'./Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
 
 1315                $this->tpl->setContent($filter->form->getHTML() . 
$tbl->getHTML());
 
 1317        } elseif ($ilAccess->checkAccess(
"edit_learning_progress", 
"", 
$_GET[
"ref_id"])) {
 
 1333        $mtree = 
new ilTree($this->object->getId());
 
 1334        $mtree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 1335        $mtree->setTreeTablePK(
"slm_id");
 
 1337        if (
$_POST[
"expandAll"] != 
"") {
 
 1338            $_GET[
"scexpand"] = 
"";
 
 1339            $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
 
 1341            foreach ($stree as 
$n) {
 
 1342                $n_arr[] = 
$n[
"child"];
 
 1347        if (
$_POST[
"collapseAll"] != 
"") {
 
 1348            $_GET[
"scexpand"] = 
"";
 
 1349            $_SESSION[
"scexpand"] = array($mtree->readRootId());
 
 1352        $this->tpl = 
new ilTemplate(
"tpl.main.html", 
true, 
true);
 
 1355        $ilCtrl->setParameter($this, 
"active_node", 
$_GET[
"active_node"]);
 
 1357        $this->tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.explorer.html");
 
 1360        $this->tpl->setCurrentBlock(
"exp2_button");
 
 1361        $this->tpl->setVariable(
"CMD_EXP2_BTN", 
"expandAll");
 
 1362        $this->tpl->setVariable(
"TXT_EXP2_BTN", 
$lng->txt(
"expand_all"));
 
 1363        $this->tpl->parseCurrentBlock();
 
 1365        $this->tpl->setCurrentBlock(
"exp2_button");
 
 1366        $this->tpl->setVariable(
"CMD_EXP2_BTN", 
"collapseAll");
 
 1367        $this->tpl->setVariable(
"TXT_EXP2_BTN", 
$lng->txt(
"collapse_all"));
 
 1368        $this->tpl->parseCurrentBlock();
 
 1370        require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
 
 1371        $exp = 
new ilSCORM2004EditorExplorer(
 
 1372            $this->ctrl->getLinkTarget($this, 
"edit"),
 
 1375        $exp->setFrameUpdater(
"content", 
"ilHierarchyFormUpdater");
 
 1376        $exp->setTargetGet(
"obj_id");
 
 1377        $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 
"showTree"));
 
 1379        if (
$_GET[
"scexpand"] == 
"") {
 
 1380            $expanded = $mtree->readRootId();
 
 1382            $expanded = 
$_GET[
"scexpand"];
 
 1386        if (
$_GET[
"active_node"] != 
"") {
 
 1387            $path = $mtree->getPathId(
$_GET[
"active_node"]);
 
 1388            $exp->setForceOpenPath(
$path);
 
 1390            $exp->highlightNode(
$_GET[
"active_node"]);
 
 1392        $exp->setExpand($expanded);
 
 1404        $this->tpl->setCurrentBlock(
"content");
 
 1405        $this->tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"sahs_organization"));
 
 1406        $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
 
 1407        $this->tpl->setVariable(
"EXPLORER", 
$output);
 
 1408        $this->ctrl->setParameter($this, 
"scexpand", 
$_GET[
"scexpand"]);
 
 1409        $this->tpl->setVariable(
"ACTION", $this->ctrl->getLinkTarget($this, 
"showTree"));
 
 1410        $this->tpl->parseCurrentBlock();
 
 1412        include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 1415        $this->tpl->show(
false);
 
 1432        $ilTabs->setTabActive(
"sahs_sequencing");
 
 1434        include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
 
 1436        if (!$this->object->getSequencingExpertMode()) {
 
 1437            $ilToolbar->addButton(
 
 1438                $lng->txt(
"sahs_activate_expert_mode"),
 
 1439                $ilCtrl->getLinkTarget($this, 
"confirmExpertMode")
 
 1442            include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
 
 1444            $t = $this->
object->getTree();
 
 1445            $root_node = 
$t->getNodeData(
$t->getRootId());
 
 1446            $nodes = $this->
object->getTree()->getSubtree($root_node);
 
 1447            foreach (
$nodes as $node) {
 
 1448                if (in_array($node[
"type"], array(
"", 
"chap", 
"sco"))) {
 
 1449                    $ntpl = 
new ilTemplate(
"tpl.seq_node.html", 
true, 
true, 
"Modules/Scorm2004");
 
 1450                    $ntpl->setVariable(
"NODE_ID", $node[
"child"]);
 
 1451                    if ($node[
"type"] == 
"") {
 
 1452                        $ntpl->setVariable(
"TITLE", $this->object->getTitle());
 
 1455                        $ntpl->setVariable(
"TITLE", $node[
"title"]);
 
 1462                    $list->addListNode($ntpl->get(), $node[
"child"], $node[
"parent"]);
 
 1467            $tb->addFormButton(
$lng->txt(
"save"), 
"saveSequencing");
 
 1468            $ftpl = 
new ilTemplate(
"tpl.sequencing.html", 
true, 
true, 
"Modules/Scorm2004");
 
 1469            $ftpl->setVariable(
"CONTENT", 
$list->getHTML());
 
 1470            $ftpl->setVariable(
"FORM_ACTION", 
$ilCtrl->getFormAction($this));
 
 1471            $ftpl->setVariable(
"TB", $tb->getHTML());
 
 1472            $tpl->setContent($ftpl->get());
 
 1486        $ilTabs->setTabActive(
"sahs_sequencing");
 
 1488        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1490        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
 1491        $cgui->setHeaderText(
$lng->txt(
"sahs_activate_expert_mode_info"));
 
 1492        $cgui->setCancel(
$lng->txt(
"cancel"), 
"showSequencing");
 
 1493        $cgui->setConfirm(
$lng->txt(
"sahs_activate_expert_mode"), 
"activateExpertMode");
 
 1495        $tpl->setContent($cgui->getHTML());
 
 1509        $this->
object->setSequencingExpertMode(
true);
 
 1510        $this->
object->update();
 
 1511        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
 1512        $ilCtrl->redirect($this, 
"showSequencing");
 
 1525        include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
 
 1526        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
 
 1527        $t = $this->
object->getTree();
 
 1528        $root_node = 
$t->getNodeData(
$t->getRootId());
 
 1529        $nodes = $this->
object->getTree()->getSubtree($root_node);
 
 1530        foreach (
$nodes as $node) {
 
 1531            if (in_array($node[
"type"], array(
"", 
"chap", 
"sco"))) {
 
 1532                if ($node[
"type"] == 
"") {
 
 1539                $ob_texts = array();
 
 1540                if ($node[
"type"] == 
"sco") {
 
 1542                    $objectives = $sco->getObjectives();
 
 1543                    foreach ($objectives as $o) {
 
 1544                        $ob_texts[$o->getId()] = $o->getObjectiveId();
 
 1548                $item->setSeqXml(
$xml);
 
 1552                if ($node[
"type"] == 
"sco") {
 
 1553                    foreach ($ob_texts as 
$id => 
$t) {
 
 1554                        $objective = 
new ilScorm2004Objective($node[
"child"], 
$id);
 
 1555                        $objective->setObjectiveId(
$t);
 
 1556                        $objective->updateObjective();
 
 1562        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
 1564        $ilCtrl->redirect($this, 
"showSequencing");
 
 1577        $chaps = $this->
object->getTree()->getChilds(
 
 1578            $this->object->getTree()->getRootId()
 
 1581        foreach ($chaps as $chap) {
 
 1582            if ($chap[
"type"] == 
"chap") {
 
 1583                $s_chaps[$chap[
"child"]] = $chap[
"title"];
 
 1590        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
 1591        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 1593            "0" => 
$lng->txt(
"all")
 
 1598        $si->setValue($cur_chap);
 
 1599        $ilToolbar->addInputItem(
$si, 
true);
 
 1600        $ilToolbar->addFormButton(
$lng->txt(
"change"), 
"selectLObjChapter");
 
 1602        include_once(
"./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
 
 1605            "showLearningObjectivesAlignment",
 
 1610        $tpl->setContent($obj_table->getHTML());
 
 1618        $ilCtrl->redirect($this, 
"showLearningObjectivesAlignment");
 
 1626        switch (
$_POST[
'select_export']) {
 
 1627            case "exportScorm12":
 
 1628            case "exportScorm2004_3rd":
 
 1629            case "exportScorm2004_4th":
 
 1633            case "exportHTMLOne":
 
 1634                $this->ctrl->redirect($this, 
$_POST[
'select_export']);
 
 1637                $this->ctrl->redirect($this, 
'showExportList');
 
 1650        $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 
'selectExport'));
 
 1651        $ilToolbar->setId(
"scorm2004export");
 
 1665            "exportScorm2004_3rd" => $this->lng->txt(
"scorm_create_export_file_scrom2004"),
 
 1666            "exportScorm2004_4th" => $this->lng->txt(
"scorm_create_export_file_scrom2004_4th"),
 
 1667            "exportScorm12" => $this->lng->txt(
"scorm_create_export_file_scrom12"),
 
 1668            "exportHTML" => $this->lng->txt(
"scorm_create_export_file_html"),
 
 1669            "exportHTMLOne" => $this->lng->txt(
"scorm_create_export_file_html_one")
 
 1673        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 1675        $si->setOptions($buttons);
 
 1676        $ilToolbar->addInputItem(
$si, 
true);
 
 1678        $ilToolbar->addFormButton($this->lng->txt(
'export'), 
"selectExport");
 
 1680        $export_files = $this->
object->getExportFiles();
 
 1682        include_once 
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
 
 1685        foreach ($export_files as $exp_file) {
 
 1686            $filetype = $exp_file[
'type'];
 
 1687            $public_str = ($exp_file[
"file"] == $this->
object->getPublicExportFile($filetype))
 
 1688                ? 
" <b>(" . $this->lng->txt(
"public") . 
")<b>" 
 1690            $file_arr = explode(
"__", $exp_file[
"file"]);
 
 1693        $table_gui->setData(
$data);
 
 1695        $this->tpl->setContent($table_gui->getHTML());
 
 1708        if ($this->ctrl->getCmd() == 
"delete") {
 
 1712        if (!$this->object->getEditable()) {
 
 1713            return parent::getTabs();
 
 1716        $ilHelp->setScreenIdComponent(
"sahsed");
 
 1719        $this->tabs_gui->addTarget(
 
 1720            "sahs_organization",
 
 1721            $this->ctrl->getLinkTarget($this, 
"showOrganization"),
 
 1727        $force_active = ($this->ctrl->getNextClass() == 
"ilinfoscreengui")
 
 1730        $this->tabs_gui->addTarget(
 
 1732            $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui", 
"showSummary"),
 
 1740        $this->tabs_gui->addTarget(
 
 1742            $this->ctrl->getLinkTarget($this, 
"properties"),
 
 1755        $this->tabs_gui->addTarget(
 
 1756            "sahs_objectives_alignment",
 
 1757            $this->ctrl->getLinkTarget($this, 
"showLearningObjectivesAlignment"),
 
 1758            "showLearningObjectivesAlignment",
 
 1763        $this->tabs_gui->addTarget(
 
 1765            $this->ctrl->getLinkTarget($this, 
"showSequencing"),
 
 1783        include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
 1785        $mdtab = $mdgui->getTab();
 
 1787            $this->tabs_gui->addTarget(
 
 1796        $this->tabs_gui->addTarget(
 
 1798            $this->ctrl->getLinkTarget($this, 
"showExportList"),
 
 1799            array(
"showExportList", 
'confirmDeleteExportFile'),
 
 1804        if ($ilAccess->checkAccess(
'edit_permission', 
'', $this->object->getRefId())) {
 
 1805            $this->tabs_gui->addTarget(
 
 1807                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
 1808                array(
"perm",
"info",
"owner"),
 
 1813        if ($this->object->editable == 1) {
 
 1815            $this->tabs_gui->addNonTabbedLink(
 
 1817                $this->lng->txt(
"cont_sc_preview"),
 
 1818                $this->ctrl->getLinkTarget($this, 
"preview"),
 
 1833        if ($a_main_tab == 
"settings" &&
 
 1834            $this->object->editable == 1) {
 
 1845            $ilTabs->activateSubTab($a_active);
 
 1855        $slm_tree = 
new ilTree($this->object->getId());
 
 1856        $slm_tree->setTreeTablePK(
"slm_id");
 
 1857        $slm_tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 1866        $a_form_action = 
"",
 
 1876        if ($a_form_action == 
"") {
 
 1877            $a_form_action = 
$ilCtrl->getFormAction($this);
 
 1880        if ($a_icon == 
"") {
 
 1881            $a_title = $this->
object->getTitle();
 
 1887        if ($a_top_node == 0) {
 
 1888            $a_top_node = $slm_tree->getRootId();
 
 1891        if (is_null($a_gui_obj)) {
 
 1893            $a_gui_cmd = 
"showOrganization";
 
 1896        $ilCtrl->setParameter($this, 
"backcmd", 
"showOrganization");
 
 1897        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 1899        $form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
 
 1900        $form_gui->setFormAction($a_form_action);
 
 1903        $form_gui->setTree($slm_tree);
 
 1904        $form_gui->setCurrentTopNodeId($a_top_node);
 
 1905        $form_gui->addMultiCommand(
$lng->txt(
"delete"), 
"deleteNodes");
 
 1906        $form_gui->addMultiCommand(
$lng->txt(
"cut"), 
"cutItems");
 
 1907        $form_gui->addMultiCommand(
$lng->txt(
"copy"), 
"copyItems");
 
 1908        $form_gui->addCommand(
$lng->txt(
"cont_save_all_titles"), 
"saveAllTitles");
 
 1909        $form_gui->addCommand(
$lng->txt(
"expand_all"), 
"expandAll");
 
 1910        $form_gui->addCommand(
$lng->txt(
"collapse_all"), 
"collapseAll");
 
 1911        $form_gui->setTriggeredUpdateCommand(
"saveAllTitles");
 
 1914        if (
$_GET[
"highlight"] != 
"") {
 
 1915            $hl = explode(
":", 
$_GET[
"highlight"]);
 
 1916            $form_gui->setHighlightedNodes($hl);
 
 1917            $form_gui->setFocusId($hl[0]);
 
 1920        $ilCtrl->setParameter($this, 
"active_node", 
$_GET[
"obj_id"]);
 
 1923        $sc_tpl = 
new ilTemplate(
"tpl.scormeditor_orga_screen.html", 
true, 
true, 
"Modules/Scorm2004");
 
 1924        $sc_tpl->setVariable(
"ORGANIZATION", $form_gui->getHTML());
 
 1927        $tpl->setContent($sc_tpl->get());
 
 1940        $ilCtrl->setParameter($this, 
"nodes_mode", $a_mode);
 
 1941        include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
 
 1942        $node_id = 
$_GET[
"obj_id"];
 
 1943        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 1944        $node_type = ($node_id > 0)
 
 1949            $this->object->getId(),
 
 1953        if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]) && 
$ilSetting->get(
"comments_del_tutor", 1)) {
 
 1954            $notes_gui->enablePublicNotesDeletion(
true);
 
 1956        $notes_gui->enablePrivateNotes();
 
 1957        $notes_gui->enablePublicNotes();
 
 1959        $next_class = 
$ilCtrl->getNextClass($this);
 
 1960        if ($next_class == 
"ilnotegui") {
 
 1961            $html = $this->ctrl->forwardCommand($notes_gui);
 
 1963            $html = $notes_gui->getNotesHTML();
 
 1976        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 1978        $slm_tree = 
new ilTree($this->object->getId());
 
 1979        $slm_tree->setTreeTablePK(
"slm_id");
 
 1980        $slm_tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 1986            $parent_id = $slm_tree->getParentId($node_id);
 
 1989            $parent_id = $node_id;
 
 1992        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
 
 1993        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 1995        $chap_ids = array();
 
 1996        for (
$i = 1; 
$i <= $num; 
$i++) {
 
 1998            $chap->setTitle(
$lng->txt(
"sahs_new_chapter"));
 
 1999            $chap->setSLMId($this->object->getId());
 
 2002            $chap_ids[] = $chap->getId();
 
 2004        $chap_ids = array_reverse($chap_ids);
 
 2005        $chap_ids = implode(
":", $chap_ids);
 
 2008            $ilCtrl->setParameter($this, 
"highlight", $chap_ids);
 
 2009            $ilCtrl->redirect($this, 
"showOrganization", 
"node_" . $node_id);
 
 2011        return array(
"node_id" => $node_id, 
"items" => $chap_ids);
 
 2022        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2024        $slm_tree = 
new ilTree($this->object->getId());
 
 2025        $slm_tree->setTreeTablePK(
"slm_id");
 
 2026        $slm_tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 2031        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
 
 2032        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2035            $parent_id = $slm_tree->getParentId($node_id);
 
 2038            $parent_id = $node_id;
 
 2043        for (
$i = 1; 
$i <= $num; 
$i++) {
 
 2045            $sco->setTitle(
$lng->txt(
"sahs_new_sco"));
 
 2046            $sco->setSLMId($this->object->getId());
 
 2049            $sco_ids[] = $sco->getId();
 
 2051        $sco_ids = array_reverse($sco_ids);
 
 2052        $sco_ids = implode(
":", $sco_ids);
 
 2055            $ilCtrl->setParameter($this, 
"highlight", $sco_ids);
 
 2056            $ilCtrl->redirect($this, 
"showOrganization", 
"node_" . $node_id);
 
 2058        return array(
"node_id" => $node_id, 
"items" => $sco_ids);
 
 2069        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2071        $slm_tree = 
new ilTree($this->object->getId());
 
 2072        $slm_tree->setTreeTablePK(
"slm_id");
 
 2073        $slm_tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 2078        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
 
 2079        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2082            $parent_id = $slm_tree->getParentId($node_id);
 
 2085            $parent_id = $node_id;
 
 2090        for (
$i = 1; 
$i <= $num; 
$i++) {
 
 2092            $ass->setTitle(
$lng->txt(
"sahs_new_asset"));
 
 2093            $ass->setSLMId($this->object->getId());
 
 2096            $ass_ids[] = $ass->getId();
 
 2098        $ass_ids = array_reverse($ass_ids);
 
 2099        $ass_ids = implode(
":", $ass_ids);
 
 2102            $ilCtrl->setParameter($this, 
"highlight", $ass_ids);
 
 2103            $ilCtrl->redirect($this, 
"showOrganization", 
"node_" . $node_id);
 
 2105        return array(
"node_id" => $node_id, 
"items" => $ass_ids);
 
 2116        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2118        $slm_tree = 
new ilTree($this->object->getId());
 
 2119        $slm_tree->setTreeTablePK(
"slm_id");
 
 2120        $slm_tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 2125        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
 
 2126        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2128            $parent_id = $slm_tree->getParentId($node_id);
 
 2131            $parent_id = $node_id;
 
 2135        $page_ids = array();
 
 2136        for (
$i = 1; 
$i <= $num; 
$i++) {
 
 2138            $page->setTitle(
$lng->txt(
"sahs_new_page"));
 
 2139            $page->setSLMId($this->object->getId());
 
 2142            $page_ids[] = $page->getId();
 
 2144        $page_ids = array_reverse($page_ids);
 
 2145        $page_ids = implode(
":", $page_ids);
 
 2148            $ilCtrl->setParameter($this, 
"highlight", $page_ids);
 
 2149            $ilCtrl->redirect($this, 
"showOrganization", 
"node_" . $node_id);
 
 2151        return array(
"node_id" => $node_id, 
"items" => $page_ids);
 
 2164        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2165        include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
 
 2167        $templates = array();
 
 2171        $default_identifier = 
$_POST[
"identifier"];
 
 2176        $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.scormeditor_seq_chooser.html", 
"Modules/Scorm2004");
 
 2178        $this->tpl->setCurrentBlock(
"option_item");
 
 2181        foreach ($arr_templates as $templ) {
 
 2183            $item_data = $templ->getMetadataProperties();
 
 2184            $item_data[
'identifier'] = $templ->getIdentifier();
 
 2185            array_push($templates, $item_data);
 
 2186            if ($default_identifier == $item_data[
'identifier']) {
 
 2188                $active = $item_data;
 
 2190            $this->tpl->setVariable(
"VAL_SELECTED", $sel);
 
 2191            $this->tpl->setVariable(
"VAL_IDENTIFIER", $item_data[
'identifier']);
 
 2192            $this->tpl->setVariable(
"VAL_TITLE", $item_data[
'title']);
 
 2193            $this->tpl->parseCurrentBlock();
 
 2197        if ($active == 
null) {
 
 2200            $image = $templates[0][
'thumbnail'];
 
 2203            $image = $active[
'thumbnail'];
 
 2206        $this->tpl->setVariable(
"VAL_DESCRIPTION", 
$description);
 
 2209        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 2210        $this->tpl->setVariable(
"BTN_NAME", 
"insertScenario");
 
 2211        $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
 2212        $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"insert"));
 
 2213        $this->tpl->setVariable(
"TXT_CHANGE", $this->lng->txt(
"change"));
 
 2215        $this->tpl->setVariable(
"TXT_TITLE", 
"Choose Sequencing Template");
 
 2217        $node_id = 
$_POST[
"node_id"];
 
 2218        $first_child = 
$_POST[
"first_child"];
 
 2223        if (!$first_child) {
 
 2227        $this->tpl->setVariable(
"VAL_NODE_ID", $node_id);
 
 2228        $this->tpl->setVariable(
"VAL_FIRST_CHILD", $first_child);
 
 2239        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2241        $slm_tree = 
new ilTree($this->object->getId());
 
 2242        $slm_tree->setTreeTablePK(
"slm_id");
 
 2243        $slm_tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 2245        $node_id = 
$_POST[
"node_id"];
 
 2247        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
 
 2248        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2249        include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
 
 2251        if (!
$_POST[
"first_child"]) {   
 
 2252            $parent_id = $slm_tree->getParentId($node_id);
 
 2255            $parent_id = $node_id;
 
 2261        $ilCtrl->setParameter($this, 
"highlight", 
$id);
 
 2262        $ilCtrl->redirect($this, 
"showOrganization", 
"node_" . $node_id);
 
 2283        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2287        $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.scormeditor_page_layout_chooser.html", 
"Modules/Scorm2004");
 
 2289        $this->tpl->setCurrentBlock(
"option_item");
 
 2292        foreach ($arr_templates as $templ) {
 
 2295            $templ->readObject();
 
 2296            $this->tpl->setVariable(
"VAL_LAYOUT_TITLE", $templ->getTitle());
 
 2297            $this->tpl->setVariable(
"VAL_LAYOUT_IMAGE", $templ->getPreview());
 
 2298            $this->tpl->setVariable(
"VAL_LAYOUT_ID", $templ->getId());
 
 2299            $this->tpl->setVariable(
"VAL_DISPLAY", 
"inline");
 
 2301                $this->tpl->setVariable(
"VAL_CHECKED", 
"checked");
 
 2303            if ($count % 4 == 0) {
 
 2304                $this->tpl->setVariable(
"END_ROW", 
"</tr>");
 
 2306            if ($count == 1 || ($count - 1) % 4 == 0) {
 
 2307                $this->tpl->setVariable(
"BEGIN_ROW", 
"<tr>");
 
 2309            $this->tpl->parseCurrentBlock();
 
 2313        if ($count % 4 != 0) {
 
 2314            $rest = 4 - ($count % 4);
 
 2320            $this->tpl->setVariable(
"VAL_DISPLAY", 
"none");
 
 2321            $this->tpl->setVariable(
"VAL_LAYOUT_ID", $templ->getId());
 
 2324                $this->tpl->setVariable(
"END_ROW", 
"</tr>");
 
 2326            $this->tpl->parseCurrentBlock();
 
 2336        $ilCtrl->saveParameter($this, 
"obj_id");
 
 2338        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 2340        $this->tpl->setVariable(
"BTN_NAME", 
"insertTemplate");
 
 2341        $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
 2342        $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"create"));
 
 2343        $this->tpl->setVariable(
"CMD_CANCEL", 
"showOrganization");
 
 2345        $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
 2346        $this->tpl->setVariable(
"TXT_INSERT", $this->lng->txt(
"insert"));
 
 2347        $this->tpl->setVariable(
"TXT_CHANGE", $this->lng->txt(
"change"));
 
 2348        if ($a_special_page) {
 
 2349            $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"sahs_choose_special_page"));
 
 2351            $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"sahs_choose_page_template"));
 
 2365        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2367        $slm_tree = 
new ilTree($this->object->getId());
 
 2368        $slm_tree->setTreeTablePK(
"slm_id");
 
 2369        $slm_tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 2372        $node_id = 
$_POST[
"node_id"];
 
 2373        $layout_id = 
$_POST[
"layout_id"];
 
 2376        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
 
 2377        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2379        if (!
$_POST[
"first_child"]) {   
 
 2380            $parent_id = $slm_tree->getParentId($node_id);
 
 2383            $parent_id = $node_id;
 
 2387        $page_ids = array();
 
 2388        for (
$i = 1; 
$i <= $num; 
$i++) {
 
 2390            $page->setTitle(
$lng->txt(
"sahs_new_page"));
 
 2391            $page->setSLMId($this->object->getId());
 
 2392            $page->create(
false, $layout_id);
 
 2394            $page_ids[] = $page->getId();
 
 2396        $page_ids = array_reverse($page_ids);
 
 2397        $page_ids = implode(
":", $page_ids);
 
 2400            if (
$_GET[
"obj_id"] != 
"") {
 
 2403                $ilCtrl->setParameter($this, 
"highlight", $page_ids);
 
 2404                $ilCtrl->redirect($this, 
"showOrganization", 
"node_" . $node_id);
 
 2414        $_GET[
"scexpand"] = 
"";
 
 2415        $mtree = $this->
object->getTree();
 
 2416        $n_id = (
$_GET[
"obj_id"] > 0)
 
 2418            : $mtree->readRootId();
 
 2419        $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
 
 2421        foreach ($stree as 
$n) {
 
 2422            $n_arr[] = 
$n[
"child"];
 
 2433        $_GET[
"scexpand"] = 
"";
 
 2434        $mtree = $this->
object->getTree();
 
 2435        $n_id = (
$_GET[
"obj_id"] > 0)
 
 2437            : $mtree->readRootId();
 
 2438        $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
 
 2440        foreach ($stree as 
$n) {
 
 2441            if (in_array(
$n[
"child"], $old) && 
$n[
"child"] != $n_id) {
 
 2442                $k = array_search(
$n[
"child"], $old);
 
 2457        if (is_array(
$_POST[
"title"])) {
 
 2458            include_once(
"./Services/MetaData/classes/class.ilMD.php");
 
 2459            include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
 
 2462                if (is_object($node_obj)) {
 
 2464                    $md = 
new ilMD($this->object->getId(), 
$id, $node_obj->getType());
 
 2465                    $md_gen = $md->getGeneral();
 
 2474            ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 2475            $ilCtrl->redirect($this, 
"showOrganization");
 
 2490        if (!isset(
$_POST[
"id"])) {
 
 2491            $ilErr->raiseError($this->lng->txt(
"no_checkbox"), 
$ilErr->MESSAGE);
 
 2497        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 2500        if ($a_form_action == 
"") {
 
 2501            $cmd = (
$_GET[
"backcmd"] == 
"")
 
 2502                ? 
"showOrganization" 
 2504            $this->ctrl->setParameter($this, 
"backcmd", $cmd);
 
 2505            $a_form_action = $this->ctrl->getFormAction($this);
 
 2507        $confirmation_gui->setFormAction($a_form_action);
 
 2508        $confirmation_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
 2511        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
 
 2515                $confirmation_gui->addItem(
 
 2518                    $node_obj->getTitle(),
 
 2524        $confirmation_gui->setCancel(
$lng->txt(
"cancel"), 
"cancelDelete");
 
 2525        $confirmation_gui->setConfirm(
$lng->txt(
"confirm"), 
"confirmedDelete");
 
 2527        $tpl->setContent($confirmation_gui->getHTML());
 
 2535        $this->ctrl->redirect($this, 
$_GET[
"backcmd"]);
 
 2546        $tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
 2547        $tree->setTreeTablePK(
"slm_id");
 
 2550        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
 
 2554                $node_data = 
$tree->getNodeData(
$id);
 
 2555                if (is_object($obj)) {
 
 2556                    $obj->setSLMId($this->object->getId());
 
 2566                    $tree->deleteTree($node_data);
 
 2578            $ilCtrl->redirect($this, 
"showOrganization");
 
 2589        $this->
object->executeDragDrop(
 
 2590            $_POST[
"il_hform_source_id"],
 
 2591            $_POST[
"il_hform_target_id"],
 
 2593            $_POST[
"il_hform_as_subitem"]
 
 2595        $ilCtrl->redirect($this, 
"showOrganization");
 
 2606        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2610        foreach ($items as $k => $item) {
 
 2615        foreach ($todel as $k) {
 
 2620            $ilCtrl->redirect($this, $a_return);
 
 2625        include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
 
 2629        $ilCtrl->redirect($this, $a_return);
 
 2635    public function cutItems($a_return = 
"showOrganization")
 
 2640        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2644        foreach ($items as $k => $item) {
 
 2649        foreach ($todel as $k) {
 
 2655            $ilCtrl->redirect($this, $a_return);
 
 2660        include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
 
 2665        $ilCtrl->redirect($this, $a_return);
 
 2676        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2694        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2712        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2730        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
 
 2752        include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
 
 2757            $pf .= 
'<input type="hidden" name="' . 
$f . 
'" value="' . $v . 
'" />';
 
 2759        if ($a_confirm && is_array(
$_POST[
"node"])) {
 
 2760            foreach (
$_POST[
"node"] as 
$f => $v) {
 
 2761                $pf .= 
'<input type="hidden" name="node[' . 
$f . 
']" value="' . $v . 
'" />';
 
 2769        include_once(
"./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
 
 2771        $tpl->setContent(
$form->getHTML() . $pf . 
"</form>");
 
 2773        $ilTabs->clearTargets();
 
 2774        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
 2776            if (
$form->isCorrect()) {
 
 2777                $ilToolbar->addFormButton(
$lng->txt(
"insert"), 
"performLMChapterInsert");
 
 2779            $ilToolbar->addFormButton(
$lng->txt(
"back"), 
"insertLMChapterClip");
 
 2781            $ilToolbar->addFormButton(
$lng->txt(
"check"), 
"confirmLMChapterInsert");
 
 2783        $ilToolbar->addFormButton(
$lng->txt(
"cancel"), 
"showOrganization");
 
 2784        $ilToolbar->setCloseFormTag(
false);
 
 2803        include_once(
"./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
 
 2805        $form->performInserts();
 
 2806        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 2807        $this->ctrl->redirect($this, 
"showOrganization");
 
 2813        $export->buildExportFile();
 
 2814        ilUtil::sendSuccess($this->lng->txt(
"exp_file_created"), 
true);
 
 2815        $this->ctrl->redirect($this, 
"showExportList");
 
 2821        $export->buildExportFile();
 
 2822        ilUtil::sendSuccess($this->lng->txt(
"exp_file_created"), 
true);
 
 2823        $this->ctrl->redirect($this, 
"showExportList");
 
 2829        $export->buildExportFile();
 
 2830        ilUtil::sendSuccess($this->lng->txt(
"exp_file_created"), 
true);
 
 2831        $this->ctrl->redirect($this, 
"showExportList");
 
 2837        $export->buildExportFile();
 
 2838        ilUtil::sendSuccess($this->lng->txt(
"exp_file_created"), 
true);
 
 2839        $this->ctrl->redirect($this, 
"showExportList");
 
 2845        $export->buildExportFile();
 
 2846        ilUtil::sendSuccess($this->lng->txt(
"exp_file_created"), 
true);
 
 2847        $this->ctrl->redirect($this, 
"showExportList");
 
 2855        if (!$export->buildExportFile()) {
 
 2856            if (!PATH_TO_MKISOFS) {
 
 2857                $ilErr->raiseError($this->lng->txt(
"no_mkisofs_configured"), 
$ilErr->MESSAGE);
 
 2860        $this->ctrl->redirect($this, 
"showExportList");
 
 2866        $export->buildExportFile();
 
 2867        $this->ctrl->redirect($this, 
"showExportList");
 
 2872        $export = 
new ilSCORM2004Export($this->
object);
 
 2874        $export_dir = $export->getExportDirectoryForType(
$_GET[
'type']);
 
 2883        if (!isset(
$_POST[
"file"])) {
 
 2885            $this->ctrl->redirect($this, 
"showExportList");
 
 2889        $export_files = $this->
object->getExportFiles();
 
 2891        include_once 
"./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
 
 2894        foreach ($export_files as $exp_file) {
 
 2895            foreach (
$_POST[
'file'] as $delete_file) {
 
 2896                if (strcmp($delete_file, $exp_file[
'file']) == 0) {
 
 2897                    $public_str = ($exp_file[
"file"] == $this->
object->getPublicExportFile($exp_file[
"type"]))
 
 2898                        ? 
" <b>(" . $this->lng->txt(
"public") . 
")<b>" 
 2900                    $file_arr = explode(
"__", $exp_file[
"file"]);
 
 2905        $table_gui->setData(
$data);
 
 2906        $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
 
 2915        $this->ctrl->redirect($this, 
"showExportList");
 
 2924        include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
 2925        $export = 
new ilSCORM2004Export($this->
object);
 
 2926        foreach (
$_POST[
'file'] as $idx => $file) {
 
 2927            $export_dir = $export->getExportDirectoryForType(
$_POST[
'type'][$idx]);
 
 2928            $exp_file = $export_dir . 
"/" . $file;
 
 2929            if (@is_file($exp_file)) {
 
 2933        ilUtil::sendSuccess($this->lng->txt(
'msg_deleted_export_files'), 
true);
 
 2934        $this->ctrl->redirect($this, 
"showExportList");
 
 2944        if (!isset(
$_POST[
"file"])) {
 
 2945            $ilErr->raiseError($this->lng->txt(
"no_checkbox"), 
$ilErr->MESSAGE);
 
 2947        if (count(
$_POST[
"file"]) > 1) {
 
 2948            $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"), 
$ilErr->MESSAGE);
 
 2951        $export = 
new ilSCORM2004Export($this->
object);
 
 2952        $file = 
$_POST[
'file'][0];
 
 2955        if ($this->object->getPublicExportFile(
$type) == $file) {
 
 2956            $this->
object->setPublicExportFile(
$type, 
"");
 
 2958            $this->
object->setPublicExportFile(
$type, $file);
 
 2960        $this->
object->update();
 
 2961        $this->ctrl->redirect($this, 
"showExportList");
 
 2972        $zipfile = $export->buildExportFile();
 
 2973        $zipPathinfo = pathinfo($zipfile);
 
 2974        $file_path = $this->
object->getDataDirectory() . 
"/" . ($zipPathinfo[
"basename"]);
 
 2975        copy($zipfile, $file_path);
 
 2982        include_once(
"./Modules/Scorm2004/classes/ilSCORM13Package.php");
 
 2984        $rte_pkg->il_import($this->object->getDataDirectory(), $this->object->getId(), 
$DIC[
"ilias"], 
false, 
true);
 
 2991        ilUtil::redirect(
"ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=" . $this->object->getRefID() . 
"&envEditor=1");
 
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
Confirmation screen class.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static setAction($a_action)
Select file for being added into file lists.
This class represents a non editable value in a property form.
setSettingsSubTabs()
set Tabs for settings
getTemplate()
output main header (title and locator)
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
insertTemplate($a_redirect=true)
Insert (multiple) pages at node.
initStylePropertiesForm()
Init style properties form.
initGlossaryCreationForm()
Init glossary creation form.
detachGlossary()
Detach glossary.
getEditTree()
Get editing tree object.
properties()
Scorm 2004 module properties.
saveGlossary()
Save glossary form.
saveSequencing()
Save sequencing.
confirmLMChapterInsert()
Confirm lm chapter insert.
getPropertiesEditableValues()
Get current values for properties (editable) from.
createStyle()
Create Style.
insertScenarioGUI()
Insert sequencing scenario at node.
proceedDragDrop()
Perform drag and drop action.
collapseAll($a_redirect=true)
Collapse all.
showOrganization( $a_top_node=0, $a_form_action="", $a_title="", $a_icon="", $a_gui_obj=null, $a_gui_cmd="")
Show subhiearchy of chapters, scos and pages.
frameset($a_to_organization=false)
output main frameset of media pool left frame: explorer tree of folders right frame: media pool conte...
initPropertiesEditableForm()
Init properties (editable) form.
insertLMChapterClip($a_confirm=false, $a_perform=false)
Insert chapter from clipboard.
insertPageClip()
Insert pages from clipboard.
getNotesHTML($a_mode="")
Get notes HTML.
showExportList()
Show Export List.
jumpToNode($a_anchor_node="", $a_highlight_ids="")
getTabs()
Adds tabs to tab gui object.
deleteNodes($a_form_action="")
confirm deletion screen of chapters/scos/pages
cancelDeleteExportFile()
cancel deletion of export files
insertScoClip()
Insert scos from clipboard.
insertSco($a_redirect=true)
Insert (multiple) scos at node.
confirmDeleteExportFile()
confirmation screen for export file deletion
insertAssetClip()
Insert assets from clipboard.
showSequencing()
Show Sequencing.
assignObject()
assign scorm object to scorm gui object
editStyleProperties()
Edit Stlye Properties.
insertChapterClip()
Insert chapter from clipboard.
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
editOrganization($a_to_organization=true)
Edit organization (called from listgui, must setup frameset)
assignGlossary()
Assign glossary.
selectGlossary()
Select glossary.
selectExport()
Select the export type of the SCORM 2004 module.
cancelDelete()
cancel delete
setSubTabs($a_main_tab="", $a_active="")
Set sub tabs.
showTrackingItems()
Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar.
copyItems($a_return="showOrganization")
Copy items to clipboard.
insertScenario()
Insert sequencing scenario at node.
confirmedDelete($a_redirect=true)
Delete chapters/scos/pages.
insertChapter($a_redirect=true)
Insert (multiple) chapters at node.
insertTemplateGUI($a_redirect=true, $a_special_page=false)
Displays GUI to select template for page.
insertAsset($a_redirect=true)
Insert (multiple) assets at node.
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
initPropertiesForm()
Initialize properties form.
showTree()
Show Editing Tree.
performLMChapterInsert()
Perform lm chapter insert.
expandAll($a_redirect=true)
Expand all.
activateExpertMode()
Activate expert mode.
insertSpecialPage($a_redirect=true)
Insert special page.
cutItems($a_return="showOrganization")
Copy items to clipboard, then cut them from the current tree.
executeCommand()
execute command
showTrackingItemsBySco()
show tracking data
saveStyleSettings()
Save style settings.
confirmExpertMode()
Confirm activation of expert mode.
createGlossary()
Create glossary.
deleteExportFile()
delete export files
insertPage($a_redirect=true)
Insert (multiple) pages at node.
deleteStyle()
Delete Style.
saveProperties()
save scorm 2004 module properties
showLearningObjectivesAlignment()
Show Learning Objectives Alignment.
Class ilObjSCORM2004LearningModule.
Class ilObjSCORMLearningModuleGUI.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
addHeaderAction()
Add header action menu.
getObjectService()
Get object service.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupType($a_id, $a_reference=false)
lookup object type
TableGUI class for learning objectives alignments.
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
This class represents an option in a radio group.
Class ilSCORM2004AssetGUI.
Class ilSCORM2004ChapterGUI.
Class ilSCORM2004Chapter.
SCORM editor explorer GUI class.
Class ilSCORM2004Condition.
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters or all scos)
static insertChapterClip($a_slm_obj, $a_as_sub=false)
Insert Chapter from clipboard.
static _lookupType($a_obj_id)
Lookup Type.
static insertAssetClip($a_slm_obj, $a_type="ass")
Insert assets from clipboard.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static clipboardCopy($a_slm_obj_id, $a_ids)
Copy a set of chapters/pages/scos into the clipboard.
static insertPageClip($a_slm_obj)
Insert pages from clipboard.
static insertScoClip($a_slm_obj)
Insert scos from clipboard.
static _writeTitle($a_obj_id, $a_title)
Write Title.
static clipboardCut($a_slm_obj_id, $a_ids)
Cut and copy a set of chapters/pages into the clipboard.
Class ilSCORM2004PageNodeGUI.
Class ilSCORM2004PageNode.
Class ilSCORM2004ChapterGUI.
Class ilSCORM2004Chapter.
static availableTemplates()
Class ilSCORM2004TrackingItemsPerScoFilterGUI.
Class ilSCORM2004TrackingItemsPerUserFilterGUI.
Class ilSCORM2004TrackingItemsTableGUI.
static checkIfAnyoneIsInOfflineMode($obj_id)
Export class for SCORM 2004 object.
static clear($a_var)
Unset a value.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static yn2tf($a_yn)
convert "y"/"n" to true/false
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
if(!array_key_exists('StateId', $_REQUEST)) $id
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list