ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjSCORM2004LearningModuleGUI Class Reference

Class ilObjSCORMLearningModuleGUI. More...

+ Inheritance diagram for ilObjSCORM2004LearningModuleGUI:
+ Collaboration diagram for ilObjSCORM2004LearningModuleGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 showEditTree ()
 Show tree. More...
 
 editOrganization ($a_to_organization=true)
 Edit organization (called from listgui, must setup frameset) More...
 
 frameset ($a_to_organization=false)
 output main frameset of media pool left frame: explorer tree of folders right frame: media pool content More...
 
 jumpToNode ($a_anchor_node="", $a_highlight_ids="")
 
 properties ()
 Scorm 2004 module properties. More...
 
 initPropertiesForm ()
 Initialize properties form. More...
 
 getPropertiesFormValues ()
 Get values for properties form. More...
 
 initPropertiesEditableForm ()
 Init properties (editable) form. More...
 
 getPropertiesEditableValues ()
 Get current values for properties (editable) from. More...
 
 saveProperties ()
 save scorm 2004 module properties More...
 
 detachGlossary ()
 Detach glossary. More...
 
 createGlossary ()
 Create glossary. More...
 
 initGlossaryCreationForm ()
 Init glossary creation form. More...
 
 saveGlossary ()
 Save glossary form. More...
 
 assignGlossary ()
 Assign glossary. More...
 
 selectGlossary ()
 Select glossary. More...
 
 assignObject ()
 assign scorm object to scorm gui object More...
 
 editStyleProperties ()
 Edit Stlye Properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyle ()
 Create Style. More...
 
 editStyle ()
 Edit Style. More...
 
 deleteStyle ()
 Delete Style. More...
 
 saveStyleSettings ()
 Save style settings. More...
 
 showTrackingItems ()
 Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar. More...
 
 showTree ()
 Show Editing Tree. More...
 
 showSequencing ()
 Show Sequencing. More...
 
 confirmExpertMode ()
 Confirm activation of expert mode. More...
 
 activateExpertMode ()
 Activate expert mode. More...
 
 saveSequencing ()
 Save sequencing. More...
 
 showLearningObjectivesAlignment ()
 Show Learning Objectives Alignment. More...
 
 selectLObjChapter ()
 
 selectExport ()
 Select the export type of the SCORM 2004 module. More...
 
 showExportList ()
 Show Export List. More...
 
 getTabs ()
 Adds tabs to tab gui object. More...
 
 setSubTabs ($a_main_tab="", $a_active="")
 Set sub tabs. More...
 
 getEditTree ()
 Get editing tree object. More...
 
 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. More...
 
 getNotesHTML ($a_mode="")
 Get notes HTML. More...
 
 insertChapter ($a_redirect=true)
 Insert (multiple) chapters at node. More...
 
 insertSco ($a_redirect=true)
 Insert (multiple) scos at node. More...
 
 insertAsset ($a_redirect=true)
 Insert (multiple) assets at node. More...
 
 insertPage ($a_redirect=true)
 Insert (multiple) pages at node. More...
 
 insertScenarioGUI ()
 Insert sequencing scenario at node. More...
 
 insertScenario ()
 Insert sequencing scenario at node. More...
 
 insertSpecialPage ($a_redirect=true)
 Insert special page. More...
 
 insertTemplateGUI ($a_redirect=true, $a_special_page=false)
 Displays GUI to select template for page. More...
 
 insertTemplate ($a_redirect=true)
 Insert (multiple) pages at node. More...
 
 expandAll ($a_redirect=true)
 Expand all. More...
 
 collapseAll ($a_redirect=true)
 Collapse all. More...
 
 saveAllTitles ($a_redirect=true)
 Save all titles of chapters/scos/pages. More...
 
 deleteNodes ($a_form_action="")
 confirm deletion screen of chapters/scos/pages More...
 
 cancelDelete ()
 cancel delete More...
 
 confirmedDelete ($a_redirect=true)
 Delete chapters/scos/pages. More...
 
 proceedDragDrop ()
 Perform drag and drop action. More...
 
 copyItems ($a_return="showOrganization")
 Copy items to clipboard. More...
 
 cutItems ($a_return="showOrganization")
 Copy items to clipboard, then cut them from the current tree. More...
 
 insertPageClip ()
 Insert pages from clipboard. More...
 
 insertScoClip ()
 Insert scos from clipboard. More...
 
 insertAssetClip ()
 Insert assets from clipboard. More...
 
 insertChapterClip ()
 Insert chapter from clipboard. More...
 
 insertLMChapterClip ($a_confirm=false, $a_perform=false)
 Insert chapter from clipboard. More...
 
 confirmLMChapterInsert ()
 Confirm lm chapter insert. More...
 
 performLMChapterInsert ()
 Perform lm chapter insert. More...
 
 exportScorm2004_4th ()
 
 exportScorm2004_3rd ()
 
 exportScorm12 ()
 
 exportHTML ()
 
 exportHTMLOne ()
 
 exportISO ()
 
 exportPDF ()
 
 downloadExportFile ()
 
 confirmDeleteExportFile ()
 confirmation screen for export file deletion More...
 
 cancelDeleteExportFile ()
 cancel deletion of export files More...
 
 deleteExportFile ()
 delete export files More...
 
 publishExportFile ()
 
 preview ()
 
- Public Member Functions inherited from ilObjSCORMLearningModuleGUI
 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor. More...
 
 assignObject ()
 assign scorm object to scorm gui object More...
 
 properties ()
 scorm module properties More...
 
 initPropertiesForm ()
 Init properties form. More...
 
 getPropertiesFormValues ()
 Get values for properties form. More...
 
 newModuleVersion ()
 upload new version of module More...
 
 getMaxFileSize ()
 
 newModuleVersionUpload ()
 
 saveProperties ()
 save properties More...
 
 showTrackingItems ()
 Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar. More...
 
 deleteTrackingForUser ()
 display deletion confirmation screen More...
 
 cancelDeleteTracking ()
 cancel deletion of export files More...
 
 confirmedDeleteTracking ()
 
 cancel ()
 overwrite..jump back to trackingdata not parent More...
 
 decreaseAttempts ()
 
 setSubTabs ()
 
 cancelStopUserOfflineMode ()
 
 confirmedStopUserOfflineMode ()
 
- Public Member Functions inherited from ilObjSAHSLearningModuleGUI
 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 properties ()
 module properties More...
 
 saveProperties ()
 save properties More...
 
 initCreationForms ($a_new_type)
 no manual SCORM creation, only import at the time More...
 
 initCreationForm ()
 Init form. More...
 
 initUploadForm ()
 Init upload form. More...
 
 uploadObject ()
 display status information or report errors messages in case of error More...
 
 upload ()
 
 saveObject ()
 save new learning module to db More...
 
 info ()
 permission form More...
 
 owner ()
 show owner of learning module More...
 
 getTemplate ()
 output main header (title and locator) More...
 
 setTabs ()
 output tabs More...
 
 certificate ()
 Shows the certificate editor. More...
 
 getTabs ()
 adds tabs to tab gui object More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 editContent ()
 List files. More...
 
 setSettingsSubTabs ()
 set Tabs for settings More...
 
 export ()
 
 exportModule ()
 
 getType ()
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 

Protected Member Functions

 showTrackingItemsBySco ()
 show tracking data More...
 
- Protected Member Functions inherited from ilObjSCORMLearningModuleGUI
 showTrackingItemsBySco ()
 show tracking data More...
 
 modifyTrackingItems ()
 
 applyUserTableFilter ()
 Apply table filter. More...
 
 resetUserTableFilter ()
 Reset table filter. More...
 
 import ()
 gui functions for GUI export More...
 
 importForm ()
 Show import form. More...
 
 initImportForm ($a_new_type)
 Init import form. More...
 
 exportAll ()
 Show export section for all users. More...
 
 exportSelectionUsers ()
 Export selection for selected users. More...
 
 showTrackingItem ()
 show tracking data of item More...
 
 showTrackingItemSco ()
 show tracking data of item More...
 
 showTrackingItemPerUser ()
 show tracking data of item per user More...
 
 offlineModeManager ()
 Manage offline mode for users @global ilTabs $ilTabs $global ilToolbar $ilToolbar. More...
 
 stopUserOfflineMode ()
 Stop offline mode for selected users. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $tabs
 
 $rbacsystem
 
 $help
 
 $error
 
 $tool_context
 
- Protected Attributes inherited from ilObjSCORMLearningModuleGUI
 $ctrl
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjSAHSLearningModuleGUI
static _goto ($a_target)
 goto target course More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjSCORMLearningModuleGUI
const EXPORT_UNDEF = 0
 
const EXPORT_ALL = 1
 
const EXPORT_SELECTED = 2
 
const EXPORT_TYPE_RAW = 1
 
const EXPORT_TYPE_SUCCESS = 2
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSCORM2004LearningModuleGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor.

@access public

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 57 of file class.ilObjSCORM2004LearningModuleGUI.php.

58 {
59 global $DIC;
60
61 $this->lng = $DIC->language();
62 $this->access = $DIC->access();
63 $this->ctrl = $DIC->ctrl();
64 $this->tpl = $DIC["tpl"];
65 $this->tabs = $DIC->tabs();
66 $this->rbacsystem = $DIC->rbac()->system();
67 $this->tree = $DIC->repositoryTree();
68 $this->toolbar = $DIC->toolbar();
69 $this->settings = $DIC->settings();
70 $this->help = $DIC["ilHelp"];
71 $this->error = $DIC["ilErr"];
72 $this->user = $DIC->user();
73 $this->tool_context = $DIC->globalScreen()->tool()->context();
74 $lng = $DIC->language();
75
76 $lng->loadLanguageModule("content");
77 $lng->loadLanguageModule("sahs");
78 $lng->loadLanguageModule("search");
79 $lng->loadLanguageModule("exp");
80 $this->type = "sahs";
81 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
82 #$this->tabs_gui = new ilTabsGUI();
83 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2
$DIC
Definition: xapitoken.php:46

References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), error(), help(), settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateExpertMode()

ilObjSCORM2004LearningModuleGUI::activateExpertMode ( )

Activate expert mode.

Parameters

return

Definition at line 1511 of file class.ilObjSCORM2004LearningModuleGUI.php.

1512 {
1514 $lng = $this->lng;
1515
1516 $this->object->setSequencingExpertMode(true);
1517 $this->object->update();
1518 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1519 $ilCtrl->redirect($this, "showSequencing");
1520 }
global $ilCtrl
Definition: ilias.php:18

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, and ilObjectGUI\$lng.

◆ assignGlossary()

ilObjSCORM2004LearningModuleGUI::assignGlossary ( )

Assign glossary.

Definition at line 997 of file class.ilObjSCORM2004LearningModuleGUI.php.

998 {
1002
1003 include_once("./Modules/Scorm2004/classes/class.ilGlossarySelectorGUI.php");
1004 $exp = new ilGlossarySelectorGUI(
1005 $ilCtrl->getLinkTarget($this, "selectGlossary"),
1006 "ilobjscorm2004learningmodulegui"
1007 );
1008 $exp->setSelectableTypes(array("glo"));
1009
1010 if ($_GET["expand"] == "") {
1011 $expanded = $tree->readRootId();
1012 } else {
1013 $expanded = $_GET["expand"];
1014 }
1015 $exp->setExpand($expanded);
1016
1017 $exp->setTargetGet("glo_id");
1018 //$this->ctrl->setParameter($this, "target_type", $a_type);
1019 //$ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
1020 $exp->setParamsGet($this->ctrl->getParameterArray($this, "assignGlossary"));
1021
1022 // filter
1023 $exp->setFiltered(true);
1024 $exp->setFilterMode(IL_FM_POSITIVE);
1025 $exp->addFilter("root");
1026 $exp->addFilter("cat");
1027 $exp->addFilter("grp");
1028 $exp->addFilter("fold");
1029 $exp->addFilter("crs");
1030 $exp->addFilter("glo");
1031
1032 $exp->setOutput(0);
1033
1034 $tpl->setContent($exp->getOutput());
1035 }
$_GET["client_id"]
const IL_FM_POSITIVE
Select file for being added into file lists.

References $_GET, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$tpl, ilObjectGUI\$tree, and IL_FM_POSITIVE.

◆ assignObject()

ilObjSCORM2004LearningModuleGUI::assignObject ( )

assign scorm object to scorm gui object

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 1052 of file class.ilObjSCORM2004LearningModuleGUI.php.

1053 {
1054 if ($this->id != 0) {
1055 if ($this->call_by_reference) {
1056 $this->object = new ilObjSCORM2004LearningModule($this->id, true);
1057 } else {
1058 $this->object = new ilObjSCORM2004LearningModule($this->id, false);
1059 }
1060 }
1061 }
Class ilObjSCORM2004LearningModule.

◆ cancelDelete()

ilObjSCORM2004LearningModuleGUI::cancelDelete ( )

cancel delete

Definition at line 2541 of file class.ilObjSCORM2004LearningModuleGUI.php.

2542 {
2543 $this->ctrl->redirect($this, $_GET["backcmd"]);
2544 }

References $_GET.

◆ cancelDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::cancelDeleteExportFile ( )

cancel deletion of export files

Definition at line 2920 of file class.ilObjSCORM2004LearningModuleGUI.php.

2921 {
2922 ilSession::clear("ilExportFiles");
2923 $this->ctrl->redirect($this, "showExportList");
2924 }
static clear($a_var)
Unset a value.

References ilSession\clear().

+ Here is the call graph for this function:

◆ collapseAll()

ilObjSCORM2004LearningModuleGUI::collapseAll (   $a_redirect = true)

Collapse all.

Definition at line 2439 of file class.ilObjSCORM2004LearningModuleGUI.php.

2440 {
2441 $_GET["scexpand"] = "";
2442 $mtree = $this->object->getTree();
2443 $n_id = ($_GET["obj_id"] > 0)
2444 ? $_GET["obj_id"]
2445 : $mtree->readRootId();
2446 $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2447 $old = $_SESSION["scexpand"];
2448 foreach ($stree as $n) {
2449 if (in_array($n["child"], $old) && $n["child"] != $n_id) {
2450 $k = array_search($n["child"], $old);
2451 unset($old[$k]);
2452 }
2453 }
2454 $_SESSION["scexpand"] = $old;
2455 $this->saveAllTitles($a_redirect);
2456 }
$n
Definition: RandomTest.php:85
$_SESSION["AccountId"]
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.

References $_GET, $_SESSION, $n, and saveAllTitles().

+ Here is the call graph for this function:

◆ confirmDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::confirmDeleteExportFile ( )

confirmation screen for export file deletion

Definition at line 2889 of file class.ilObjSCORM2004LearningModuleGUI.php.

2890 {
2891 if (!isset($_POST["file"])) {
2892 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
2893 $this->ctrl->redirect($this, "showExportList");
2894 }
2895
2896 ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
2897 $export_files = $this->object->getExportFiles();
2898
2899 include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
2900 $table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList', true);
2901 $data = array();
2902 foreach ($export_files as $exp_file) {
2903 foreach ($_POST['file'] as $delete_file) {
2904 if (strcmp($delete_file, $exp_file['file']) == 0) {
2905 $public_str = ($exp_file["file"] == $this->object->getPublicExportFile($exp_file["type"]))
2906 ? " <b>(" . $this->lng->txt("public") . ")<b>"
2907 : "";
2908 $file_arr = explode("__", $exp_file["file"]);
2909 array_push($data, array('file' => $exp_file['file'], 'date' => ilDatePresentation::formatDate(new ilDateTime($file_arr[0], IL_CAL_UNIX)), 'size' => $exp_file['size'], 'type' => $exp_file['type'] . $public_str));
2910 }
2911 }
2912 }
2913 $table_gui->setData($data);
2914 $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
2915 }
$_POST["username"]
const IL_CAL_UNIX
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 sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_POST, ilObjectGUI\$data, ilDatePresentation\formatDate(), IL_CAL_UNIX, ilUtil\sendInfo(), and ilUtil\sendQuestion().

+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSCORM2004LearningModuleGUI::confirmedDelete (   $a_redirect = true)

Delete chapters/scos/pages.

Definition at line 2549 of file class.ilObjSCORM2004LearningModuleGUI.php.

2550 {
2552
2553 $tree = new ilTree($this->object->getId());
2554 $tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2555 $tree->setTreeTablePK("slm_id");
2556
2557 // delete all selected objects
2558 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2559 foreach ($_POST["id"] as $id) {
2560 if ($id != IL_FIRST_NODE) {
2561 $obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2562 $node_data = $tree->getNodeData($id);
2563 if (is_object($obj)) {
2564 $obj->setSLMId($this->object->getId());
2565
2566 /*include_once("./Services/History/classes/class.ilHistory.php");
2567 ilHistory::_createEntry($this->object->getId(), "delete_".$obj->getType(),
2568 array(ilLMObject::_lookupTitle($id), $id),
2569 $this->object->getType());*/
2570
2571 $obj->delete();
2572 }
2573 if ($tree->isInTree($id)) {
2574 $tree->deleteTree($node_data);
2575 }
2576 }
2577 }
2578
2579 // check the tree
2580 // $this->object->checkTree();
2581
2582 // feedback
2583 ilUtil::sendInfo($this->lng->txt("info_deleted"), true);
2584
2585 if ($a_redirect) {
2586 $ilCtrl->redirect($this, "showOrganization");
2587 }
2588 }
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$tree, ilSCORM2004NodeFactory\getInstance(), IL_FIRST_NODE, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ confirmExpertMode()

ilObjSCORM2004LearningModuleGUI::confirmExpertMode ( )

Confirm activation of expert mode.

Definition at line 1486 of file class.ilObjSCORM2004LearningModuleGUI.php.

1487 {
1489 $tpl = $this->tpl;
1490 $lng = $this->lng;
1491 $ilTabs = $this->tabs;
1492
1493 $ilTabs->setTabActive("sahs_sequencing");
1494
1495 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1496 $cgui = new ilConfirmationGUI();
1497 $cgui->setFormAction($ilCtrl->getFormAction($this));
1498 $cgui->setHeaderText($lng->txt("sahs_activate_expert_mode_info"));
1499 $cgui->setCancel($lng->txt("cancel"), "showSequencing");
1500 $cgui->setConfirm($lng->txt("sahs_activate_expert_mode"), "activateExpertMode");
1501
1502 $tpl->setContent($cgui->getHTML());
1503 }
Confirmation screen class.

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $tabs, and ilObjectGUI\$tpl.

◆ confirmLMChapterInsert()

ilObjSCORM2004LearningModuleGUI::confirmLMChapterInsert ( )

Confirm lm chapter insert.

Definition at line 2798 of file class.ilObjSCORM2004LearningModuleGUI.php.

2799 {
2800 $this->insertLMChapterClip(true);
2801 }
insertLMChapterClip($a_confirm=false, $a_perform=false)
Insert chapter from clipboard.

References insertLMChapterClip().

+ Here is the call graph for this function:

◆ copyItems()

ilObjSCORM2004LearningModuleGUI::copyItems (   $a_return = "showOrganization")

Copy items to clipboard.

Definition at line 2609 of file class.ilObjSCORM2004LearningModuleGUI.php.

2610 {
2612 $lng = $this->lng;
2613
2614 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2615
2616 $items = ilUtil::stripSlashesArray($_POST["id"]);
2617 $todel = array(); // delete IDs < 0 (needed for non-js editing)
2618 foreach ($items as $k => $item) {
2619 if ($item < 0) {
2620 $todel[] = $k;
2621 }
2622 }
2623 foreach ($todel as $k) {
2624 unset($items[$k]);
2625 }
2626 if (!ilSCORM2004Node::uniqueTypesCheck($items)) {
2627 ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2628 $ilCtrl->redirect($this, $a_return);
2629 }
2630 ilSCORM2004Node::clipboardCopy($this->object->getId(), $items);
2631
2632 // @todo: move this to a service since it can be used here, too
2633 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2635 ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
2636
2637 $ilCtrl->redirect($this, $a_return);
2638 }
static setAction($a_action)
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters or all scos)
static clipboardCopy($a_slm_obj_id, $a_ids)
Copy a set of chapters/pages/scos into the clipboard.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilSCORM2004Node\clipboardCopy(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and ilSCORM2004Node\uniqueTypesCheck().

+ Here is the call graph for this function:

◆ createGlossary()

ilObjSCORM2004LearningModuleGUI::createGlossary ( )

Create glossary.

Definition at line 918 of file class.ilObjSCORM2004LearningModuleGUI.php.

919 {
921
923 $tpl->setContent($this->form->getHTML());
924 }

References ilObjectGUI\$tpl, and initGlossaryCreationForm().

+ Here is the call graph for this function:

◆ createStyle()

ilObjSCORM2004LearningModuleGUI::createStyle ( )

Create Style.

Definition at line 1161 of file class.ilObjSCORM2004LearningModuleGUI.php.

1162 {
1164
1165 $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1166 }

References ilObjSCORMLearningModuleGUI\$ctrl, and $ilCtrl.

◆ cutItems()

ilObjSCORM2004LearningModuleGUI::cutItems (   $a_return = "showOrganization")

Copy items to clipboard, then cut them from the current tree.

Definition at line 2643 of file class.ilObjSCORM2004LearningModuleGUI.php.

2644 {
2646 $lng = $this->lng;
2647
2648 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2649
2650 $items = ilUtil::stripSlashesArray($_POST["id"]);
2651 $todel = array(); // delete IDs < 0 (needed for non-js editing)
2652 foreach ($items as $k => $item) {
2653 if ($item < 0) {
2654 $todel[] = $k;
2655 }
2656 }
2657 foreach ($todel as $k) {
2658 unset($items[$k]);
2659 }
2660
2661 if (!ilSCORM2004Node::uniqueTypesCheck($items)) {
2662 ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2663 $ilCtrl->redirect($this, $a_return);
2664 }
2665
2666 ilSCORM2004Node::clipboardCut($this->object->getId(), $items);
2667
2668 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2670
2671 ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
2672
2673 $ilCtrl->redirect($this, $a_return);
2674 }
static clipboardCut($a_slm_obj_id, $a_ids)
Cut and copy a set of chapters/pages into the clipboard.

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilSCORM2004Node\clipboardCut(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and ilSCORM2004Node\uniqueTypesCheck().

+ Here is the call graph for this function:

◆ deleteExportFile()

ilObjSCORM2004LearningModuleGUI::deleteExportFile ( )

delete export files

Definition at line 2930 of file class.ilObjSCORM2004LearningModuleGUI.php.

2931 {
2932 include_once "./Services/Utilities/classes/class.ilUtil.php";
2933 $export = new ilSCORM2004Export($this->object);
2934 foreach ($_POST['file'] as $idx => $file) {
2935 $export_dir = $export->getExportDirectoryForType($_POST['type'][$idx]);
2936 $exp_file = $export_dir . "/" . $file;
2937 if (@is_file($exp_file)) {
2938 unlink($exp_file);
2939 }
2940 }
2941 ilUtil::sendSuccess($this->lng->txt('msg_deleted_export_files'), true);
2942 $this->ctrl->redirect($this, "showExportList");
2943 }

References $_POST.

◆ deleteNodes()

ilObjSCORM2004LearningModuleGUI::deleteNodes (   $a_form_action = "")

confirm deletion screen of chapters/scos/pages

Parameters
stringform action

Definition at line 2492 of file class.ilObjSCORM2004LearningModuleGUI.php.

2493 {
2494 $lng = $this->lng;
2495 $tpl = $this->tpl;
2497
2498 if (!isset($_POST["id"])) {
2499 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
2500 }
2501
2502 // SAVE POST VALUES
2503 $_SESSION["saved_post"] = $_POST["id"];
2504
2505 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2506 $confirmation_gui = new ilConfirmationGUI();
2507
2508 if ($a_form_action == "") {
2509 $cmd = ($_GET["backcmd"] == "")
2510 ? "showOrganization"
2511 : $_GET["backcmd"];
2512 $this->ctrl->setParameter($this, "backcmd", $cmd);
2513 $a_form_action = $this->ctrl->getFormAction($this);
2514 }
2515 $confirmation_gui->setFormAction($a_form_action);
2516 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
2517
2518 // Add items to delete
2519 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2520 foreach ($_POST["id"] as $id) {
2521 if ($id != IL_FIRST_NODE) {
2522 $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2523 $confirmation_gui->addItem(
2524 "id[]",
2525 $node_obj->getId(),
2526 $node_obj->getTitle(),
2527 ilUtil::getImagePath("icon_" . $node_obj->getType() . ".svg")
2528 );
2529 }
2530 }
2531
2532 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
2533 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
2534
2535 $tpl->setContent($confirmation_gui->getHTML());
2536 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_GET, $_POST, $_SESSION, $error, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilUtil\getImagePath(), ilSCORM2004NodeFactory\getInstance(), and IL_FIRST_NODE.

+ Here is the call graph for this function:

◆ deleteStyle()

ilObjSCORM2004LearningModuleGUI::deleteStyle ( )

Delete Style.

Definition at line 1181 of file class.ilObjSCORM2004LearningModuleGUI.php.

1182 {
1184
1185 $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1186 }

References ilObjSCORMLearningModuleGUI\$ctrl, and $ilCtrl.

◆ detachGlossary()

ilObjSCORM2004LearningModuleGUI::detachGlossary ( )

Detach glossary.

Definition at line 906 of file class.ilObjSCORM2004LearningModuleGUI.php.

907 {
909
910 $this->object->setAssignedGlossary(0);
911 $this->object->update();
912 $ilCtrl->redirect($this, "properties");
913 }

References ilObjSCORMLearningModuleGUI\$ctrl, and $ilCtrl.

◆ downloadExportFile()

ilObjSCORM2004LearningModuleGUI::downloadExportFile ( )

Definition at line 2878 of file class.ilObjSCORM2004LearningModuleGUI.php.

2879 {
2880 $export = new ilSCORM2004Export($this->object);
2881
2882 $export_dir = $export->getExportDirectoryForType($_GET['type']);
2883 ilUtil::deliverFile($export_dir . "/" . $_GET['file'], $_GET['file']);
2884 }
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.

References $_GET, and ilUtil\deliverFile().

+ Here is the call graph for this function:

◆ editOrganization()

ilObjSCORM2004LearningModuleGUI::editOrganization (   $a_to_organization = true)

Edit organization (called from listgui, must setup frameset)

Parameters

return

Definition at line 181 of file class.ilObjSCORM2004LearningModuleGUI.php.

182 {
183 if ($_GET["obj_id"] > 0) {
184 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
186 }
187 if (in_array($type, array("sco", "chap", "seqc", "page"))) {
188 $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
189 $this->ctrl->redirect($this, "jumpToNode");
190 } else {
191 if ($a_to_organization) {
192 $this->ctrl->redirect($this, "showOrganization");
193 } else {
194 $this->ctrl->redirect($this, "properties");
195 }
196 }
197 }
static _lookupType($a_obj_id)
Lookup Type.
$type

References $_GET, $type, and ilSCORM2004Node\_lookupType().

+ Here is the call graph for this function:

◆ editStyle()

ilObjSCORM2004LearningModuleGUI::editStyle ( )

Edit Style.

Definition at line 1171 of file class.ilObjSCORM2004LearningModuleGUI.php.

1172 {
1174
1175 $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1176 }

References ilObjSCORMLearningModuleGUI\$ctrl, and $ilCtrl.

◆ editStyleProperties()

ilObjSCORM2004LearningModuleGUI::editStyleProperties ( )

Edit Stlye Properties.

Definition at line 1066 of file class.ilObjSCORM2004LearningModuleGUI.php.

1067 {
1068 $tpl = $this->tpl;
1069
1070 $this->initStylePropertiesForm();
1071 $tpl->setContent($this->form->getHTML());
1072 }

References ilObjectGUI\$tpl, and initStylePropertiesForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjSCORM2004LearningModuleGUI::executeCommand ( )

execute command

Reimplemented from ilObjSAHSLearningModuleGUI.

Definition at line 88 of file class.ilObjSCORM2004LearningModuleGUI.php.

89 {
90 $ilAccess = $this->access;
93 $ilTabs = $this->tabs;
95
96 $next_class = $ilCtrl->getNextClass($this);
97 $cmd = $ilCtrl->getCmd();
98
99 if ($this->object->getEditable() && $cmd != "showEditTree") { // show editing frameset
100 $this->showEditTree();
101 }
102
103 // update expander
104 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
105 $form_gui = new ilSCORM2004OrganizationHFormGUI();
106 $form_gui->setTree($this->getEditTree());
107 $form_gui->updateExpanded();
108 switch ($next_class) {
109 // notes
110 case "ilnotegui":
111 $this->getTemplate();
112 $this->setLocator();
113 $this->setTabs();
114 switch ($_GET["notes_mode"]) {
115 default:
116 $ilTabs->setTabActive("sahs_organization");
117 return $this->showOrganization();
118 }
119 break;
120
121 // chapters
122 case "ilscorm2004chaptergui":
123 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004ChapterGUI.php");
124 $chap_gui = new ilSCORM2004ChapterGUI($this->object, $_GET["obj_id"]);
125 $chap_gui->setParentGUI($this);
126 return $ilCtrl->forwardCommand($chap_gui);
127
128 // sequencing chapters
129 case "ilscorm2004seqchaptergui":
130 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004SeqChapterGUI.php");
131 $chap_gui = new ilSCORM2004SeqChapterGUI($this->object, $_GET["obj_id"]);
132 $chap_gui->setParentGUI($this);
133 return $ilCtrl->forwardCommand($chap_gui);
134
135 // scos
136 case "ilscorm2004scogui":
137 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
138 $sco_gui = new ilSCORM2004ScoGUI($this->object, $_GET["obj_id"]);
139 $sco_gui->setParentGUI($this);
140 return $ilCtrl->forwardCommand($sco_gui);
141
142 // assets
143 case "ilscorm2004assetgui":
144 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004AssetGUI.php");
145 $ass_gui = new ilSCORM2004AssetGUI($this->object, $_GET["obj_id"]);
146 $ass_gui->setParentGUI($this);
147 return $ilCtrl->forwardCommand($ass_gui);
148
149 // pages
150 case "ilscorm2004pagenodegui":
151 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNodeGUI.php");
152 $page_gui = new ilSCORM2004PageNodeGUI($this->object, $_GET["obj_id"]);
153 $page_gui->setParentGUI($this);
154 $ilCtrl->forwardCommand($page_gui);
155 break;
156
157 default:
158 parent::executeCommand();
159 $this->addHeaderAction();
160 break;
161 }
162 }
getTemplate()
output main header (title and locator)
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.
addHeaderAction()
Add header action menu.
setLocator()
set Locator
Class ilSCORM2004AssetGUI.
Class ilSCORM2004ChapterGUI.
This class allows quick editing of a chapter/sco/page hierarchy.
Class ilSCORM2004PageNodeGUI.
Class ilSCORM2004ScoGUI.

References $_GET, ilObjectGUI\$access, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObjectGUI\addHeaderAction(), getEditTree(), ilObjSAHSLearningModuleGUI\getTemplate(), ilObjectGUI\setLocator(), ilObjSAHSLearningModuleGUI\setTabs(), showEditTree(), and showOrganization().

+ Here is the call graph for this function:

◆ expandAll()

ilObjSCORM2004LearningModuleGUI::expandAll (   $a_redirect = true)

Expand all.

Definition at line 2420 of file class.ilObjSCORM2004LearningModuleGUI.php.

2421 {
2422 $_GET["scexpand"] = "";
2423 $mtree = $this->object->getTree();
2424 $n_id = ($_GET["obj_id"] > 0)
2425 ? $_GET["obj_id"]
2426 : $mtree->readRootId();
2427 $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2428 $n_arr = array();
2429 foreach ($stree as $n) {
2430 $n_arr[] = $n["child"];
2431 $_SESSION["scexpand"] = $n_arr;
2432 }
2433 $this->saveAllTitles($a_redirect);
2434 }

References $_GET, $_SESSION, $n, and saveAllTitles().

+ Here is the call graph for this function:

◆ exportHTML()

ilObjSCORM2004LearningModuleGUI::exportHTML ( )

Definition at line 2842 of file class.ilObjSCORM2004LearningModuleGUI.php.

2843 {
2844 $export = new ilScorm2004Export($this->object, 'HTML');
2845 $export->buildExportFile();
2846 ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2847 $this->ctrl->redirect($this, "showExportList");
2848 }
Export class for SCORM 2004 object.

◆ exportHTMLOne()

ilObjSCORM2004LearningModuleGUI::exportHTMLOne ( )

Definition at line 2850 of file class.ilObjSCORM2004LearningModuleGUI.php.

2851 {
2852 $export = new ilScorm2004Export($this->object, 'HTMLOne');
2853 $export->buildExportFile();
2854 ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2855 $this->ctrl->redirect($this, "showExportList");
2856 }

◆ exportISO()

ilObjSCORM2004LearningModuleGUI::exportISO ( )

Definition at line 2858 of file class.ilObjSCORM2004LearningModuleGUI.php.

2859 {
2861
2862 $export = new ilScorm2004Export($this->object, 'ISO');
2863 if (!$export->buildExportFile()) {
2864 if (!PATH_TO_MKISOFS) {
2865 $ilErr->raiseError($this->lng->txt("no_mkisofs_configured"), $ilErr->MESSAGE);
2866 }
2867 }
2868 $this->ctrl->redirect($this, "showExportList");
2869 }

References $error, and ilObjectGUI\$ilErr.

◆ exportPDF()

ilObjSCORM2004LearningModuleGUI::exportPDF ( )

Definition at line 2871 of file class.ilObjSCORM2004LearningModuleGUI.php.

2872 {
2873 $export = new ilScorm2004Export($this->object, 'PDF');
2874 $export->buildExportFile();
2875 $this->ctrl->redirect($this, "showExportList");
2876 }

◆ exportScorm12()

ilObjSCORM2004LearningModuleGUI::exportScorm12 ( )

Definition at line 2834 of file class.ilObjSCORM2004LearningModuleGUI.php.

2835 {
2836 $export = new ilScorm2004Export($this->object, 'SCORM 1.2');
2837 $export->buildExportFile();
2838 ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2839 $this->ctrl->redirect($this, "showExportList");
2840 }

◆ exportScorm2004_3rd()

ilObjSCORM2004LearningModuleGUI::exportScorm2004_3rd ( )

Definition at line 2826 of file class.ilObjSCORM2004LearningModuleGUI.php.

2827 {
2828 $export = new ilScorm2004Export($this->object, 'SCORM 2004 3rd');
2829 $export->buildExportFile();
2830 ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2831 $this->ctrl->redirect($this, "showExportList");
2832 }

◆ exportScorm2004_4th()

ilObjSCORM2004LearningModuleGUI::exportScorm2004_4th ( )

Definition at line 2818 of file class.ilObjSCORM2004LearningModuleGUI.php.

2819 {
2820 $export = new ilScorm2004Export($this->object, 'SCORM 2004 4th');
2821 $export->buildExportFile();
2822 ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2823 $this->ctrl->redirect($this, "showExportList");
2824 }

◆ frameset()

ilObjSCORM2004LearningModuleGUI::frameset (   $a_to_organization = false)

output main frameset of media pool left frame: explorer tree of folders right frame: media pool content

Definition at line 205 of file class.ilObjSCORM2004LearningModuleGUI.php.

206 {
207 if ($this->object->getEditable()) { // show editing frameset
208 $this->ctrl->redirect($this, "properties");
209 } else { // otherwise show standard frameset
210 $this->tpl = new ilGlobalTemplate("tpl.sahs_edit_frameset.html", false, false, "Modules/ScormAicc");
211 $this->tpl->setVariable(
212 "SRC",
213 $this->ctrl->getLinkTarget($this, "properties")
214 );
215 $this->tpl->printToStdout("DEFAULT", false);
216 }
217 exit;
218 }
special template class to simplify handling of ITX/PEAR
exit
Definition: login.php:29

References exit.

◆ getEditTree()

ilObjSCORM2004LearningModuleGUI::getEditTree ( )

Get editing tree object.

Definition at line 1860 of file class.ilObjSCORM2004LearningModuleGUI.php.

1861 {
1862 $slm_tree = new ilTree($this->object->getId());
1863 $slm_tree->setTreeTablePK("slm_id");
1864 $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1865 return $slm_tree;
1866 }

Referenced by executeCommand(), showLearningObjectivesAlignment(), and showOrganization().

+ Here is the caller graph for this function:

◆ getNotesHTML()

ilObjSCORM2004LearningModuleGUI::getNotesHTML (   $a_mode = "")

Get notes HTML.

Definition at line 1940 of file class.ilObjSCORM2004LearningModuleGUI.php.

1941 {
1943 $ilAccess = $this->access;
1945
1946 // notes
1947 $ilCtrl->setParameter($this, "nodes_mode", $a_mode);
1948 include_once("Services/Notes/classes/class.ilNoteGUI.php");
1949 $node_id = $_GET["obj_id"];
1950 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1951 $node_type = ($node_id > 0)
1953 : "sahs";
1954
1955 $notes_gui = new ilNoteGUI(
1956 $this->object->getId(),
1957 (int) $node_id,
1958 $node_type
1959 );
1960 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]) && $ilSetting->get("comments_del_tutor", 1)) {
1961 $notes_gui->enablePublicNotesDeletion(true);
1962 }
1963 $notes_gui->enablePrivateNotes();
1964 $notes_gui->enablePublicNotes();
1965
1966 $next_class = $ilCtrl->getNextClass($this);
1967 if ($next_class == "ilnotegui") {
1968 $html = $this->ctrl->forwardCommand($notes_gui);
1969 } else {
1970 $html = $notes_gui->getNotesHTML();
1971 }
1972 return $html;
1973 }
Notes GUI class.
global $ilSetting
Definition: privfeed.php:17

References $_GET, ilObjectGUI\$access, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$settings, and ilSCORM2004Node\_lookupType().

Referenced by showOrganization().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPropertiesEditableValues()

ilObjSCORM2004LearningModuleGUI::getPropertiesEditableValues ( )

Get current values for properties (editable) from.

Definition at line 786 of file class.ilObjSCORM2004LearningModuleGUI.php.

787 {
788 $values = array();
789
790 if (ilObject::_lookupType($this->object->getAssignedGlossary()) == "glo") {
791 $values["glossary"] = ilObject::_lookupTitle($this->object->getAssignedGlossary());
792 } else {
793 $values["glossary"] = $this->lng->txt("cont_no_glossary");
794 }
795 $values["q_tries"] = $this->object->getTries();
796 $values["localization"] = $this->object->getLocalization();
797 $values["style_id"] = $this->object->getStyleSheetId();
798
799 $this->form->setValuesByArray($values);
800 }
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilObject\_lookupTitle(), and ilObject\_lookupType().

Referenced by properties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPropertiesFormValues()

ilObjSCORM2004LearningModuleGUI::getPropertiesFormValues ( )

Get values for properties form.

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 657 of file class.ilObjSCORM2004LearningModuleGUI.php.

658 {
659 $values = array();
660 $values["Fobject_title"] = $this->object->getTitle();
661 $values["Fobject_description"] = $this->object->getDescription();
662 if (!$this->object->getOfflineStatus()) {
663 $values["cobj_online"] = true;
664 }
665 $values["cobj_offline_mode"] = $this->object->getOfflineMode();
666 $values["open_mode"] = $this->object->getOpenMode();
667 $values["width_0"] = $this->object->getWidth();
668 $values["width_1"] = $this->object->getWidth();
669 $values["height_0"] = $this->object->getHeight();
670 $values["height_1"] = $this->object->getHeight();
671 $values["cobj_ie_force_render"] = $this->object->getIe_force_render();
672 $values["cobj_nomenu"] = $this->object->getNoMenu();
673 $values["cobj_hidenavig"] = $this->object->getHideNavig();
674 $values["cobj_auto_last_visited"] = $this->object->getAuto_last_visited();
675 $values["lesson_mode"] = $this->object->getDefaultLessonMode();
676 $values["credit_mode"] = $this->object->getCreditMode();
677 $values["auto_review"] = $this->object->getAutoReviewChar();
678 $values["mastery_score"] = $this->object->getMasteryScore();
679 $values["cobj_session"] = $this->object->getSession();
680 $values["cobj_fourth_edition"] = $this->object->getFourth_edition();
681 $values["cobj_sequencing"] = $this->object->getSequencing();
682 $values["cobj_interactions"] = $this->object->getInteractions();
683 $values["cobj_objectives"] = $this->object->getObjectives();
684 $values["cobj_comments"] = $this->object->getComments();
685 $values["cobj_time_from_lms"] = $this->object->getTime_from_lms();
686 $values["cobj_check_values"] = $this->object->getCheck_values();
687 $values["cobj_auto_suspend"] = $this->object->getAutoSuspend();
688 $values["id_setting"] = $this->object->getIdSetting();
689 $values["name_setting"] = $this->object->getNameSetting();
690 $values["cobj_debug"] = $this->object->getDebug();
691 $this->form->setValuesByArray($values);
692 }

Referenced by properties().

+ Here is the caller graph for this function:

◆ getTabs()

ilObjSCORM2004LearningModuleGUI::getTabs ( )

Adds tabs to tab gui object.

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjSAHSLearningModuleGUI.

Definition at line 1710 of file class.ilObjSCORM2004LearningModuleGUI.php.

1711 {
1712 $ilAccess = $this->access;
1713 $ilHelp = $this->help;
1714
1715 if ($this->ctrl->getCmd() == "delete") {
1716 return;
1717 }
1718
1719 if (!$this->object->getEditable()) {
1720 return parent::getTabs();
1721 }
1722
1723 $ilHelp->setScreenIdComponent("sahsed");
1724
1725 // organization
1726 $this->tabs_gui->addTarget(
1727 "sahs_organization",
1728 $this->ctrl->getLinkTarget($this, "showOrganization"),
1729 "showOrganization",
1730 get_class($this)
1731 );
1732
1733 // info screen
1734 $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui")
1735 ? true
1736 : false;
1737 $this->tabs_gui->addTarget(
1738 "info_short",
1739 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
1740 "",
1741 "ilinfoscreengui",
1742 "",
1743 $force_active
1744 );
1745
1746 // settings
1747 $this->tabs_gui->addTarget(
1748 "settings",
1749 $this->ctrl->getLinkTarget($this, "properties"),
1750 "properties",
1751 get_class($this)
1752 );
1753
1754 // tracking data
1755 /* Later, only if tracking data exists
1756 $tabs_gui->addTarget("cont_tracking_data",
1757 $this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems",
1758 get_class($this));
1759 */
1760
1761 // objective alignment
1762 $this->tabs_gui->addTarget(
1763 "sahs_objectives_alignment",
1764 $this->ctrl->getLinkTarget($this, "showLearningObjectivesAlignment"),
1765 "showLearningObjectivesAlignment",
1766 get_class($this)
1767 );
1768
1769 // sequencing
1770 $this->tabs_gui->addTarget(
1771 "sahs_sequencing",
1772 $this->ctrl->getLinkTarget($this, "showSequencing"),
1773 "showSequencing",
1774 get_class($this)
1775 );
1776
1777 // learning progress
1778 /* Later, only if tracking data exists
1779 include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
1780 if(ilObjUserTracking::_enabledLearningProgress())
1781 {
1782 $tabs_gui->addTarget('learning_progress',
1783 $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''),
1784 '',
1785 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
1786 }
1787 */
1788
1789 // edit meta
1790 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
1791 $mdgui = new ilObjectMetaDataGUI($this->object);
1792 $mdtab = $mdgui->getTab();
1793 if ($mdtab) {
1794 $this->tabs_gui->addTarget(
1795 "meta_data",
1796 $mdtab,
1797 "",
1798 "ilmdeditorgui"
1799 );
1800 }
1801
1802 // export
1803 $this->tabs_gui->addTarget(
1804 "export",
1805 $this->ctrl->getLinkTarget($this, "showExportList"),
1806 array("showExportList", 'confirmDeleteExportFile'),
1807 get_class($this)
1808 );
1809
1810 // perm
1811 if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
1812 $this->tabs_gui->addTarget(
1813 "perm_settings",
1814 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1815 array("perm","info","owner"),
1816 'ilpermissiongui'
1817 );
1818 }
1819
1820 if ($this->object->editable == 1) {
1821 // preview
1822 $this->tabs_gui->addNonTabbedLink(
1823 "preview",
1824 $this->lng->txt("cont_sc_preview"),
1825 $this->ctrl->getLinkTarget($this, "preview"),
1826 "_blank"
1827 );
1828 }
1829 }
Class ilObjectMetaDataGUI.

References ilObjectGUI\$access, and $help.

◆ initGlossaryCreationForm()

ilObjSCORM2004LearningModuleGUI::initGlossaryCreationForm ( )

Init glossary creation form.

Definition at line 929 of file class.ilObjSCORM2004LearningModuleGUI.php.

930 {
933
934 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
935 $this->form = new ilPropertyFormGUI();
936
937 // title
938 $ti = new ilTextInputGUI($lng->txt("title"), "title");
939 $ti->setRequired(true);
940 $this->form->addItem($ti);
941
942 // description
943 $ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
944 $this->form->addItem($ta);
945
946 $this->form->addCommandButton("saveGlossary", $lng->txt("save"));
947 $this->form->addCommandButton("properties", $lng->txt("cancel"));
948
949 $this->form->setTitle($lng->txt("cont_glo_create"));
950 $this->form->setFormAction($ilCtrl->getFormAction($this));
951 }
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, and ilObjectGUI\$lng.

Referenced by createGlossary(), and saveGlossary().

+ Here is the caller graph for this function:

◆ initPropertiesEditableForm()

ilObjSCORM2004LearningModuleGUI::initPropertiesEditableForm ( )

Init properties (editable) form.

Definition at line 697 of file class.ilObjSCORM2004LearningModuleGUI.php.

698 {
702
703 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
704 $this->form = new ilPropertyFormGUI();
705
706 // localization
707 $options = array(
708 "" => $lng->txt("please_select"),
709 );
710 $langs = $lng->getInstalledLanguages();
711 $lng->loadLanguageModule("meta");
712 foreach ($langs as $l) {
713 $options[$l] = $lng->txt("meta_l_" . $l);
714 }
715 $loc = new ilSelectInputGUI($this->lng->txt("cont_localization"), "localization");
716 $loc->setOptions($options);
717 $loc->setInfo($this->lng->txt("cont_localization_info"));
718 $this->form->addItem($loc);
719
720 // glossary
721 $ne = new ilNonEditableValueGUI($lng->txt("obj_glo"), "glossary");
722 $ne->setInfo($lng->txt("sahs_glo_info"));
723 $this->form->addItem($ne);
724
725 // style
726 $lng->loadLanguageModule("style");
727 $fixed_style = $ilSetting->get("fixed_content_style_id");
728 $style_id = $this->object->getStyleSheetId();
729
730 if ($fixed_style > 0) {
731 $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
732 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
733 $this->lng->txt("global_fixed") . ")");
734 $this->form->addItem($st);
735 } else {
737 true,
738 false,
739 $_GET["ref_id"]
740 );
741
742 $st_styles[0] = $this->lng->txt("default");
743 ksort($st_styles);
744
745 if ($style_id > 0) {
746 // individual style
747 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
748 $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
749 $st->setValue(ilObject::_lookupTitle($style_id));
750 $this->form->addItem($st);
751 }
752 }
753
754 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
755 $style_sel = ilUtil::formSelect(
756 $style_id,
757 "style_id",
758 $st_styles,
759 false,
760 true
761 );
762 $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
763 $style_sel->setOptions($st_styles);
764 $style_sel->setValue($style_id);
765 $this->form->addItem($style_sel);
766 }
767 }
768
769 // number of tries
770 $ni = new ilNumberInputGUI($lng->txt("cont_qtries"), "q_tries");
771 $ni->setInfo($lng->txt("cont_qtries_info")); // #15133
772 $ni->setMaxLength(3);
773 $ni->setSize(3);
774 $this->form->addItem($ni);
775
776
777 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
778
779 $this->form->setTitle($lng->txt("cont_scorm_ed_properties"));
780 $this->form->setFormAction($ilCtrl->getFormAction($this));
781 }
This class represents a non editable value in a property form.
This class represents a number property in a property form.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
This class represents a selection list property in a property form.
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.

References $_GET, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), and ilUtil\formSelect().

Referenced by properties(), and saveProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPropertiesForm()

ilObjSCORM2004LearningModuleGUI::initPropertiesForm ( )

Initialize properties form.

Parameters

return

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 359 of file class.ilObjSCORM2004LearningModuleGUI.php.

360 {
363 $obj_service = $this->getObjectService();
364
365 $this->object->checkMasteryScoreValues();
366
367 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
368 $this->form = new ilPropertyFormGUI();
369 $this->form->setFormAction($ilCtrl->getFormAction($this));
370 $this->form->setTitle($this->lng->txt("cont_lm_properties"));
371
372 //title
373 $ti = new ilTextInputGUI($this->lng->txt("title"), "Fobject_title");
374 $ti->setMaxLength(200);
375 $this->form->addItem($ti);
376
377 //description
378 $ti = new ilTextAreaInputGUI($this->lng->txt("description"), "Fobject_description");
379 $this->form->addItem($ti);
380
381 // SCORM-type
382 $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
383 $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
384 $this->form->addItem($ne);
385
386 // version
387 $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
388 $ne->setValue($this->object->getModuleVersion());
389 $ne->setInfo($this->lng->txt("cont_sc_version_info"));
390 $this->form->addItem($ne);
391
392 //
393 // activation
394 //
395 $sh = new ilFormSectionHeaderGUI();
396 $sh->setTitle($this->lng->txt("activation"));
397 $this->form->addItem($sh);
398
399 // online
400 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
401 $cb->setInfo($this->lng->txt("cont_online_info"));
402 $this->form->addItem($cb);
403
404 // offline Mode
405 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
406 $cb->setValue("y");
407 include_once("./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
408 if ($this->object->getOfflineMode() == true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
409 $cb->setDisabled(true);
410 $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
411 } else {
412 $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
413 }
414 $this->form->addItem($cb);
415
416 //
417 // presentation
418 //
419 $sh = new ilFormSectionHeaderGUI();
420 $sh->setTitle($this->lng->txt("cont_presentation"));
421 $this->form->addItem($sh);
422
423 // display mode (open)
424 // $options = array(
425 // "0" => $this->lng->txt("cont_open_normal"),
426 // "1" => $this->lng->txt("cont_open_iframe_max"),
427 // "2" => $this->lng->txt("cont_open_iframe_defined"),
428 // "5" => $this->lng->txt("cont_open_window_undefined"),
429 // "6" => $this->lng->txt("cont_open_window_defined")
430 // );
431 // $si = new ilSelectInputGUI($this->lng->txt("cont_open"), "open_mode");
432 // $si->setOptions($options);
433 // $si->setValue($this->object->getOpenMode());
434 // $this->form->addItem($si);
435
436 $radg = new ilRadioGroupInputGUI($lng->txt("cont_open"), "open_mode");
437 $op0 = new ilRadioOption($this->lng->txt("cont_open_normal"), "0");
438 $radg->addOption($op0);
439 $op1 = new ilRadioOption($this->lng->txt("cont_open_iframe"), "1");
440 $radg->addOption($op1);
441 $op2 = new ilRadioOption($this->lng->txt("cont_open_window"), "5");
442 $radg->addOption($op2);
443 // width
444 $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_0");
445 $ni->setMaxLength(4);
446 $ni->setSize(4);
447 $op1->addSubItem($ni);
448 $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_1");
449 $ni->setMaxLength(4);
450 $ni->setSize(4);
451 $op2->addSubItem($ni);
452 // height
453 $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_0");
454 $ni->setMaxLength(4);
455 $ni->setSize(4);
456 $ni->setInfo($this->lng->txt("cont_width_height_info"));
457 $op1->addSubItem($ni);
458 $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_1");
459 $ni->setMaxLength(4);
460 $ni->setSize(4);
461 $ni->setInfo($this->lng->txt("cont_width_height_info"));
462 $op2->addSubItem($ni);
463
464 // force IE to render again
465 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_ie_force_render"), "cobj_ie_force_render");
466 $cb->setValue("y");
467 $cb->setInfo($this->lng->txt("cont_ie_force_render_info"));
468 $op2->addSubItem($cb);
469
470 $this->form->addItem($radg);
471
472
473 // disable top menu
474 //Hide Top Navigation Bar
475 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_nomenu"), "cobj_nomenu");
476 $cb->setValue("y");
477 $cb->setInfo($this->lng->txt("cont_nomenu_info"));
478 $this->form->addItem($cb);
479
480 // disable left-side navigation
481 // Hide Left Navigation Tree
482 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_hidenavig"), "cobj_hidenavig");
483 $cb->setValue("y");
484 $cb->setInfo($this->lng->txt("cont_hidenavig_info"));
485 $this->form->addItem($cb);
486
487 // auto navigation to last visited item
488 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
489 $cb->setValue("y");
490 $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
491 $this->form->addItem($cb);
492
493 // tile image
494 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
495
496 //
497 // scorm options
498 //
499 $sh = new ilFormSectionHeaderGUI();
500 $sh->setTitle($this->lng->txt("cont_scorm_options"));
501 $this->form->addItem($sh);
502
503 // lesson mode
504 $radg = new ilRadioGroupInputGUI($lng->txt("cont_def_lesson_mode"), "lesson_mode");
505 $op0 = new ilRadioOption($this->lng->txt("cont_sc_less_mode_normal"), "normal");
506 $radg->addOption($op0);
507 $op1 = new ilRadioOption($this->lng->txt("cont_sc_less_mode_browse"), "browse");
508 $radg->addOption($op1);
509 // credit mode
510 $cmradg = new ilRadioGroupInputGUI($lng->txt("cont_credit_mode"), "credit_mode");
511 $cmop0 = new ilRadioOption($this->lng->txt("cont_credit_on"), "credit");
512 $cmradg->addOption($cmop0);
513 $cmop1 = new ilRadioOption($this->lng->txt("cont_credit_off"), "no_credit");
514 $cmradg->addOption($cmop1);
515 $op0->addSubItem($cmradg);
516 // set lesson mode review when completed
517 $options = array(
518 "n" => $this->lng->txt("cont_sc_auto_review_no"),
519 "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
520 "p" => $this->lng->txt("cont_sc_auto_review_passed"),
521 "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
522 "c" => $this->lng->txt("cont_sc_auto_review_completed"),
523 "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
524 "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
525 "s" => $this->lng->txt("cont_sc_store_if_previous_score_was_lower")
526 );
527 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
528 $si->setOptions($options);
529 $si->setInfo($this->lng->txt("cont_sc_auto_review_info_2004"));
530 $op0->addSubItem($si);
531 // end lesson mode
532 $this->form->addItem($radg);
533
534
535 // mastery_score
536 if ($this->object->getMasteryScoreValues() != "") {
537 $ni = new ilNumberInputGUI($this->lng->txt("cont_mastery_score_2004"), "mastery_score");
538 $ni->setMaxLength(3);
539 $ni->setSize(3);
540 $ni->setInfo($this->lng->txt("cont_mastery_score_2004_info") . $this->object->getMasteryScoreValues());
541 $this->form->addItem($ni);
542 }
543
544 //
545 // rte settings
546 //
547 $sh = new ilFormSectionHeaderGUI();
548 $sh->setTitle($this->lng->txt("cont_rte_settings"));
549 $this->form->addItem($sh);
550
551 // unlimited session timeout
552 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
553 $cb->setValue("y");
554 $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
555 $this->form->addItem($cb);
556
557 // SCORM 2004 fourth edition features
558 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_fourth_edition"), "cobj_fourth_edition");
559 $cb->setValue("y");
560 $cb->setInfo($this->lng->txt("cont_fourth_edition_info"));
561 $this->form->addItem($cb);
562
563 // sequencing
564 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sequencing"), "cobj_sequencing");
565 $cb->setValue("y");
566 $cb->setInfo($this->lng->txt("cont_sequencing_info"));
567 $this->form->addItem($cb);
568
569 // storage of interactions
570 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
571 $cb->setValue("y");
572 $cb->setInfo($this->lng->txt("cont_interactions_info"));
573 $this->form->addItem($cb);
574
575 // objectives
576 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
577 $cb->setValue("y");
578 $cb->setInfo($this->lng->txt("cont_objectives_info"));
579 $this->form->addItem($cb);
580
581 // comments
582 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_comments"), "cobj_comments");
583 $cb->setValue("y");
584 $cb->setInfo($this->lng->txt("cont_comments_info"));
585 $this->form->addItem($cb);
586
587 // time from lms
588 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
589 $cb->setValue("y");
590 $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
591 $this->form->addItem($cb);
592
593 // check values
594 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
595 $cb->setValue("y");
596 $cb->setInfo($this->lng->txt("cont_check_values_info"));
597 $this->form->addItem($cb);
598
599 // auto cmi.exit to suspend
600 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
601 $cb->setValue("y");
602 $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
603 $this->form->addItem($cb);
604
605 // settings for student_id
606 $options = array(
607 0 => $this->lng->txt("cont_sc_id_setting_user_id"),
608 1 => $this->lng->txt("cont_sc_id_setting_user_login"),
609 2 => $this->lng->txt("cont_sc_id_setting_user_id_plus_ref_id"),
610 3 => $this->lng->txt("cont_sc_id_setting_user_login_plus_ref_id"),
611 4 => $this->lng->txt("cont_sc_id_setting_user_id_plus_obj_id"),
612 5 => $this->lng->txt("cont_sc_id_setting_user_login_plus_obj_id")
613 );
614 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_id_setting_2004"), "id_setting");
615 $si->setOptions($options);
616 $si->setInfo($this->lng->txt("cont_sc_id_setting_info"));
617 $this->form->addItem($si);
618
619 // settings for student_name
620 $options = array(
621 0 => $this->lng->txt("cont_sc_name_setting_last_firstname"),
622 1 => $this->lng->txt("cont_sc_name_setting_first_lastname"),
623 2 => $this->lng->txt("cont_sc_name_setting_fullname"),
624 3 => $this->lng->txt("cont_sc_name_setting_salutation_lastname"),
625 4 => $this->lng->txt("cont_sc_name_setting_first_name"),
626 9 => $this->lng->txt("cont_sc_name_setting_no_name")
627 );
628 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_name_setting_2004"), "name_setting");
629 $si->setOptions($options);
630 $si->setInfo($this->lng->txt("cont_sc_name_setting_info"));
631 $this->form->addItem($si);
632
633 //
634 // debugging
635 //
636 $sh = new ilFormSectionHeaderGUI();
637 $sh->setTitle($this->lng->txt("cont_debugging"));
638 $this->form->addItem($sh);
639
640 // test tool
641 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
642 $cb->setValue("y");
643 if ($this->object->getDebugActivated() == false) {
644 $cb->setDisabled(true);
645 $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
646 } else {
647 $cb->setInfo($this->lng->txt("cont_debug_deactivate"));
648 }
649 $this->form->addItem($cb);
650 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
651 }
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
getObjectService()
Get object service.
This class represents a property in a property form.
This class represents an option in a radio group.
static checkIfAnyoneIsInOfflineMode($obj_id)

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $si, ilObjSAHSLearningModule\_lookupSubType(), ilSCORMOfflineMode\checkIfAnyoneIsInOfflineMode(), and ilObjectGUI\getObjectService().

Referenced by properties(), and saveProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilObjSCORM2004LearningModuleGUI::initStylePropertiesForm ( )

Init style properties form.

Definition at line 1077 of file class.ilObjSCORM2004LearningModuleGUI.php.

1078 {
1080 $lng = $this->lng;
1081 $ilTabs = $this->tabs;
1083
1084 $lng->loadLanguageModule("style");
1085 $this->setSubTabs("settings", "style");
1086 $ilTabs->setTabActive("settings");
1087
1088 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1089 $this->form = new ilPropertyFormGUI();
1090
1091 $fixed_style = $ilSetting->get("fixed_content_style_id");
1092 $style_id = $this->object->getStyleSheetId();
1093
1094 if ($fixed_style > 0) {
1095 $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
1096 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1097 $this->lng->txt("global_fixed") . ")");
1098 $this->form->addItem($st);
1099 } else {
1101 true,
1102 false,
1103 $_GET["ref_id"]
1104 );
1105
1106 $st_styles[0] = $this->lng->txt("default");
1107 ksort($st_styles);
1108
1109 if ($style_id > 0) {
1110 // individual style
1111 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1112 $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
1113 $st->setValue(ilObject::_lookupTitle($style_id));
1114 $this->form->addItem($st);
1115
1116 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1117
1118 // delete command
1119 $this->form->addCommandButton(
1120 "editStyle",
1121 $lng->txt("cont_edit_style")
1122 );
1123 $this->form->addCommandButton(
1124 "deleteStyle",
1125 $lng->txt("cont_delete_style")
1126 );
1127 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1128 }
1129 }
1130
1131 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1132 $style_sel = ilUtil::formSelect(
1133 $style_id,
1134 "style_id",
1135 $st_styles,
1136 false,
1137 true
1138 );
1139 $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
1140 $style_sel->setOptions($st_styles);
1141 $style_sel->setValue($style_id);
1142 $this->form->addItem($style_sel);
1143 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1144 $this->form->addCommandButton(
1145 "saveStyleSettings",
1146 $lng->txt("save")
1147 );
1148 $this->form->addCommandButton(
1149 "createStyle",
1150 $lng->txt("sty_create_ind_style")
1151 );
1152 }
1153 }
1154 $this->form->setTitle($lng->txt("cont_style"));
1155 $this->form->setFormAction($ilCtrl->getFormAction($this));
1156 }

References $_GET, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, $tabs, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilUtil\formSelect(), and ilObjSCORMLearningModuleGUI\setSubTabs().

Referenced by editStyleProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertAsset()

ilObjSCORM2004LearningModuleGUI::insertAsset (   $a_redirect = true)

Insert (multiple) assets at node.

Definition at line 2071 of file class.ilObjSCORM2004LearningModuleGUI.php.

2072 {
2074 $lng = $this->lng;
2075
2076 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2077
2078 $slm_tree = new ilTree($this->object->getId());
2079 $slm_tree->setTreeTablePK("slm_id");
2080 $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2081
2084
2085 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
2086 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2087
2088 if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2089 $parent_id = $slm_tree->getParentId($node_id);
2090 $target = $node_id;
2091 } else { // insert as first child
2092 $parent_id = $node_id;
2093 $target = IL_FIRST_NODE;
2094 }
2095
2096 $ass_ids = array();
2097 for ($i = 1; $i <= $num; $i++) {
2098 $ass = new ilSCORM2004Asset($this->object);
2099 $ass->setTitle($lng->txt("sahs_new_asset"));
2100 $ass->setSLMId($this->object->getId());
2101 $ass->create();
2102 ilSCORM2004Node::putInTree($ass, $parent_id, $target);
2103 $ass_ids[] = $ass->getId();
2104 }
2105 $ass_ids = array_reverse($ass_ids);
2106 $ass_ids = implode(":", $ass_ids);
2107
2108 if ($a_redirect) {
2109 $ilCtrl->setParameter($this, "highlight", $ass_ids);
2110 $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2111 }
2112 return array("node_id" => $node_id, "items" => $ass_ids);
2113 }
static getPostNodeId()
Get node ID of _POST input.
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false)
static getPostMulti()
Get multi number of _POST input.
Class ilSCORM2004Asset.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
$i
Definition: metadata.php:24

References ilObjSCORMLearningModuleGUI\$ctrl, $i, $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSCORM2004Node\putInTree().

+ Here is the call graph for this function:

◆ insertAssetClip()

ilObjSCORM2004LearningModuleGUI::insertAssetClip ( )

Insert assets from clipboard.

Definition at line 2715 of file class.ilObjSCORM2004LearningModuleGUI.php.

2716 {
2719
2720 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2721 ilSCORM2004Node::insertAssetClip($this->object);
2722
2723 $ilCtrl->redirect(
2724 $this,
2725 "showOrganization",
2727 );
2728 }
static insertAssetClip($a_slm_obj, $a_type="ass")
Insert assets from clipboard.
$ilUser
Definition: imgupload.php:18

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilUser, ilObjectGUI\$user, ilHierarchyFormGUI\getPostNodeId(), and ilSCORM2004Node\insertAssetClip().

+ Here is the call graph for this function:

◆ insertChapter()

ilObjSCORM2004LearningModuleGUI::insertChapter (   $a_redirect = true)

Insert (multiple) chapters at node.

Definition at line 1978 of file class.ilObjSCORM2004LearningModuleGUI.php.

1979 {
1981 $lng = $this->lng;
1982
1983 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1984
1985 $slm_tree = new ilTree($this->object->getId());
1986 $slm_tree->setTreeTablePK("slm_id");
1987 $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1988
1991
1992 if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
1993 $parent_id = $slm_tree->getParentId($node_id);
1994 $target = $node_id;
1995 } else { // insert as first child
1996 $parent_id = $node_id;
1997 $target = IL_FIRST_NODE;
1998 }
1999 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
2000 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2001
2002 $chap_ids = array();
2003 for ($i = 1; $i <= $num; $i++) {
2004 $chap = new ilSCORM2004Chapter($this->object);
2005 $chap->setTitle($lng->txt("sahs_new_chapter"));
2006 $chap->setSLMId($this->object->getId());
2007 $chap->create();
2008 ilSCORM2004Node::putInTree($chap, $parent_id, $target);
2009 $chap_ids[] = $chap->getId();
2010 }
2011 $chap_ids = array_reverse($chap_ids);
2012 $chap_ids = implode(":", $chap_ids);
2013
2014 if ($a_redirect) {
2015 $ilCtrl->setParameter($this, "highlight", $chap_ids);
2016 $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2017 }
2018 return array("node_id" => $node_id, "items" => $chap_ids);
2019 }
Class ilSCORM2004Chapter.

References ilObjSCORMLearningModuleGUI\$ctrl, $i, $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSCORM2004Node\putInTree().

+ Here is the call graph for this function:

◆ insertChapterClip()

ilObjSCORM2004LearningModuleGUI::insertChapterClip ( )

Insert chapter from clipboard.

Definition at line 2733 of file class.ilObjSCORM2004LearningModuleGUI.php.

2734 {
2737
2738 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2740
2741 $ilCtrl->redirect(
2742 $this,
2743 "showOrganization",
2745 );
2746 }
static insertChapterClip($a_slm_obj, $a_as_sub=false)
Insert Chapter from clipboard.

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilUser, ilObjectGUI\$user, ilHierarchyFormGUI\getPostNodeId(), and ilSCORM2004Node\insertChapterClip().

+ Here is the call graph for this function:

◆ insertLMChapterClip()

ilObjSCORM2004LearningModuleGUI::insertLMChapterClip (   $a_confirm = false,
  $a_perform = false 
)

Insert chapter from clipboard.

Definition at line 2751 of file class.ilObjSCORM2004LearningModuleGUI.php.

2752 {
2754 $tpl = $this->tpl;
2755 $ilToolbar = $this->toolbar;
2757 $lng = $this->lng;
2758 $ilTabs = $this->tabs;
2759
2760 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2761
2762
2763 $pf = "";
2765 $pf .= '<input type="hidden" name="' . $f . '" value="' . $v . '" />';
2766 }
2767 if ($a_confirm && is_array($_POST["node"])) {
2768 foreach ($_POST["node"] as $f => $v) {
2769 $pf .= '<input type="hidden" name="node[' . $f . ']" value="' . $v . '" />';
2770 }
2771 }
2772
2773
2776
2777 include_once("./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
2778 $form = new ilLMChapterImportForm($this->object, $node_id, $first_child, $a_confirm);
2779 $tpl->setContent($form->getHTML() . $pf . "</form>");
2780
2781 $ilTabs->clearTargets();
2782 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2783 if ($a_confirm) {
2784 if ($form->isCorrect()) {
2785 $ilToolbar->addFormButton($lng->txt("insert"), "performLMChapterInsert");
2786 }
2787 $ilToolbar->addFormButton($lng->txt("back"), "insertLMChapterClip");
2788 } else {
2789 $ilToolbar->addFormButton($lng->txt("check"), "confirmLMChapterInsert");
2790 }
2791 $ilToolbar->addFormButton($lng->txt("cancel"), "showOrganization");
2792 $ilToolbar->setCloseFormTag(false);
2793 }
static getPostFields()
Get all post fields.

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, Vendor\Package\$f, $ilCtrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilHierarchyFormGUI\getPostFields(), ilHierarchyFormGUI\getPostFirstChild(), and ilHierarchyFormGUI\getPostNodeId().

Referenced by confirmLMChapterInsert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPage()

ilObjSCORM2004LearningModuleGUI::insertPage (   $a_redirect = true)

Insert (multiple) pages at node.

Definition at line 2118 of file class.ilObjSCORM2004LearningModuleGUI.php.

2119 {
2121 $lng = $this->lng;
2122
2123 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2124
2125 $slm_tree = new ilTree($this->object->getId());
2126 $slm_tree->setTreeTablePK("slm_id");
2127 $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2128
2131
2132 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2133 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2134 if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2135 $parent_id = $slm_tree->getParentId($node_id);
2136 $target = $node_id;
2137 } else { // insert as first child
2138 $parent_id = $node_id;
2139 $target = IL_FIRST_NODE;
2140 }
2141
2142 $page_ids = array();
2143 for ($i = 1; $i <= $num; $i++) {
2144 $page = new ilSCORM2004PageNode($this->object);
2145 $page->setTitle($lng->txt("sahs_new_page"));
2146 $page->setSLMId($this->object->getId());
2147 $page->create();
2148 ilSCORM2004Node::putInTree($page, $parent_id, $target);
2149 $page_ids[] = $page->getId();
2150 }
2151 $page_ids = array_reverse($page_ids);
2152 $page_ids = implode(":", $page_ids);
2153
2154 if ($a_redirect) {
2155 $ilCtrl->setParameter($this, "highlight", $page_ids);
2156 $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2157 }
2158 return array("node_id" => $node_id, "items" => $page_ids);
2159 }
Class ilSCORM2004PageNode.

References ilObjSCORMLearningModuleGUI\$ctrl, $i, $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSCORM2004Node\putInTree().

+ Here is the call graph for this function:

◆ insertPageClip()

ilObjSCORM2004LearningModuleGUI::insertPageClip ( )

Insert pages from clipboard.

Definition at line 2679 of file class.ilObjSCORM2004LearningModuleGUI.php.

2680 {
2683
2684 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2685 ilSCORM2004Node::insertPageClip($this->object);
2686
2687 $ilCtrl->redirect(
2688 $this,
2689 "showOrganization",
2691 );
2692 }
static insertPageClip($a_slm_obj)
Insert pages from clipboard.

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilUser, ilObjectGUI\$user, ilHierarchyFormGUI\getPostNodeId(), and ilSCORM2004Node\insertPageClip().

+ Here is the call graph for this function:

◆ insertScenario()

ilObjSCORM2004LearningModuleGUI::insertScenario ( )

Insert sequencing scenario at node.

Definition at line 2242 of file class.ilObjSCORM2004LearningModuleGUI.php.

2243 {
2245
2246 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2247
2248 $slm_tree = new ilTree($this->object->getId());
2249 $slm_tree->setTreeTablePK("slm_id");
2250 $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2251
2252 $node_id = $_POST["node_id"];
2253
2254 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2255 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2256 include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2257
2258 if (!$_POST["first_child"]) { // insert after node id
2259 $parent_id = $slm_tree->getParentId($node_id);
2260 $target = $node_id;
2261 } else { // insert as first child
2262 $parent_id = $node_id;
2263 $target = IL_FIRST_NODE;
2264 }
2265
2266 $template = new ilSCORM2004SeqTemplate($_POST["identifier"]);
2267 $id = $template->insertTemplateForObjectAtParent($this->object, $parent_id, $target);
2268 $ilCtrl->setParameter($this, "highlight", $id);
2269 $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2270 }

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, and IL_FIRST_NODE.

◆ insertScenarioGUI()

ilObjSCORM2004LearningModuleGUI::insertScenarioGUI ( )

Insert sequencing scenario at node.

Definition at line 2165 of file class.ilObjSCORM2004LearningModuleGUI.php.

2166 {
2168 $lng = $this->lng;
2169 $tpl = $this->tpl;
2170
2171 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2172 include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2173
2174 $templates = array();
2175 $description = null;
2176 $image = null;
2177
2178 $default_identifier = $_POST["identifier"];
2179
2180 //get available templates
2182
2183 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_seq_chooser.html", "Modules/Scorm2004");
2184
2185 $this->tpl->setCurrentBlock("option_item");
2186
2187 $active = null;
2188 foreach ($arr_templates as $templ) {
2189 $sel = "";
2190 $item_data = $templ->getMetadataProperties();
2191 $item_data['identifier'] = $templ->getIdentifier();
2192 array_push($templates, $item_data);
2193 if ($default_identifier == $item_data['identifier']) {
2194 $sel = 'selected';
2195 $active = $item_data;
2196 }
2197 $this->tpl->setVariable("VAL_SELECTED", $sel);
2198 $this->tpl->setVariable("VAL_IDENTIFIER", $item_data['identifier']);
2199 $this->tpl->setVariable("VAL_TITLE", $item_data['title']);
2200 $this->tpl->parseCurrentBlock();
2201 }
2202
2203 //default
2204 if ($active == null) {
2205 $this->saveAllTitles(false);
2206 $description = $templates[0]['description'];
2207 $image = $templates[0]['thumbnail'];
2208 } else {
2209 $description = $active['description'];
2210 $image = $active['thumbnail'];
2211 }
2212
2213 $this->tpl->setVariable("VAL_DESCRIPTION", $description);
2214 $this->tpl->setVariable("VAL_IMAGE", ilSCORM2004SeqTemplate::SEQ_TEMPLATE_DIR . "/images/" . $image);
2215
2216 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2217 $this->tpl->setVariable("BTN_NAME", "insertScenario");
2218 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2219 $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2220 $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2221
2222 $this->tpl->setVariable("TXT_TITLE", "Choose Sequencing Template");
2223
2224 $node_id = $_POST["node_id"];
2225 $first_child = $_POST["first_child"];
2226
2227 if (!$node_id) {
2229 }
2230 if (!$first_child) {
2232 }
2233
2234 $this->tpl->setVariable("VAL_NODE_ID", $node_id);
2235 $this->tpl->setVariable("VAL_FIRST_CHILD", $first_child);
2236 }

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilSCORM2004SeqTemplate\availableTemplates(), ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostNodeId(), saveAllTitles(), and ilSCORM2004SeqTemplate\SEQ_TEMPLATE_DIR.

+ Here is the call graph for this function:

◆ insertSco()

ilObjSCORM2004LearningModuleGUI::insertSco (   $a_redirect = true)

Insert (multiple) scos at node.

Definition at line 2024 of file class.ilObjSCORM2004LearningModuleGUI.php.

2025 {
2027 $lng = $this->lng;
2028
2029 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2030
2031 $slm_tree = new ilTree($this->object->getId());
2032 $slm_tree->setTreeTablePK("slm_id");
2033 $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2034
2037
2038 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
2039 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2040
2041 if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2042 $parent_id = $slm_tree->getParentId($node_id);
2043 $target = $node_id;
2044 } else { // insert as first child
2045 $parent_id = $node_id;
2046 $target = IL_FIRST_NODE;
2047 }
2048
2049 $sco_ids = array();
2050 for ($i = 1; $i <= $num; $i++) {
2051 $sco = new ilSCORM2004Sco($this->object);
2052 $sco->setTitle($lng->txt("sahs_new_sco"));
2053 $sco->setSLMId($this->object->getId());
2054 $sco->create();
2055 ilSCORM2004Node::putInTree($sco, $parent_id, $target);
2056 $sco_ids[] = $sco->getId();
2057 }
2058 $sco_ids = array_reverse($sco_ids);
2059 $sco_ids = implode(":", $sco_ids);
2060
2061 if ($a_redirect) {
2062 $ilCtrl->setParameter($this, "highlight", $sco_ids);
2063 $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2064 }
2065 return array("node_id" => $node_id, "items" => $sco_ids);
2066 }
Class ilSCORM2004Sco.

References ilObjSCORMLearningModuleGUI\$ctrl, $i, $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilSCORM2004Node\putInTree().

+ Here is the call graph for this function:

◆ insertScoClip()

ilObjSCORM2004LearningModuleGUI::insertScoClip ( )

Insert scos from clipboard.

Definition at line 2697 of file class.ilObjSCORM2004LearningModuleGUI.php.

2698 {
2701
2702 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2703 ilSCORM2004Node::insertScoClip($this->object);
2704
2705 $ilCtrl->redirect(
2706 $this,
2707 "showOrganization",
2709 );
2710 }
static insertScoClip($a_slm_obj)
Insert scos from clipboard.

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilUser, ilObjectGUI\$user, ilHierarchyFormGUI\getPostNodeId(), and ilSCORM2004Node\insertScoClip().

+ Here is the call graph for this function:

◆ insertSpecialPage()

ilObjSCORM2004LearningModuleGUI::insertSpecialPage (   $a_redirect = true)

Insert special page.

Definition at line 2275 of file class.ilObjSCORM2004LearningModuleGUI.php.

2276 {
2277 $this->insertTemplateGUI($a_redirect, true);
2278 }
insertTemplateGUI($a_redirect=true, $a_special_page=false)
Displays GUI to select template for page.

References insertTemplateGUI().

+ Here is the call graph for this function:

◆ insertTemplate()

ilObjSCORM2004LearningModuleGUI::insertTemplate (   $a_redirect = true)

Insert (multiple) pages at node.

Definition at line 2368 of file class.ilObjSCORM2004LearningModuleGUI.php.

2369 {
2371 $lng = $this->lng;
2372
2373 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2374
2375 $slm_tree = new ilTree($this->object->getId());
2376 $slm_tree->setTreeTablePK("slm_id");
2377 $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2378
2379 $num = $_POST["multi"];
2380 $node_id = $_POST["node_id"];
2381 $layout_id = $_POST["layout_id"];
2382
2383
2384 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2385 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2386
2387 if (!$_POST["first_child"]) { // insert after node id
2388 $parent_id = $slm_tree->getParentId($node_id);
2389 $target = $node_id;
2390 } else { // insert as first child
2391 $parent_id = $node_id;
2392 $target = IL_FIRST_NODE;
2393 }
2394
2395 $page_ids = array();
2396 for ($i = 1; $i <= $num; $i++) {
2397 $page = new ilSCORM2004PageNode($this->object);
2398 $page->setTitle($lng->txt("sahs_new_page"));
2399 $page->setSLMId($this->object->getId());
2400 $page->create(false, $layout_id);
2401 ilSCORM2004Node::putInTree($page, $parent_id, $target);
2402 $page_ids[] = $page->getId();
2403 }
2404 $page_ids = array_reverse($page_ids);
2405 $page_ids = implode(":", $page_ids);
2406
2407 if ($a_redirect) {
2408 if ($_GET["obj_id"] != "") {
2409 $this->jumpToNode($node_id, $page_ids);
2410 } else {
2411 $ilCtrl->setParameter($this, "highlight", $page_ids);
2412 $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2413 }
2414 }
2415 }
jumpToNode($a_anchor_node="", $a_highlight_ids="")

References $_GET, $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $i, $ilCtrl, ilObjectGUI\$lng, IL_FIRST_NODE, jumpToNode(), and ilSCORM2004Node\putInTree().

+ Here is the call graph for this function:

◆ insertTemplateGUI()

ilObjSCORM2004LearningModuleGUI::insertTemplateGUI (   $a_redirect = true,
  $a_special_page = false 
)

Displays GUI to select template for page.

Definition at line 2284 of file class.ilObjSCORM2004LearningModuleGUI.php.

2285 {
2287 $lng = $this->lng;
2288
2289 $arr_templates = ilPageLayout::activeLayouts($a_special_page, ilPageLayout::MODULE_SCORM);
2290
2291 //$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_page_layout_chooser.html",
2292 //"Modules/Scorm2004");
2293
2294 $ftpl = new ilTemplate("tpl.scormeditor_page_layout_chooser.html", true, true, "Modules/Scorm2004");
2295
2296 $count = 0;
2297 foreach ($arr_templates as $templ) {
2298 $count++;
2299 $sel = "";
2300 $templ->readObject();
2301 $ftpl->setCurrentBlock("option_item2");
2302 $ftpl->setVariable("VAL_LAYOUT_TITLE", $templ->getTitle());
2303 $ftpl->setVariable("VAL_LAYOUT_IMAGE", $templ->getPreview());
2304 $ftpl->setVariable("VAL_LAYOUT_ID", $templ->getId());
2305 $ftpl->setVariable("VAL_DISPLAY", "inline");
2306 if ($count == 1) {
2307 $ftpl->setVariable("VAL_CHECKED", "checked");
2308 }
2309 if ($count % 4 == 0) {
2310 $ftpl->setVariable("END_ROW", "</tr>");
2311 }
2312 if ($count == 1 || ($count - 1) % 4 == 0) {
2313 $ftpl->setVariable("BEGIN_ROW", "<tr>");
2314 }
2315 $ftpl->parseCurrentBlock();
2316 }
2317
2318 //matrix table
2319 if ($count % 4 != 0) {
2320 $rest = 4 - ($count % 4);
2321 } else {
2322 $rest = 0;
2323 }
2324
2325 for ($i = 1;$i <= $rest;$i++) {
2326 $ftpl->setVariable("VAL_DISPLAY", "none");
2327 $ftpl->setVariable("VAL_LAYOUT_ID", $templ->getId());
2328
2329 if ($i == $rest) {
2330 $ftpl->setVariable("END_ROW", "</tr>");
2331 }
2332 $this->tpl->parseCurrentBlock();
2333 }
2334
2335 //empty cells and closing <tr>
2336
2337 $ftpl->setVariable("VAL_NODE_ID", ilSCORM2004OrganizationHFormGUI::getPostNodeId());
2338 $ftpl->setVariable("VAL_MULTI", ilSCORM2004OrganizationHFormGUI::getPostMulti());
2339 $ftpl->setVariable("VAL_FIRST_CHILD", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2340 $ftpl->setVariable("VAL_OBJ_ID", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2341
2342 $ilCtrl->saveParameter($this, "obj_id");
2343
2344 $ftpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2345
2346 $ftpl->setVariable("BTN_NAME", "insertTemplate");
2347 $ftpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2348 $ftpl->setVariable("TXT_INSERT", $this->lng->txt("create"));
2349 $ftpl->setVariable("CMD_CANCEL", "showOrganization");
2350
2351 $ftpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2352 $ftpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2353 $ftpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2354 if ($a_special_page) {
2355 $ftpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_special_page"));
2356 } else {
2357 $ftpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_page_template"));
2358 }
2359
2360 $this->tpl->setContent($ftpl->get());
2361 }
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
special template class to simplify handling of ITX/PEAR
$rest
Definition: goto.php:46

References ilObjSCORMLearningModuleGUI\$ctrl, $i, $ilCtrl, ilObjectGUI\$lng, $rest, ilPageLayout\activeLayouts(), ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), and ilPageLayout\MODULE_SCORM.

Referenced by insertSpecialPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jumpToNode()

ilObjSCORM2004LearningModuleGUI::jumpToNode (   $a_anchor_node = "",
  $a_highlight_ids = "" 
)

Definition at line 220 of file class.ilObjSCORM2004LearningModuleGUI.php.

221 {
223
224 $anchor = ($a_anchor_node != "")
225 ? "node_" . $a_anchor_node
226 : "";
227
228 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
230 $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
231 switch ($type) {
232 case "sco":
233 $ilCtrl->setParameterByClass("ilscorm2004scogui", "highlight", $a_highlight_ids);
234 $ilCtrl->redirectByClass("ilscorm2004scogui", "showOrganization", $anchor);
235 // no break
236 case "ass":
237 $ilCtrl->setParameterByClass("ilscorm2004assetgui", "highlight", $a_highlight_ids);
238 $ilCtrl->redirectByClass("ilscorm2004assetgui", "showOrganization", $anchor);
239 // no break
240 case "chap":
241 $ilCtrl->setParameterByClass("ilscorm2004chaptergui", "highlight", $a_highlight_ids);
242 $ilCtrl->redirectByClass("ilscorm2004chaptergui", "showOrganization", $anchor);
243 // no break
244 case "seqc":
245 $ilCtrl->setParameterByClass("ilscorm2004seqchaptergui", "highlight", $a_highlight_ids);
246 $ilCtrl->redirectByClass("ilscorm2004seqchaptergui", "showOrganization", $anchor);
247 // no break
248 case "page":
249 $ilCtrl->redirectByClass("ilscorm2004pagenodegui", "edit");
250 }
251 }

References $_GET, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $type, and ilSCORM2004Node\_lookupType().

Referenced by insertTemplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performLMChapterInsert()

ilObjSCORM2004LearningModuleGUI::performLMChapterInsert ( )

Perform lm chapter insert.

Definition at line 2806 of file class.ilObjSCORM2004LearningModuleGUI.php.

2807 {
2810
2811 include_once("./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
2812 $form = new ilLMChapterImportForm($this->object, $node_id, $first_child);
2813 $form->performInserts();
2814 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2815 $this->ctrl->redirect($this, "showOrganization");
2816 }

References ilHierarchyFormGUI\getPostFirstChild(), and ilHierarchyFormGUI\getPostNodeId().

+ Here is the call graph for this function:

◆ preview()

ilObjSCORM2004LearningModuleGUI::preview ( )

Definition at line 2975 of file class.ilObjSCORM2004LearningModuleGUI.php.

2976 {
2977 global $DIC;
2978
2979 $export = new ilScorm2004Export($this->object, 'SCORM 2004 3rd');
2980 $zipfile = $export->buildExportFile();
2981 $zipPathinfo = pathinfo($zipfile);
2982 $file_path = $this->object->getDataDirectory() . "/" . ($zipPathinfo["basename"]);
2983 copy($zipfile, $file_path);
2984 unlink($zipfile);
2985
2986 ilUtil::unzip($file_path, true);
2987 ilUtil::renameExecutables($this->object->getDataDirectory());
2988 unlink($file_path);
2989
2990 include_once("./Modules/Scorm2004/classes/ilSCORM13Package.php");
2991 $rte_pkg = new ilSCORM13Package();
2992 $rte_pkg->il_import($this->object->getDataDirectory(), $this->object->getId(), $DIC["ilias"], false, true);
2993
2994 //increase module version is it necessary?
2995 //$this->object->setModuleVersion($module_version+1);
2996 //$this->object->update();
2997
2998 //redirect to view player
2999 ilUtil::redirect("ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=" . $this->object->getRefID() . "&envEditor=1");
3000 }
static redirect($a_script)
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.

References $DIC, ilUtil\redirect(), ilUtil\renameExecutables(), and ilUtil\unzip().

+ Here is the call graph for this function:

◆ proceedDragDrop()

ilObjSCORM2004LearningModuleGUI::proceedDragDrop ( )

Perform drag and drop action.

Definition at line 2593 of file class.ilObjSCORM2004LearningModuleGUI.php.

2594 {
2596
2597 $this->object->executeDragDrop(
2598 $_POST["il_hform_source_id"],
2599 $_POST["il_hform_target_id"],
2600 $_POST["il_hform_fc"],
2601 $_POST["il_hform_as_subitem"]
2602 );
2603 $ilCtrl->redirect($this, "showOrganization");
2604 }

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, and $ilCtrl.

◆ properties()

ilObjSCORM2004LearningModuleGUI::properties ( )

Scorm 2004 module properties.

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 256 of file class.ilObjSCORM2004LearningModuleGUI.php.

257 {
262 $ilToolbar = $this->toolbar;
265 $ilTabs = $this->tabs;
266
267 $this->setSubTabs("settings", "general_settings");
268
269 $lng->loadLanguageModule("style");
270
271 // not editable
272 if ($this->object->editable != 1) {
274 $ilTabs->setSubTabActive('cont_settings');
275 // view
276 $ilToolbar->addButtonInstance($this->object->getViewButton());
277 } else { // editable
278 // glossary buttons to toolbar
279 $sep = false;
280 if (ilObject::_lookupType($this->object->getAssignedGlossary()) != "glo") {
281 $parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
282 if ($rbacsystem->checkAccess("create", $parent_ref_id, "glo")) {
283 $ilToolbar->addButton(
284 $this->lng->txt("cont_glo_create"),
285 $ilCtrl->getLinkTarget($this, "createGlossary")
286 );
287 }
288 $ilToolbar->addButton(
289 $this->lng->txt("cont_glo_assign"),
290 $ilCtrl->getLinkTarget($this, "assignGlossary")
291 );
292 } else {
293 $ilToolbar->addButton(
294 $this->lng->txt("cont_glo_detach"),
295 $ilCtrl->getLinkTarget($this, "detachGlossary")
296 );
297 }
298
299 // style buttons to toolbar
300 $fixed_style = $ilSetting->get("fixed_content_style_id");
301 $style_id = $this->object->getStyleSheetId();
302
303 if ($fixed_style == 0) {
305 true,
306 false,
307 $_GET["ref_id"]
308 );
309
310 $st_styles[0] = $this->lng->txt("default");
311 ksort($st_styles);
312
313 if ($style_id > 0) {
314 // individual style
315 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
316 $ilToolbar->addSeparator();
317
318 // delete command
319 $ilToolbar->addButton(
320 $this->lng->txt("cont_edit_style"),
321 $ilCtrl->getLinkTarget($this, "editStyle")
322 );
323 $ilToolbar->addButton(
324 $this->lng->txt("cont_delete_style"),
325 $ilCtrl->getLinkTarget($this, "deleteStyle")
326 );
327 }
328 }
329
330 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
331 $ilToolbar->addSeparator();
332
333 $ilToolbar->addButton(
334 $this->lng->txt("sty_create_ind_style"),
335 $ilCtrl->getLinkTarget($this, "createStyle")
336 );
337 }
338 }
339 }
340
341 // output forms
342 if ($this->object->editable != 1) {
343 $this->initPropertiesForm();
345 $tpl->setContent($this->form->getHTML());
346 } else {
349 $tpl->setContent($this->form->getHTML());
350 }
351 }
getPropertiesEditableValues()
Get current values for properties (editable) from.
getPropertiesFormValues()
Get values for properties form.
initPropertiesEditableForm()
Init properties (editable) form.

References $_GET, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, $rbacsystem, ilObjectGUI\$settings, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupType(), getPropertiesEditableValues(), getPropertiesFormValues(), initPropertiesEditableForm(), initPropertiesForm(), ilObjSAHSLearningModuleGUI\setSettingsSubTabs(), and ilObjSCORMLearningModuleGUI\setSubTabs().

+ Here is the call graph for this function:

◆ publishExportFile()

ilObjSCORM2004LearningModuleGUI::publishExportFile ( )

Definition at line 2948 of file class.ilObjSCORM2004LearningModuleGUI.php.

2949 {
2951
2952 if (!isset($_POST["file"])) {
2953 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
2954 }
2955 if (count($_POST["file"]) > 1) {
2956 $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
2957 }
2958
2959 $export = new ilSCORM2004Export($this->object);
2960 $file = $_POST['file'][0];
2961 $type = $_POST['type'][$_POST['file'][0]];
2962
2963 if ($this->object->getPublicExportFile($type) == $file) {
2964 $this->object->setPublicExportFile($type, "");
2965 } else {
2966 $this->object->setPublicExportFile($type, $file);
2967 }
2968 $this->object->update();
2969 $this->ctrl->redirect($this, "showExportList");
2970 }

References $_POST, $error, ilObjectGUI\$ilErr, and $type.

◆ saveAllTitles()

ilObjSCORM2004LearningModuleGUI::saveAllTitles (   $a_redirect = true)

Save all titles of chapters/scos/pages.

Definition at line 2461 of file class.ilObjSCORM2004LearningModuleGUI.php.

2462 {
2464
2465 if (is_array($_POST["title"])) {
2466 include_once("./Services/MetaData/classes/class.ilMD.php");
2467 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2468 foreach ($_POST["title"] as $id => $title) {
2469 $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2470 if (is_object($node_obj)) {
2471 // Update Title and description
2472 $md = new ilMD($this->object->getId(), $id, $node_obj->getType());
2473 $md_gen = $md->getGeneral();
2474 $md_gen->setTitle(ilUtil::stripSlashes($title));
2475 $md_gen->update();
2476 $md->update();
2478 }
2479 }
2480 }
2481 if ($a_redirect) {
2482 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2483 $ilCtrl->redirect($this, "showOrganization");
2484 }
2485 }
static _writeTitle($a_obj_id, $a_title)
Write Title.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilSCORM2004Node\_writeTitle(), ilSCORM2004NodeFactory\getInstance(), and ilUtil\stripSlashes().

Referenced by collapseAll(), expandAll(), and insertScenarioGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveGlossary()

ilObjSCORM2004LearningModuleGUI::saveGlossary ( )

Save glossary form.

Definition at line 956 of file class.ilObjSCORM2004LearningModuleGUI.php.

957 {
963
964 $parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
965 if (!$rbacsystem->checkAccess("create", $parent_ref_id, "glo")) {
966 ilUtil::sendFailure($lng->txt("no_permission"), true);
967 $ilCtrl->redirect($this, "properties");
968 }
969
971 if ($this->form->checkInput()) {
972 $newObj = new ilObjGlossary();
973 $newObj->setType("glo");
974 $newObj->setTitle($_POST["title"]);
975 $newObj->setDescription($_POST["description"]);
976 $newObj->setVirtualMode("none");
977 $newObj->create();
978 $newObj->createReference();
979 $newObj->putInTree($parent_ref_id);
980 $newObj->setPermissions($parent_ref_id);
981
982 // perform save
983 $this->object->setAssignedGlossary($newObj->getId());
984 $this->object->update();
985
986 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
987 $ilCtrl->redirect($this, "properties");
988 }
989
990 $this->form->setValuesByPost();
991 $tpl->setContent($this->form->getHtml());
992 }
Class ilObjGlossary.

References $_GET, $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $rbacsystem, ilObjectGUI\$tpl, ilObjectGUI\$tree, initGlossaryCreationForm(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjSCORM2004LearningModuleGUI::saveProperties ( )

save scorm 2004 module properties

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 805 of file class.ilObjSCORM2004LearningModuleGUI.php.

806 {
808 $obj_service = $this->getObjectService();
809 $this->initPropertiesForm();
810 $this->form->checkInput();
811
812 if ($this->object->editable != 1) {
813 //check if OfflineMode-Zip has to be created
814 $tmpOfflineMode = ilUtil::yn2tf($_POST["cobj_offline_mode"]);
815 $tmpFourth_edition = ilUtil::yn2tf($_POST["cobj_fourth_edition"]);
816 $tmpSequencing = ilUtil::yn2tf($_POST["cobj_sequencing"]);
817 if ($tmpOfflineMode == true) {
818 // $tmpSequencing = false; //actually no sequencing for offline_mode
819 $tmpFourth_edition = false; //4th edition is not possible
820 if ($this->object->getOfflineMode() == false) {
821 $this->object->zipLmForOfflineMode();
822 }
823 }
824
825 if (isset($_POST["mastery_score"])) {
826 $this->object->setMasteryScore($_POST["mastery_score"]);
827 // $this->object->updateMasteryScoreValues();
828 }
829
830 $t_auto_review = $_POST["auto_review"];
831 $t_auto_suspend = ilUtil::yn2tf($_POST["cobj_auto_suspend"]);
832 $t_session = ilUtil::yn2tf($_POST["cobj_session"]);
833 if ($t_auto_review == "s") {
834 $t_auto_suspend = true;
835 //if not storing without session
836 $t_session = true;
837 }
838
839 $t_height = $this->object->getHeight();
840 if ($_POST["height_0"] != $this->object->getHeight()) {
841 $t_height = $_POST["height_0"];
842 }
843 if ($_POST["height_1"] != $this->object->getHeight()) {
844 $t_height = $_POST["height_1"];
845 }
846
847 $t_width = $this->object->getWidth();
848 if ($_POST["width_0"] != $this->object->getWidth()) {
849 $t_width = $_POST["width_0"];
850 }
851 if ($_POST["width_1"] != $this->object->getWidth()) {
852 $t_width = $_POST["width_1"];
853 }
854
855 $this->object->setOfflineStatus(!($_POST['cobj_online']));
856 $this->object->setOpenMode($_POST["open_mode"]);
857 $this->object->setWidth($t_width);
858 $this->object->setHeight($t_height);
859 $this->object->setCreditMode($_POST["credit_mode"]);
860 $this->object->setMaxAttempt($_POST["max_attempt"]);
861 $this->object->setAutoReviewChar($t_auto_review);
862 $this->object->setDefaultLessonMode($_POST["lesson_mode"]);
863 $this->object->setSession($t_session);
864 $this->object->setNoMenu(ilUtil::yn2tf($_POST["cobj_nomenu"]));
865 $this->object->setHideNavig(ilUtil::yn2tf($_POST["cobj_hidenavig"]));
866 $this->object->setAuto_last_visited(ilUtil::yn2tf($_POST["cobj_auto_last_visited"]));
867 $this->object->setIe_force_render(ilUtil::yn2tf($_POST["cobj_ie_force_render"]));
868 $this->object->setFourth_edition($tmpFourth_edition);
869 $this->object->setSequencing($tmpSequencing);
870 $this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
871 $this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
872 $this->object->setComments(ilUtil::yn2tf($_POST["cobj_comments"]));
873 $this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
874 $this->object->setCheck_values(ilUtil::yn2tf($_POST["cobj_check_values"]));
875 $this->object->setAutoSuspend($t_auto_suspend);
876 $this->object->setOfflineMode($tmpOfflineMode);
877 $this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
878 $this->object->setIdSetting($_POST["id_setting"]);
879 $this->object->setNameSetting($_POST["name_setting"]);
880 $this->object->setTitle($_POST["Fobject_title"]);
881 $this->object->setDescription($_POST["Fobject_description"]);
882
883 // tile image
884 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
885 } else {
887 if ($this->form->checkInput()) {
888 $this->object->setTries($_POST["q_tries"]);
889 $this->object->setLocalization($_POST["localization"]);
890
891 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
892 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
893 || $this->object->getStyleSheetId() == 0)) {
894 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
895 }
896 }
897 }
898 $this->object->update();
899 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
900 $this->ctrl->redirect($this, "properties");
901 }
static yn2tf($a_yn)
convert "y"/"n" to true/false

References $_POST, $ilSetting, ilObjectGUI\$settings, ilObjStyleSheet\_lookupStandard(), ilObjectGUI\getObjectService(), initPropertiesEditableForm(), initPropertiesForm(), ilUtil\stripSlashes(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ saveSequencing()

ilObjSCORM2004LearningModuleGUI::saveSequencing ( )

Save sequencing.

Definition at line 1526 of file class.ilObjSCORM2004LearningModuleGUI.php.

1527 {
1528 $tpl = $this->tpl;
1529 $lng = $this->lng;
1531
1532 include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1533 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
1534 $t = $this->object->getTree();
1535 $root_node = $t->getNodeData($t->getRootId());
1536 $nodes = $this->object->getTree()->getSubtree($root_node);
1537 foreach ($nodes as $node) {
1538 if (in_array($node["type"], array("", "chap", "sco"))) {
1539 if ($node["type"] == "") {
1540 $item = new ilSCORM2004Item($this->object->getId(), true);
1541 } else {
1542 $item = new ilSCORM2004Item($node["child"]);
1543 }
1544 $xml = '<?xml version="1.0"?>' . ilUtil::stripSlashes($_POST["seq"][$node["child"]], false);
1545
1546 $ob_texts = array();
1547 if ($node["type"] == "sco") {
1548 $sco = new ilSCORM2004Sco($this->object, $node["child"]);
1549 $objectives = $sco->getObjectives();
1550 foreach ($objectives as $o) {
1551 $ob_texts[$o->getId()] = $o->getObjectiveId();
1552 }
1553 }
1554
1555 $item->setSeqXml($xml);
1556 $item->initDom();
1557 $item->update();
1558
1559 if ($node["type"] == "sco") {
1560 foreach ($ob_texts as $id => $t) {
1561 $objective = new ilScorm2004Objective($node["child"], $id);
1562 $objective->setObjectiveId($t);
1563 $objective->updateObjective();
1564 }
1565 }
1566 }
1567 }
1568
1569 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1570
1571 $ilCtrl->redirect($this, "showSequencing");
1572 }
Class ilSCORM2004Condition.
$xml
Definition: metadata.php:332

References $_POST, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, $xml, and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjSCORM2004LearningModuleGUI::saveStyleSettings ( )

Save style settings.

Definition at line 1191 of file class.ilObjSCORM2004LearningModuleGUI.php.

1192 {
1194
1195 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1196 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1197 || $this->object->getStyleSheetId() == 0)) {
1198 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1199 $this->object->update();
1200 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1201 }
1202 $this->ctrl->redirect($this, "editStyleProperties");
1203 }

References $_POST, $ilSetting, ilObjectGUI\$settings, ilObjStyleSheet\_lookupStandard(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ selectExport()

ilObjSCORM2004LearningModuleGUI::selectExport ( )

Select the export type of the SCORM 2004 module.

Definition at line 1631 of file class.ilObjSCORM2004LearningModuleGUI.php.

1632 {
1633 switch ($_POST['select_export']) {
1634 case "exportScorm12":
1635 case "exportScorm2004_3rd":
1636 case "exportScorm2004_4th":
1637 case "exportPDF":
1638 case "exportISO":
1639 case "exportHTML":
1640 case "exportHTMLOne":
1641 $this->ctrl->redirect($this, $_POST['select_export']);
1642 break;
1643 default:
1644 $this->ctrl->redirect($this, 'showExportList');
1645 break;
1646 }
1647 }

References $_POST.

◆ selectGlossary()

ilObjSCORM2004LearningModuleGUI::selectGlossary ( )

Select glossary.

Definition at line 1040 of file class.ilObjSCORM2004LearningModuleGUI.php.

1041 {
1043
1044 $this->object->setAssignedGlossary(ilObject::_lookupObjId((int) $_GET["glo_ref_id"]));
1045 $this->object->update();
1046 $ilCtrl->redirect($this, "properties");
1047 }
static _lookupObjId($a_id)

References $_GET, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, and ilObject\_lookupObjId().

+ Here is the call graph for this function:

◆ selectLObjChapter()

ilObjSCORM2004LearningModuleGUI::selectLObjChapter ( )

Definition at line 1620 of file class.ilObjSCORM2004LearningModuleGUI.php.

1621 {
1623
1624 $_SESSION["sahs_cur_chap"] = (int) $_POST["chapter"];
1625 $ilCtrl->redirect($this, "showLearningObjectivesAlignment");
1626 }

References $_POST, $_SESSION, ilObjSCORMLearningModuleGUI\$ctrl, and $ilCtrl.

◆ setSubTabs()

ilObjSCORM2004LearningModuleGUI::setSubTabs (   $a_main_tab = "",
  $a_active = "" 
)

Set sub tabs.

Definition at line 1834 of file class.ilObjSCORM2004LearningModuleGUI.php.

1835 {
1836 $ilTabs = $this->tabs;
1838 $lng = $this->lng;
1839
1840 if ($a_main_tab == "settings" &&
1841 $this->object->editable == 1) {
1842 /* // general properties
1843 $ilTabs->addSubTab("general_settings",
1844 $lng->txt("general_settings"),
1845 $ilCtrl->getLinkTarget($this, 'properties'));
1846
1847 // style properties
1848 $ilTabs->addSubTab("style",
1849 $lng->txt("cont_style"),
1850 $ilCtrl->getLinkTarget($this, 'editStyleProperties'));
1851 */
1852 $ilTabs->activateSubTab($a_active);
1853 }
1854 }

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, and $tabs.

◆ showEditTree()

ilObjSCORM2004LearningModuleGUI::showEditTree ( )

Show tree.

Definition at line 167 of file class.ilObjSCORM2004LearningModuleGUI.php.

168 {
169 $this->tool_context->current()->addAdditionalData(ilSAHSEditGSToolProvider::SHOW_SCORM_EDIT_TREE, true);
170 $exp = new ilSCORM2004EditorExplorerGUI($this, "showEditTree", $this->object);
171 $exp->handleCommand();
172 }

References ilSAHSEditGSToolProvider\SHOW_SCORM_EDIT_TREE.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ showExportList()

ilObjSCORM2004LearningModuleGUI::showExportList ( )

Show Export List.

Definition at line 1652 of file class.ilObjSCORM2004LearningModuleGUI.php.

1653 {
1654 $tpl = $this->tpl;
1655 $ilToolbar = $this->toolbar;
1656
1657 $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'selectExport'));
1658 $ilToolbar->setId("scorm2004export");
1659
1660 //$template = new ilTemplate("tpl.scorm2004_export_buttons.html", true, true, 'Modules/Scorm2004');
1661
1662 /* $buttons = array(
1663 "exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
1664 "exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
1665 "exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
1666 "exportPDF" => $this->lng->txt("scorm_create_export_file_pdf"),
1667 "exportISO" => $this->lng->txt("scorm_create_export_file_iso"),
1668 "exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
1669 "exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
1670 );*/
1671 $buttons = array(
1672 "exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
1673 "exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
1674 "exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
1675 "exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
1676 "exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
1677 );
1678
1679 //
1680 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1681 $si = new ilSelectInputGUI($this->lng->txt('type'), "select_export");
1682 $si->setOptions($buttons);
1683 $ilToolbar->addInputItem($si, true);
1684
1685 $ilToolbar->addFormButton($this->lng->txt('export'), "selectExport");
1686
1687 $export_files = $this->object->getExportFiles();
1688
1689 include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
1690 $table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList');
1691 $data = array();
1692 foreach ($export_files as $exp_file) {
1693 $filetype = $exp_file['type'];
1694 $public_str = ($exp_file["file"] == $this->object->getPublicExportFile($filetype))
1695 ? " <b>(" . $this->lng->txt("public") . ")<b>"
1696 : "";
1697 $file_arr = explode("__", $exp_file["file"]);
1698 array_push($data, array('file' => $exp_file['file'], 'filetype' => $filetype, 'date' => ilDatePresentation::formatDate(new ilDateTime($file_arr[0], IL_CAL_UNIX)), 'size' => $exp_file['size'], 'type' => $exp_file['type'] . $public_str));
1699 }
1700 $table_gui->setData($data);
1701
1702 $this->tpl->setContent($table_gui->getHTML());
1703 }

References ilObjectGUI\$data, $si, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilDatePresentation\formatDate(), and IL_CAL_UNIX.

+ Here is the call graph for this function:

◆ showLearningObjectivesAlignment()

ilObjSCORM2004LearningModuleGUI::showLearningObjectivesAlignment ( )

Show Learning Objectives Alignment.

Definition at line 1577 of file class.ilObjSCORM2004LearningModuleGUI.php.

1578 {
1579 $tpl = $this->tpl;
1580 $lng = $this->lng;
1582 $ilToolbar = $this->toolbar;
1583
1584 $chaps = $this->object->getTree()->getChilds(
1585 $this->object->getTree()->getRootId()
1586 );
1587 $s_chaps = array();
1588 foreach ($chaps as $chap) {
1589 if ($chap["type"] == "chap") {
1590 $s_chaps[$chap["child"]] = $chap["title"];
1591 }
1592 }
1593 $cur_chap = $_SESSION["sahs_cur_chap"]
1594 ? $_SESSION["sahs_cur_chap"]
1595 : 0;
1596
1597 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1598 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1599 $options = array(
1600 "0" => $lng->txt("all")
1601 );
1602 $options = $options + $s_chaps;
1603 $si = new ilSelectInputGUI($lng->txt("chapter"), "chapter");
1604 $si->setOptions($options);
1605 $si->setValue($cur_chap);
1606 $ilToolbar->addInputItem($si, true);
1607 $ilToolbar->addFormButton($lng->txt("change"), "selectLObjChapter");
1608
1609 include_once("./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
1610 $obj_table = new ilObjectivesAlignmentTableGUI(
1611 $this,
1612 "showLearningObjectivesAlignment",
1613 $this->getEditTree(),
1614 $this->object,
1615 $cur_chap
1616 );
1617 $tpl->setContent($obj_table->getHTML());
1618 }
TableGUI class for learning objectives alignments.

References $_SESSION, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $si, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, and getEditTree().

+ Here is the call graph for this function:

◆ showOrganization()

ilObjSCORM2004LearningModuleGUI::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.

Definition at line 1871 of file class.ilObjSCORM2004LearningModuleGUI.php.

1878 {
1879 $lng = $this->lng;
1881 $tpl = $this->tpl;
1882
1883 if ($a_form_action == "") {
1884 $a_form_action = $ilCtrl->getFormAction($this);
1885 }
1886
1887 if ($a_icon == "") {
1888 $a_title = $this->object->getTitle();
1889 $a_icon = ilUtil::getImagePath("icon_lm.svg");
1890 }
1891
1892 $slm_tree = $this->getEditTree();
1893
1894 if ($a_top_node == 0) {
1895 $a_top_node = $slm_tree->getRootId();
1896 }
1897
1898 if (is_null($a_gui_obj)) {
1899 $a_gui_obj = $this;
1900 $a_gui_cmd = "showOrganization";
1901 }
1902
1903 $ilCtrl->setParameter($this, "backcmd", "showOrganization");
1904 include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1905 $form_gui = new ilSCORM2004OrganizationHFormGUI();
1906 $form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
1907 $form_gui->setFormAction($a_form_action);
1908 // $form_gui->setTitle($a_title);
1909 // $form_gui->setIcon($a_icon);
1910 $form_gui->setTree($slm_tree);
1911 $form_gui->setCurrentTopNodeId($a_top_node);
1912 $form_gui->addMultiCommand($lng->txt("delete"), "deleteNodes");
1913 $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
1914 $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
1915 $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
1916 $form_gui->addCommand($lng->txt("expand_all"), "expandAll");
1917 $form_gui->addCommand($lng->txt("collapse_all"), "collapseAll");
1918 $form_gui->setTriggeredUpdateCommand("saveAllTitles");
1919
1920 // highlighted nodes
1921 if ($_GET["highlight"] != "") {
1922 $hl = explode(":", $_GET["highlight"]);
1923 $form_gui->setHighlightedNodes($hl);
1924 $form_gui->setFocusId($hl[0]);
1925 }
1926
1927 $ilCtrl->setParameter($this, "active_node", $_GET["obj_id"]);
1928 // $form_gui->setExplorerUpdater("tree", "tree_div",
1929 // $ilCtrl->getLinkTarget($this, "showTree", "", true));
1930 $sc_tpl = new ilTemplate("tpl.scormeditor_orga_screen.html", true, true, "Modules/Scorm2004");
1931 $sc_tpl->setVariable("ORGANIZATION", $form_gui->getHTML());
1932 $sc_tpl->setVariable("NOTES", $this->getNotesHTML());
1933
1934 $tpl->setContent($sc_tpl->get());
1935 }

References $_GET, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, getEditTree(), ilUtil\getImagePath(), and getNotesHTML().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSequencing()

ilObjSCORM2004LearningModuleGUI::showSequencing ( )

Show Sequencing.

Definition at line 1431 of file class.ilObjSCORM2004LearningModuleGUI.php.

1432 {
1433 $tpl = $this->tpl;
1434 $lng = $this->lng;
1435 $ilTabs = $this->tabs;
1436 $ilToolbar = $this->toolbar;
1438
1439 $ilTabs->setTabActive("sahs_sequencing");
1440
1441 include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1442
1443 if (!$this->object->getSequencingExpertMode()) {
1444 $ilToolbar->addButton(
1445 $lng->txt("sahs_activate_expert_mode"),
1446 $ilCtrl->getLinkTarget($this, "confirmExpertMode")
1447 );
1448 } else {
1449 include_once("./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
1450 $list = new ilNestedList();
1451 $t = $this->object->getTree();
1452 $root_node = $t->getNodeData($t->getRootId());
1453 $nodes = $this->object->getTree()->getSubtree($root_node);
1454 foreach ($nodes as $node) {
1455 if (in_array($node["type"], array("", "chap", "sco"))) {
1456 $ntpl = new ilTemplate("tpl.seq_node.html", true, true, "Modules/Scorm2004");
1457 $ntpl->setVariable("NODE_ID", $node["child"]);
1458 if ($node["type"] == "") {
1459 $ntpl->setVariable("TITLE", $this->object->getTitle());
1460 $item = new ilSCORM2004Item($this->object->getId(), true);
1461 } else {
1462 $ntpl->setVariable("TITLE", $node["title"]);
1463 $item = new ilSCORM2004Item($node["child"]);
1464 }
1465 $ntpl->setVariable(
1466 "SEQ_INFO",
1467 ilUtil::prepareFormOutput($item->exportAsXML(false))
1468 );
1469 $list->addListNode($ntpl->get(), $node["child"], $node["parent"]);
1470 }
1471 }
1472
1473 $tb = new ilToolbarGUI();
1474 $tb->addFormButton($lng->txt("save"), "saveSequencing");
1475 $ftpl = new ilTemplate("tpl.sequencing.html", true, true, "Modules/Scorm2004");
1476 $ftpl->setVariable("CONTENT", $list->getHTML());
1477 $ftpl->setVariable("FORM_ACTION", $ilCtrl->getFormAction($this));
1478 $ftpl->setVariable("TB", $tb->getHTML());
1479 $tpl->setContent($ftpl->get());
1480 }
1481 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public

References ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, and ilUtil\prepareFormOutput().

+ Here is the call graph for this function:

◆ showTrackingItems()

ilObjSCORM2004LearningModuleGUI::showTrackingItems ( )

Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar.

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 1262 of file class.ilObjSCORM2004LearningModuleGUI.php.

1263 {
1264 $ilTabs = $this->tabs;
1265 $ilAccess = $this->access;
1266
1267 $ilTabs->setTabActive('cont_tracking_data');
1268
1269 if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
1271 $ilTabs->setSubTabActive('cont_tracking_byuser');
1272
1273 $reports = array('exportSelectedSuccess','exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportObjGlobalToSystem');
1274
1275 $userSelected = "all";
1276 if (isset($_GET["userSelected"])) {
1277 $userSelected = ilUtil::stripSlashes($_GET["userSelected"]);
1278 }
1279 if (isset($_POST["userSelected"])) {
1280 $userSelected = ilUtil::stripSlashes($_POST["userSelected"]);
1281 }
1282 $this->ctrl->setParameter($this, 'userSelected', $userSelected);
1283
1284 $report = "choose";
1285 if (isset($_GET["report"])) {
1286 $report = ilUtil::stripSlashes($_GET["report"]);
1287 }
1288 if (isset($_POST["report"])) {
1289 $report = ilUtil::stripSlashes($_POST["report"]);
1290 }
1291 $this->ctrl->setParameter($this, 'report', $report);
1292
1293 include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerUserFilterGUI.php';
1294 $filter = new ilSCORM2004TrackingItemsPerUserFilterGUI($this, 'showTrackingItems');
1295 $filter->parse($userSelected, $report, $reports);
1296 if ($report == "choose") {
1297 $this->tpl->setContent($filter->form->getHTML());
1298 } else {
1299 $usersSelected = array();
1300 if ($userSelected != "all") {
1301 $usersSelected[] = $userSelected;
1302 } else {
1303 include_once "Services/Tracking/classes/class.ilTrQuery.php";
1304 $users = ilTrQuery::getParticipantsForObject($this->ref_id);
1305 foreach ($users as $user) {
1306 if (ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr') {
1307 $usersSelected[] = $user;
1308 }
1309 }
1310 }
1311 $scosSelected = array();
1312 $tmpscos = $this->object->getTrackedItems();
1313 for ($i = 0; $i < count($tmpscos); $i++) {
1314 $scosSelected[] = $tmpscos[$i]["id"];
1315 }
1316 //with check for course ...
1317 // include_once "Services/Tracking/classes/class.ilTrQuery.php";
1318 // $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
1319 // var_dump($this->object->getTrackedUsers(""));
1320 include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
1321 $tbl = new ilSCORM2004TrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItems', $usersSelected, $scosSelected, $report);
1322 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
1323 }
1324 } elseif ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
1325 $this->modifyTrackingItems();
1326 }
1327 return true;
1328 }
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.

References $_GET, $_POST, ilObjectGUI\$access, $i, $tabs, ilObjectGUI\$user, ilObject\_exists(), ilTrQuery\getParticipantsForObject(), ilObjSCORMLearningModuleGUI\modifyTrackingItems(), ilObjSCORMLearningModuleGUI\setSubTabs(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ showTrackingItemsBySco()

ilObjSCORM2004LearningModuleGUI::showTrackingItemsBySco ( )
protected

show tracking data

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 1208 of file class.ilObjSCORM2004LearningModuleGUI.php.

1209 {
1210 $ilTabs = $this->tabs;
1211
1212
1214 $ilTabs->setTabActive("cont_tracking_data");
1215 $ilTabs->setSubTabActive("cont_tracking_bysco");
1216
1217 $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers');
1218
1219 $scoSelected = "all";
1220 if (isset($_GET["scoSelected"])) {
1221 $scoSelected = ilUtil::stripSlashes($_GET["scoSelected"]);
1222 }
1223 if (isset($_POST["scoSelected"])) {
1224 $scoSelected = ilUtil::stripSlashes($_POST["scoSelected"]);
1225 }
1226 $this->ctrl->setParameter($this, 'scoSelected', $scoSelected);
1227
1228 $report = "choose";
1229 if (isset($_GET["report"])) {
1230 $report = ilUtil::stripSlashes($_GET["report"]);
1231 }
1232 if (isset($_POST["report"])) {
1233 $report = ilUtil::stripSlashes($_POST["report"]);
1234 }
1235 $this->ctrl->setParameter($this, 'report', $report);
1236
1237 include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerScoFilterGUI.php';
1238 $filter = new ilSCORM2004TrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
1239 $filter->parse($scoSelected, $report, $reports);
1240 if ($report == "choose") {
1241 $this->tpl->setContent($filter->form->getHTML());
1242 } else {
1243 $scosSelected = array();
1244 if ($scoSelected != "all") {
1245 $scosSelected[] = $scoSelected;
1246 } else {
1247 $tmpscos = $this->object->getTrackedItems();
1248 for ($i = 0; $i < count($tmpscos); $i++) {
1249 $scosSelected[] = $tmpscos[$i]["id"];
1250 }
1251 }
1252 //with check for course ...
1253 include_once "Services/Tracking/classes/class.ilTrQuery.php";
1254 $a_users = ilTrQuery::getParticipantsForObject($this->ref_id);
1255 // var_dump($this->object->getTrackedUsers(""));
1256 include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
1257 $tbl = new ilSCORM2004TrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
1258 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
1259 }
1260 return true;
1261 }

References $_GET, $_POST, $i, $tabs, ilTrQuery\getParticipantsForObject(), ilObjSCORMLearningModuleGUI\setSubTabs(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ showTree()

ilObjSCORM2004LearningModuleGUI::showTree ( )

Show Editing Tree.

Definition at line 1335 of file class.ilObjSCORM2004LearningModuleGUI.php.

1336 {
1338 $lng = $this->lng;
1339
1340 $mtree = new ilTree($this->object->getId());
1341 $mtree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1342 $mtree->setTreeTablePK("slm_id");
1343
1344 if ($_POST["expandAll"] != "") {
1345 $_GET["scexpand"] = "";
1346 $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
1347 $n_arr = array();
1348 foreach ($stree as $n) {
1349 $n_arr[] = $n["child"];
1350 }
1351 $_SESSION["scexpand"] = $n_arr;
1352 }
1353
1354 if ($_POST["collapseAll"] != "") {
1355 $_GET["scexpand"] = "";
1356 $_SESSION["scexpand"] = array($mtree->readRootId());
1357 }
1358
1359 $this->tpl = new ilGlobalTemplate("tpl.main.html", true, true);
1360 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1361
1362 $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
1363
1364 $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
1365 $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
1366
1367 $this->tpl->setCurrentBlock("exp2_button");
1368 $this->tpl->setVariable("CMD_EXP2_BTN", "expandAll");
1369 $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("expand_all"));
1370 $this->tpl->parseCurrentBlock();
1371
1372 $this->tpl->setCurrentBlock("exp2_button");
1373 $this->tpl->setVariable("CMD_EXP2_BTN", "collapseAll");
1374 $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("collapse_all"));
1375 $this->tpl->parseCurrentBlock();
1376
1377 require_once("./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
1378 $exp = new ilSCORM2004EditorExplorer(
1379 $this->ctrl->getLinkTarget($this, "edit"),
1380 $this->object
1381 );
1382 $exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
1383 $exp->setTargetGet("obj_id");
1384 $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "showTree"));
1385
1386 if ($_GET["scexpand"] == "") {
1387 $expanded = $mtree->readRootId();
1388 } else {
1389 $expanded = $_GET["scexpand"];
1390 }
1391
1392 //echo "-".$_GET["active_node"]."-";
1393 if ($_GET["active_node"] != "") {
1394 $path = $mtree->getPathId($_GET["active_node"]);
1395 $exp->setForceOpenPath($path);
1396
1397 $exp->highlightNode($_GET["active_node"]);
1398 }
1399 $exp->setExpand($expanded);
1400
1401 // build html-output
1402 $exp->setOutput(0);
1403 $output = $exp->getOutput();
1404
1405 // asynchronous output
1406 if ($ilCtrl->isAsynch()) {
1407 echo $output;
1408 exit;
1409 }
1410
1411 $this->tpl->setCurrentBlock("content");
1412 $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
1413 $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
1414 $this->tpl->setVariable("EXPLORER", $output);
1415 $this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
1416 $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
1417 $this->tpl->parseCurrentBlock();
1418
1419 include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
1420 iljQueryUtil::initjQuery($this->tpl);
1421
1422 $this->tpl->printToStdout(false);
1423
1424
1425 exit;
1426 }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template

References $_GET, $_POST, $_SESSION, ilObjSCORMLearningModuleGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $n, exit, ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), and iljQueryUtil\initjQuery().

+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjSCORM2004LearningModuleGUI::$error
protected

◆ $help

ilObjSCORM2004LearningModuleGUI::$help
protected

Definition at line 40 of file class.ilObjSCORM2004LearningModuleGUI.php.

Referenced by getTabs().

◆ $rbacsystem

ilObjSCORM2004LearningModuleGUI::$rbacsystem
protected

Definition at line 35 of file class.ilObjSCORM2004LearningModuleGUI.php.

Referenced by properties(), and saveGlossary().

◆ $tabs

◆ $tool_context

ilObjSCORM2004LearningModuleGUI::$tool_context
protected

Definition at line 50 of file class.ilObjSCORM2004LearningModuleGUI.php.


The documentation for this class was generated from the following file: