ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
All Data Structures Namespaces Files Functions Variables Typedefs Modules Pages
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...
 
 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 ()
 
 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...
 
 newModuleVersion ()
 upload new version of module More...
 
 getMaxFileSize ()
 
 newModuleVersionUpload ()
 
 saveProperties ()
 save properties More...
 
 showTrackingItems ()
 Show tracking table 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 ()
 
 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 ()
 
 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 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 ()
 list childs of current object 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...
 

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 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...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs 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
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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.

public

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

References $DIC, ilObjectGUI\$lng, settings(), and user().

53  {
54  global $DIC;
55 
56  $this->lng = $DIC->language();
57  $this->access = $DIC->access();
58  $this->ctrl = $DIC->ctrl();
59  $this->tpl = $DIC["tpl"];
60  $this->tabs = $DIC->tabs();
61  $this->rbacsystem = $DIC->rbac()->system();
62  $this->tree = $DIC->repositoryTree();
63  $this->toolbar = $DIC->toolbar();
64  $this->settings = $DIC->settings();
65  $this->help = $DIC["ilHelp"];
66  $this->error = $DIC["ilErr"];
67  $this->user = $DIC->user();
68  $lng = $DIC->language();
69 
70  $lng->loadLanguageModule("content");
71  $lng->loadLanguageModule("sahs");
72  $lng->loadLanguageModule("search");
73  $lng->loadLanguageModule("exp");
74  $this->type = "sahs";
75  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
76  #$this->tabs_gui = new ilTabsGUI();
77  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ activateExpertMode()

ilObjSCORM2004LearningModuleGUI::activateExpertMode ( )

Activate expert mode.

Parameters

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

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

1505  {
1506  $ilCtrl = $this->ctrl;
1507  $lng = $this->lng;
1508 
1509  $this->object->setSequencingExpertMode(true);
1510  $this->object->update();
1511  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1512  $ilCtrl->redirect($this, "showSequencing");
1513  }
global $ilCtrl
Definition: ilias.php:18

◆ assignGlossary()

ilObjSCORM2004LearningModuleGUI::assignGlossary ( )

Assign glossary.

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$tpl, ilObjectGUI\$tree, IL_FM_POSITIVE, and ilGlossarySelectorGUI\setSelectableTypes().

991  {
992  $tpl = $this->tpl;
994  $tree = $this->tree;
995 
996  include_once("./Modules/Scorm2004/classes/class.ilGlossarySelectorGUI.php");
997  $exp = new ilGlossarySelectorGUI(
998  $ilCtrl->getLinkTarget($this, "selectGlossary"),
999  "ilobjscorm2004learningmodulegui"
1000  );
1001  $exp->setSelectableTypes(array("glo"));
1002 
1003  if ($_GET["expand"] == "") {
1004  $expanded = $tree->readRootId();
1005  } else {
1006  $expanded = $_GET["expand"];
1007  }
1008  $exp->setExpand($expanded);
1009 
1010  $exp->setTargetGet("glo_id");
1011  //$this->ctrl->setParameter($this, "target_type", $a_type);
1012  //$ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
1013  $exp->setParamsGet($this->ctrl->getParameterArray($this, "assignGlossary"));
1014 
1015  // filter
1016  $exp->setFiltered(true);
1017  $exp->setFilterMode(IL_FM_POSITIVE);
1018  $exp->addFilter("root");
1019  $exp->addFilter("cat");
1020  $exp->addFilter("grp");
1021  $exp->addFilter("fold");
1022  $exp->addFilter("crs");
1023  $exp->addFilter("glo");
1024 
1025  $exp->setOutput(0);
1026 
1027  $tpl->setContent($exp->getOutput());
1028  }
Select file for being added into file lists.
$_GET["client_id"]
const IL_FM_POSITIVE
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ assignObject()

ilObjSCORM2004LearningModuleGUI::assignObject ( )

assign scorm object to scorm gui object

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

1046  {
1047  if ($this->id != 0) {
1048  if ($this->call_by_reference) {
1049  $this->object = new ilObjSCORM2004LearningModule($this->id, true);
1050  } else {
1051  $this->object = new ilObjSCORM2004LearningModule($this->id, false);
1052  }
1053  }
1054  }
Class ilObjSCORM2004LearningModule.

◆ cancelDelete()

ilObjSCORM2004LearningModuleGUI::cancelDelete ( )

cancel delete

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

References $_GET.

2534  {
2535  $this->ctrl->redirect($this, $_GET["backcmd"]);
2536  }
$_GET["client_id"]

◆ cancelDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::cancelDeleteExportFile ( )

cancel deletion of export files

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

References ilSession\clear().

2913  {
2914  ilSession::clear("ilExportFiles");
2915  $this->ctrl->redirect($this, "showExportList");
2916  }
static clear($a_var)
Unset a value.
+ Here is the call graph for this function:

◆ collapseAll()

ilObjSCORM2004LearningModuleGUI::collapseAll (   $a_redirect = true)

Collapse all.

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

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

2432  {
2433  $_GET["scexpand"] = "";
2434  $mtree = $this->object->getTree();
2435  $n_id = ($_GET["obj_id"] > 0)
2436  ? $_GET["obj_id"]
2437  : $mtree->readRootId();
2438  $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2439  $old = $_SESSION["scexpand"];
2440  foreach ($stree as $n) {
2441  if (in_array($n["child"], $old) && $n["child"] != $n_id) {
2442  $k = array_search($n["child"], $old);
2443  unset($old[$k]);
2444  }
2445  }
2446  $_SESSION["scexpand"] = $old;
2447  $this->saveAllTitles($a_redirect);
2448  }
$_SESSION["AccountId"]
$_GET["client_id"]
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
$n
Definition: RandomTest.php:85
+ Here is the call graph for this function:

◆ confirmDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::confirmDeleteExportFile ( )

confirmation screen for export file deletion

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

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

2882  {
2883  if (!isset($_POST["file"])) {
2884  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
2885  $this->ctrl->redirect($this, "showExportList");
2886  }
2887 
2888  ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
2889  $export_files = $this->object->getExportFiles();
2890 
2891  include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
2892  $table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList', true);
2893  $data = array();
2894  foreach ($export_files as $exp_file) {
2895  foreach ($_POST['file'] as $delete_file) {
2896  if (strcmp($delete_file, $exp_file['file']) == 0) {
2897  $public_str = ($exp_file["file"] == $this->object->getPublicExportFile($exp_file["type"]))
2898  ? " <b>(" . $this->lng->txt("public") . ")<b>"
2899  : "";
2900  $file_arr = explode("__", $exp_file["file"]);
2901  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));
2902  }
2903  }
2904  }
2905  $table_gui->setData($data);
2906  $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
2907  }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Date and time handling
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSCORM2004LearningModuleGUI::confirmedDelete (   $a_redirect = true)

Delete chapters/scos/pages.

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

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

2542  {
2543  $ilCtrl = $this->ctrl;
2544 
2545  $tree = new ilTree($this->object->getId());
2546  $tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2547  $tree->setTreeTablePK("slm_id");
2548 
2549  // delete all selected objects
2550  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2551  foreach ($_POST["id"] as $id) {
2552  if ($id != IL_FIRST_NODE) {
2553  $obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2554  $node_data = $tree->getNodeData($id);
2555  if (is_object($obj)) {
2556  $obj->setSLMId($this->object->getId());
2557 
2558  /*include_once("./Services/History/classes/class.ilHistory.php");
2559  ilHistory::_createEntry($this->object->getId(), "delete_".$obj->getType(),
2560  array(ilLMObject::_lookupTitle($id), $id),
2561  $this->object->getType());*/
2562 
2563  $obj->delete();
2564  }
2565  if ($tree->isInTree($id)) {
2566  $tree->deleteTree($node_data);
2567  }
2568  }
2569  }
2570 
2571  // check the tree
2572  // $this->object->checkTree();
2573 
2574  // feedback
2575  ilUtil::sendInfo($this->lng->txt("info_deleted"), true);
2576 
2577  if ($a_redirect) {
2578  $ilCtrl->redirect($this, "showOrganization");
2579  }
2580  }
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
$_POST["username"]
+ Here is the call graph for this function:

◆ confirmExpertMode()

ilObjSCORM2004LearningModuleGUI::confirmExpertMode ( )

Confirm activation of expert mode.

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

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

1480  {
1481  $ilCtrl = $this->ctrl;
1482  $tpl = $this->tpl;
1483  $lng = $this->lng;
1484  $ilTabs = $this->tabs;
1485 
1486  $ilTabs->setTabActive("sahs_sequencing");
1487 
1488  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1489  $cgui = new ilConfirmationGUI();
1490  $cgui->setFormAction($ilCtrl->getFormAction($this));
1491  $cgui->setHeaderText($lng->txt("sahs_activate_expert_mode_info"));
1492  $cgui->setCancel($lng->txt("cancel"), "showSequencing");
1493  $cgui->setConfirm($lng->txt("sahs_activate_expert_mode"), "activateExpertMode");
1494 
1495  $tpl->setContent($cgui->getHTML());
1496  }
global $ilCtrl
Definition: ilias.php:18
Confirmation screen class.

◆ confirmLMChapterInsert()

ilObjSCORM2004LearningModuleGUI::confirmLMChapterInsert ( )

Confirm lm chapter insert.

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

References insertLMChapterClip().

2791  {
2792  $this->insertLMChapterClip(true);
2793  }
insertLMChapterClip($a_confirm=false, $a_perform=false)
Insert chapter from clipboard.
+ Here is the call graph for this function:

◆ copyItems()

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

Copy items to clipboard.

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

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

2602  {
2603  $ilCtrl = $this->ctrl;
2604  $lng = $this->lng;
2605 
2606  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2607 
2608  $items = ilUtil::stripSlashesArray($_POST["id"]);
2609  $todel = array(); // delete IDs < 0 (needed for non-js editing)
2610  foreach ($items as $k => $item) {
2611  if ($item < 0) {
2612  $todel[] = $k;
2613  }
2614  }
2615  foreach ($todel as $k) {
2616  unset($items[$k]);
2617  }
2618  if (!ilSCORM2004Node::uniqueTypesCheck($items)) {
2619  ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2620  $ilCtrl->redirect($this, $a_return);
2621  }
2622  ilSCORM2004Node::clipboardCopy($this->object->getId(), $items);
2623 
2624  // @todo: move this to a service since it can be used here, too
2625  include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2627  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
2628 
2629  $ilCtrl->redirect($this, $a_return);
2630  }
static clipboardCopy($a_slm_obj_id, $a_ids)
Copy a set of chapters/pages/scos into the clipboard.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters or all scos)
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.
static setAction($a_action)
$_POST["username"]
+ Here is the call graph for this function:

◆ createGlossary()

ilObjSCORM2004LearningModuleGUI::createGlossary ( )

Create glossary.

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

References ilObjectGUI\$tpl, and initGlossaryCreationForm().

911  {
912  $tpl = $this->tpl;
913 
914  $this->initGlossaryCreationForm();
915  $tpl->setContent($this->form->getHTML());
916  }
+ Here is the call graph for this function:

◆ createStyle()

ilObjSCORM2004LearningModuleGUI::createStyle ( )

Create Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1155  {
1156  $ilCtrl = $this->ctrl;
1157 
1158  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1159  }
global $ilCtrl
Definition: ilias.php:18

◆ cutItems()

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

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

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

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

2636  {
2637  $ilCtrl = $this->ctrl;
2638  $lng = $this->lng;
2639 
2640  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2641 
2642  $items = ilUtil::stripSlashesArray($_POST["id"]);
2643  $todel = array(); // delete IDs < 0 (needed for non-js editing)
2644  foreach ($items as $k => $item) {
2645  if ($item < 0) {
2646  $todel[] = $k;
2647  }
2648  }
2649  foreach ($todel as $k) {
2650  unset($items[$k]);
2651  }
2652 
2653  if (!ilSCORM2004Node::uniqueTypesCheck($items)) {
2654  ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2655  $ilCtrl->redirect($this, $a_return);
2656  }
2657 
2658  ilSCORM2004Node::clipboardCut($this->object->getId(), $items);
2659 
2660  include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2662 
2663  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
2664 
2665  $ilCtrl->redirect($this, $a_return);
2666  }
static clipboardCut($a_slm_obj_id, $a_ids)
Cut and copy a set of chapters/pages into the clipboard.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters or all scos)
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.
static setAction($a_action)
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteExportFile()

ilObjSCORM2004LearningModuleGUI::deleteExportFile ( )

delete export files

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

References $_POST.

2923  {
2924  include_once "./Services/Utilities/classes/class.ilUtil.php";
2925  $export = new ilSCORM2004Export($this->object);
2926  foreach ($_POST['file'] as $idx => $file) {
2927  $export_dir = $export->getExportDirectoryForType($_POST['type'][$idx]);
2928  $exp_file = $export_dir . "/" . $file;
2929  if (@is_file($exp_file)) {
2930  unlink($exp_file);
2931  }
2932  }
2933  ilUtil::sendSuccess($this->lng->txt('msg_deleted_export_files'), true);
2934  $this->ctrl->redirect($this, "showExportList");
2935  }
$_POST["username"]

◆ deleteNodes()

ilObjSCORM2004LearningModuleGUI::deleteNodes (   $a_form_action = "")

confirm deletion screen of chapters/scos/pages

Parameters
stringform action

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

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

2485  {
2486  $lng = $this->lng;
2487  $tpl = $this->tpl;
2488  $ilErr = $this->error;
2489 
2490  if (!isset($_POST["id"])) {
2491  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
2492  }
2493 
2494  // SAVE POST VALUES
2495  $_SESSION["saved_post"] = $_POST["id"];
2496 
2497  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2498  $confirmation_gui = new ilConfirmationGUI();
2499 
2500  if ($a_form_action == "") {
2501  $cmd = ($_GET["backcmd"] == "")
2502  ? "showOrganization"
2503  : $_GET["backcmd"];
2504  $this->ctrl->setParameter($this, "backcmd", $cmd);
2505  $a_form_action = $this->ctrl->getFormAction($this);
2506  }
2507  $confirmation_gui->setFormAction($a_form_action);
2508  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
2509 
2510  // Add items to delete
2511  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2512  foreach ($_POST["id"] as $id) {
2513  if ($id != IL_FIRST_NODE) {
2514  $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2515  $confirmation_gui->addItem(
2516  "id[]",
2517  $node_obj->getId(),
2518  $node_obj->getTitle(),
2519  ilUtil::getImagePath("icon_" . $node_obj->getType() . ".svg")
2520  );
2521  }
2522  }
2523 
2524  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
2525  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
2526 
2527  $tpl->setContent($confirmation_gui->getHTML());
2528  }
$_SESSION["AccountId"]
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
const IL_FIRST_NODE
Definition: class.ilTree.php:5
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteStyle()

ilObjSCORM2004LearningModuleGUI::deleteStyle ( )

Delete Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1175  {
1176  $ilCtrl = $this->ctrl;
1177 
1178  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1179  }
global $ilCtrl
Definition: ilias.php:18

◆ detachGlossary()

ilObjSCORM2004LearningModuleGUI::detachGlossary ( )

Detach glossary.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

899  {
901 
902  $this->object->setAssignedGlossary(0);
903  $this->object->update();
904  $ilCtrl->redirect($this, "properties");
905  }
global $ilCtrl
Definition: ilias.php:18

◆ downloadExportFile()

ilObjSCORM2004LearningModuleGUI::downloadExportFile ( )

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

References $_GET, and ilUtil\deliverFile().

2871  {
2872  $export = new ilSCORM2004Export($this->object);
2873 
2874  $export_dir = $export->getExportDirectoryForType($_GET['type']);
2875  ilUtil::deliverFile($export_dir . "/" . $_GET['file'], $_GET['file']);
2876  }
$_GET["client_id"]
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ editOrganization()

ilObjSCORM2004LearningModuleGUI::editOrganization (   $a_to_organization = true)

Edit organization (called from listgui, must setup frameset)

Parameters

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

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

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

◆ editStyle()

ilObjSCORM2004LearningModuleGUI::editStyle ( )

Edit Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1165  {
1166  $ilCtrl = $this->ctrl;
1167 
1168  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1169  }
global $ilCtrl
Definition: ilias.php:18

◆ editStyleProperties()

ilObjSCORM2004LearningModuleGUI::editStyleProperties ( )

Edit Stlye Properties.

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

References ilObjectGUI\$tpl, and initStylePropertiesForm().

1060  {
1061  $tpl = $this->tpl;
1062 
1063  $this->initStylePropertiesForm();
1064  $tpl->setContent($this->form->getHTML());
1065  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjSCORM2004LearningModuleGUI::executeCommand ( )

execute command

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

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

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

◆ expandAll()

ilObjSCORM2004LearningModuleGUI::expandAll (   $a_redirect = true)

Expand all.

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

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

2413  {
2414  $_GET["scexpand"] = "";
2415  $mtree = $this->object->getTree();
2416  $n_id = ($_GET["obj_id"] > 0)
2417  ? $_GET["obj_id"]
2418  : $mtree->readRootId();
2419  $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2420  $n_arr = array();
2421  foreach ($stree as $n) {
2422  $n_arr[] = $n["child"];
2423  $_SESSION["scexpand"] = $n_arr;
2424  }
2425  $this->saveAllTitles($a_redirect);
2426  }
$_SESSION["AccountId"]
$_GET["client_id"]
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
$n
Definition: RandomTest.php:85
+ Here is the call graph for this function:

◆ exportHTML()

ilObjSCORM2004LearningModuleGUI::exportHTML ( )

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

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

◆ exportHTMLOne()

ilObjSCORM2004LearningModuleGUI::exportHTMLOne ( )

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

2843  {
2844  $export = new ilScorm2004Export($this->object, 'HTMLOne');
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.

◆ exportISO()

ilObjSCORM2004LearningModuleGUI::exportISO ( )

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

References $error, and ilObjectGUI\$ilErr.

2851  {
2852  $ilErr = $this->error;
2853 
2854  $export = new ilScorm2004Export($this->object, 'ISO');
2855  if (!$export->buildExportFile()) {
2856  if (!PATH_TO_MKISOFS) {
2857  $ilErr->raiseError($this->lng->txt("no_mkisofs_configured"), $ilErr->MESSAGE);
2858  }
2859  }
2860  $this->ctrl->redirect($this, "showExportList");
2861  }
Export class for SCORM 2004 object.

◆ exportPDF()

ilObjSCORM2004LearningModuleGUI::exportPDF ( )

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

2864  {
2865  $export = new ilScorm2004Export($this->object, 'PDF');
2866  $export->buildExportFile();
2867  $this->ctrl->redirect($this, "showExportList");
2868  }
Export class for SCORM 2004 object.

◆ exportScorm12()

ilObjSCORM2004LearningModuleGUI::exportScorm12 ( )

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

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

◆ exportScorm2004_3rd()

ilObjSCORM2004LearningModuleGUI::exportScorm2004_3rd ( )

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

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

◆ exportScorm2004_4th()

ilObjSCORM2004LearningModuleGUI::exportScorm2004_4th ( )

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

2811  {
2812  $export = new ilScorm2004Export($this->object, 'SCORM 2004 4th');
2813  $export->buildExportFile();
2814  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2815  $this->ctrl->redirect($this, "showExportList");
2816  }
Export class for SCORM 2004 object.

◆ 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 206 of file class.ilObjSCORM2004LearningModuleGUI.php.

References exit.

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

◆ getEditTree()

ilObjSCORM2004LearningModuleGUI::getEditTree ( )

Get editing tree object.

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

References ilTree\setTreeTablePK().

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

1854  {
1855  $slm_tree = new ilTree($this->object->getId());
1856  $slm_tree->setTreeTablePK("slm_id");
1857  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1858  return $slm_tree;
1859  }
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNotesHTML()

ilObjSCORM2004LearningModuleGUI::getNotesHTML (   $a_mode = "")

Get notes HTML.

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

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

Referenced by showOrganization().

1934  {
1935  $ilCtrl = $this->ctrl;
1936  $ilAccess = $this->access;
1938 
1939  // notes
1940  $ilCtrl->setParameter($this, "nodes_mode", $a_mode);
1941  include_once("Services/Notes/classes/class.ilNoteGUI.php");
1942  $node_id = $_GET["obj_id"];
1943  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1944  $node_type = ($node_id > 0)
1945  ? ilSCORM2004Node::_lookupType($node_id)
1946  : "sahs";
1947 
1948  $notes_gui = new ilNoteGUI(
1949  $this->object->getId(),
1950  (int) $node_id,
1951  $node_type
1952  );
1953  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]) && $ilSetting->get("comments_del_tutor", 1)) {
1954  $notes_gui->enablePublicNotesDeletion(true);
1955  }
1956  $notes_gui->enablePrivateNotes();
1957  $notes_gui->enablePublicNotes();
1958 
1959  $next_class = $ilCtrl->getNextClass($this);
1960  if ($next_class == "ilnotegui") {
1961  $html = $this->ctrl->forwardCommand($notes_gui);
1962  } else {
1963  $html = $notes_gui->getNotesHTML();
1964  }
1965  return $html;
1966  }
$_GET["client_id"]
Notes GUI class.
global $ilCtrl
Definition: ilias.php:18
static _lookupType($a_obj_id)
Lookup Type.
global $ilSetting
Definition: privfeed.php:17
$html
Definition: example_001.php:87
+ 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 778 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by properties().

779  {
780  $values = array();
781 
782  if (ilObject::_lookupType($this->object->getAssignedGlossary()) == "glo") {
783  $values["glossary"] = ilObject::_lookupTitle($this->object->getAssignedGlossary());
784  } else {
785  $values["glossary"] = $this->lng->txt("cont_no_glossary");
786  }
787  $values["q_tries"] = $this->object->getTries();
788  $values["localization"] = $this->object->getLocalization();
789  $values["style_id"] = $this->object->getStyleSheetId();
790 
791  $this->form->setValuesByArray($values);
792  }
static _lookupTitle($a_id)
lookup object title
$values
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjSCORM2004LearningModuleGUI::getTabs ( )

Adds tabs to tab gui object.

Parameters
object$tabs_guiilTabsGUI object

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

References ilObjectGUI\$access, and $help.

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

◆ initGlossaryCreationForm()

ilObjSCORM2004LearningModuleGUI::initGlossaryCreationForm ( )

Init glossary creation form.

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

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilFormPropertyGUI\setRequired(), and ilFormPropertyGUI\setTitle().

Referenced by createGlossary(), and saveGlossary().

922  {
923  $lng = $this->lng;
925 
926  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
927  $this->form = new ilPropertyFormGUI();
928 
929  // title
930  $ti = new ilTextInputGUI($lng->txt("title"), "title");
931  $ti->setRequired(true);
932  $this->form->addItem($ti);
933 
934  // description
935  $ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
936  $this->form->addItem($ta);
937 
938  $this->form->addCommandButton("saveGlossary", $lng->txt("save"));
939  $this->form->addCommandButton("properties", $lng->txt("cancel"));
940 
941  $this->form->setTitle($lng->txt("cont_glo_create"));
942  $this->form->setFormAction($ilCtrl->getFormAction($this));
943  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title)
Set Title.
This class represents a text property in a property form.
This class represents a text area property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPropertiesEditableForm()

ilObjSCORM2004LearningModuleGUI::initPropertiesEditableForm ( )

Init properties (editable) form.

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, $l, ilObjectGUI\$lng, PHPMailer\PHPMailer\$options, ilObjectGUI\$settings, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilUtil\formSelect(), ilNonEditableValueGUI\setInfo(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), and ilNonEditableValueGUI\setValue().

Referenced by properties(), and saveProperties().

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

◆ initPropertiesForm()

ilObjSCORM2004LearningModuleGUI::initPropertiesForm ( )

Initialize properties form.

Parameters

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

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, PHPMailer\PHPMailer\$options, $si, ilObjSAHSLearningModule\_lookupSubType(), ilSubEnabledFormPropertyGUI\addSubItem(), ilSCORMOfflineMode\checkIfAnyoneIsInOfflineMode(), ilObjectGUI\getObjectService(), ilCheckboxInputGUI\setChecked(), ilNumberInputGUI\setMaxLength(), ilTextInputGUI\setMaxLength(), ilSelectInputGUI\setOptions(), ilCheckboxInputGUI\setValue(), ilRadioOption\setValue(), ilNonEditableValueGUI\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by properties(), and saveProperties().

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

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

Referenced by editStyleProperties().

1071  {
1072  $ilCtrl = $this->ctrl;
1073  $lng = $this->lng;
1074  $ilTabs = $this->tabs;
1076 
1077  $lng->loadLanguageModule("style");
1078  $this->setSubTabs("settings", "style");
1079  $ilTabs->setTabActive("settings");
1080 
1081  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1082  $this->form = new ilPropertyFormGUI();
1083 
1084  $fixed_style = $ilSetting->get("fixed_content_style_id");
1085  $style_id = $this->object->getStyleSheetId();
1086 
1087  if ($fixed_style > 0) {
1088  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
1089  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1090  $this->lng->txt("global_fixed") . ")");
1091  $this->form->addItem($st);
1092  } else {
1094  true,
1095  false,
1096  $_GET["ref_id"]
1097  );
1098 
1099  $st_styles[0] = $this->lng->txt("default");
1100  ksort($st_styles);
1101 
1102  if ($style_id > 0) {
1103  // individual style
1104  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1105  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
1106  $st->setValue(ilObject::_lookupTitle($style_id));
1107  $this->form->addItem($st);
1108 
1109  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1110 
1111  // delete command
1112  $this->form->addCommandButton(
1113  "editStyle",
1114  $lng->txt("cont_edit_style")
1115  );
1116  $this->form->addCommandButton(
1117  "deleteStyle",
1118  $lng->txt("cont_delete_style")
1119  );
1120  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1121  }
1122  }
1123 
1124  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1125  $style_sel = ilUtil::formSelect(
1126  $style_id,
1127  "style_id",
1128  $st_styles,
1129  false,
1130  true
1131  );
1132  $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
1133  $style_sel->setOptions($st_styles);
1134  $style_sel->setValue($style_id);
1135  $this->form->addItem($style_sel);
1136  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1137  $this->form->addCommandButton(
1138  "saveStyleSettings",
1139  $lng->txt("save")
1140  );
1141  $this->form->addCommandButton(
1142  "createStyle",
1143  $lng->txt("sty_create_ind_style")
1144  );
1145  }
1146  }
1147  $this->form->setTitle($lng->txt("cont_style"));
1148  $this->form->setFormAction($ilCtrl->getFormAction($this));
1149  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupStandard($a_id)
Lookup standard flag.
global $ilCtrl
Definition: ilias.php:18
setOptions($a_options)
Set Options.
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.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:17
+ 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 2064 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2065  {
2066  $ilCtrl = $this->ctrl;
2067  $lng = $this->lng;
2068 
2069  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2070 
2071  $slm_tree = new ilTree($this->object->getId());
2072  $slm_tree->setTreeTablePK("slm_id");
2073  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2074 
2077 
2078  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
2079  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2080 
2081  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2082  $parent_id = $slm_tree->getParentId($node_id);
2083  $target = $node_id;
2084  } else { // insert as first child
2085  $parent_id = $node_id;
2087  }
2088 
2089  $ass_ids = array();
2090  for ($i = 1; $i <= $num; $i++) {
2091  $ass = new ilSCORM2004Asset($this->object);
2092  $ass->setTitle($lng->txt("sahs_new_asset"));
2093  $ass->setSLMId($this->object->getId());
2094  $ass->create();
2095  ilSCORM2004Node::putInTree($ass, $parent_id, $target);
2096  $ass_ids[] = $ass->getId();
2097  }
2098  $ass_ids = array_reverse($ass_ids);
2099  $ass_ids = implode(":", $ass_ids);
2100 
2101  if ($a_redirect) {
2102  $ilCtrl->setParameter($this, "highlight", $ass_ids);
2103  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2104  }
2105  return array("node_id" => $node_id, "items" => $ass_ids);
2106  }
static getPostMulti()
Get multi number of _POST input.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Class ilSCORM2004Asset.
$i
Definition: disco.tpl.php:19
$target
Definition: test.php:19
+ Here is the call graph for this function:

◆ insertAssetClip()

ilObjSCORM2004LearningModuleGUI::insertAssetClip ( )

Insert assets from clipboard.

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

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

2708  {
2709  $ilCtrl = $this->ctrl;
2710  $ilUser = $this->user;
2711 
2712  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2713  ilSCORM2004Node::insertAssetClip($this->object);
2714 
2715  $ilCtrl->redirect(
2716  $this,
2717  "showOrganization",
2719  );
2720  }
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
static insertAssetClip($a_slm_obj, $a_type="ass")
Insert assets from clipboard.
+ Here is the call graph for this function:

◆ insertChapter()

ilObjSCORM2004LearningModuleGUI::insertChapter (   $a_redirect = true)

Insert (multiple) chapters at node.

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

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

1972  {
1973  $ilCtrl = $this->ctrl;
1974  $lng = $this->lng;
1975 
1976  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1977 
1978  $slm_tree = new ilTree($this->object->getId());
1979  $slm_tree->setTreeTablePK("slm_id");
1980  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1981 
1984 
1985  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
1986  $parent_id = $slm_tree->getParentId($node_id);
1987  $target = $node_id;
1988  } else { // insert as first child
1989  $parent_id = $node_id;
1991  }
1992  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
1993  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1994 
1995  $chap_ids = array();
1996  for ($i = 1; $i <= $num; $i++) {
1997  $chap = new ilSCORM2004Chapter($this->object);
1998  $chap->setTitle($lng->txt("sahs_new_chapter"));
1999  $chap->setSLMId($this->object->getId());
2000  $chap->create();
2001  ilSCORM2004Node::putInTree($chap, $parent_id, $target);
2002  $chap_ids[] = $chap->getId();
2003  }
2004  $chap_ids = array_reverse($chap_ids);
2005  $chap_ids = implode(":", $chap_ids);
2006 
2007  if ($a_redirect) {
2008  $ilCtrl->setParameter($this, "highlight", $chap_ids);
2009  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2010  }
2011  return array("node_id" => $node_id, "items" => $chap_ids);
2012  }
static getPostMulti()
Get multi number of _POST input.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static getPostNodeId()
Get node ID of _POST input.
Class ilSCORM2004Chapter.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
$i
Definition: disco.tpl.php:19
$target
Definition: test.php:19
+ Here is the call graph for this function:

◆ insertChapterClip()

ilObjSCORM2004LearningModuleGUI::insertChapterClip ( )

Insert chapter from clipboard.

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

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

2726  {
2727  $ilCtrl = $this->ctrl;
2728  $ilUser = $this->user;
2729 
2730  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2731  ilSCORM2004Node::insertChapterClip($this->object);
2732 
2733  $ilCtrl->redirect(
2734  $this,
2735  "showOrganization",
2737  );
2738  }
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
static insertChapterClip($a_slm_obj, $a_as_sub=false)
Insert Chapter from clipboard.
+ Here is the call graph for this function:

◆ insertLMChapterClip()

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

Insert chapter from clipboard.

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

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

Referenced by confirmLMChapterInsert().

2744  {
2745  $ilCtrl = $this->ctrl;
2746  $tpl = $this->tpl;
2747  $ilToolbar = $this->toolbar;
2748  $ilCtrl = $this->ctrl;
2749  $lng = $this->lng;
2750  $ilTabs = $this->tabs;
2751 
2752  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2753 
2754 
2755  $pf = "";
2756  foreach (ilSCORM2004OrganizationHFormGUI::getPostFields() as $f => $v) {
2757  $pf .= '<input type="hidden" name="' . $f . '" value="' . $v . '" />';
2758  }
2759  if ($a_confirm && is_array($_POST["node"])) {
2760  foreach ($_POST["node"] as $f => $v) {
2761  $pf .= '<input type="hidden" name="node[' . $f . ']" value="' . $v . '" />';
2762  }
2763  }
2764 
2765 
2768 
2769  include_once("./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
2770  $form = new ilLMChapterImportForm($this->object, $node_id, $first_child, $a_confirm);
2771  $tpl->setContent($form->getHTML() . $pf . "</form>");
2772 
2773  $ilTabs->clearTargets();
2774  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2775  if ($a_confirm) {
2776  if ($form->isCorrect()) {
2777  $ilToolbar->addFormButton($lng->txt("insert"), "performLMChapterInsert");
2778  }
2779  $ilToolbar->addFormButton($lng->txt("back"), "insertLMChapterClip");
2780  } else {
2781  $ilToolbar->addFormButton($lng->txt("check"), "confirmLMChapterInsert");
2782  }
2783  $ilToolbar->addFormButton($lng->txt("cancel"), "showOrganization");
2784  $ilToolbar->setCloseFormTag(false);
2785  }
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFields()
Get all post fields.
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
if(isset($_POST['submit'])) $form
$_POST["username"]
+ 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 2111 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2112  {
2113  $ilCtrl = $this->ctrl;
2114  $lng = $this->lng;
2115 
2116  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2117 
2118  $slm_tree = new ilTree($this->object->getId());
2119  $slm_tree->setTreeTablePK("slm_id");
2120  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2121 
2124 
2125  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2126  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2127  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2128  $parent_id = $slm_tree->getParentId($node_id);
2129  $target = $node_id;
2130  } else { // insert as first child
2131  $parent_id = $node_id;
2133  }
2134 
2135  $page_ids = array();
2136  for ($i = 1; $i <= $num; $i++) {
2137  $page = new ilSCORM2004PageNode($this->object);
2138  $page->setTitle($lng->txt("sahs_new_page"));
2139  $page->setSLMId($this->object->getId());
2140  $page->create();
2141  ilSCORM2004Node::putInTree($page, $parent_id, $target);
2142  $page_ids[] = $page->getId();
2143  }
2144  $page_ids = array_reverse($page_ids);
2145  $page_ids = implode(":", $page_ids);
2146 
2147  if ($a_redirect) {
2148  $ilCtrl->setParameter($this, "highlight", $page_ids);
2149  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2150  }
2151  return array("node_id" => $node_id, "items" => $page_ids);
2152  }
Class ilSCORM2004PageNode.
static getPostMulti()
Get multi number of _POST input.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
$i
Definition: disco.tpl.php:19
$target
Definition: test.php:19
+ Here is the call graph for this function:

◆ insertPageClip()

ilObjSCORM2004LearningModuleGUI::insertPageClip ( )

Insert pages from clipboard.

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

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

2672  {
2673  $ilCtrl = $this->ctrl;
2674  $ilUser = $this->user;
2675 
2676  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2677  ilSCORM2004Node::insertPageClip($this->object);
2678 
2679  $ilCtrl->redirect(
2680  $this,
2681  "showOrganization",
2683  );
2684  }
static getPostNodeId()
Get node ID of _POST input.
static insertPageClip($a_slm_obj)
Insert pages from clipboard.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ insertScenario()

ilObjSCORM2004LearningModuleGUI::insertScenario ( )

Insert sequencing scenario at node.

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

References $_POST, ilObjectGUI\$ctrl, $id, $ilCtrl, $target, $template, IL_FIRST_NODE, and ilTree\setTreeTablePK().

2236  {
2237  $ilCtrl = $this->ctrl;
2238 
2239  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2240 
2241  $slm_tree = new ilTree($this->object->getId());
2242  $slm_tree->setTreeTablePK("slm_id");
2243  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2244 
2245  $node_id = $_POST["node_id"];
2246 
2247  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2248  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2249  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2250 
2251  if (!$_POST["first_child"]) { // insert after node id
2252  $parent_id = $slm_tree->getParentId($node_id);
2253  $target = $node_id;
2254  } else { // insert as first child
2255  $parent_id = $node_id;
2257  }
2258 
2259  $template = new ilSCORM2004SeqTemplate($_POST["identifier"]);
2260  $id = $template->insertTemplateForObjectAtParent($this->object, $parent_id, $target);
2261  $ilCtrl->setParameter($this, "highlight", $id);
2262  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2263  }
$template
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Class ilSCORM2004Chapter.
$target
Definition: test.php:19
$_POST["username"]
+ Here is the call graph for this function:

◆ insertScenarioGUI()

ilObjSCORM2004LearningModuleGUI::insertScenarioGUI ( )

Insert sequencing scenario at node.

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

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

2159  {
2160  $ilCtrl = $this->ctrl;
2161  $lng = $this->lng;
2162  $tpl = $this->tpl;
2163 
2164  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2165  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2166 
2167  $templates = array();
2168  $description = null;
2169  $image = null;
2170 
2171  $default_identifier = $_POST["identifier"];
2172 
2173  //get available templates
2174  $arr_templates = ilSCORM2004SeqTemplate::availableTemplates();
2175 
2176  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_seq_chooser.html", "Modules/Scorm2004");
2177 
2178  $this->tpl->setCurrentBlock("option_item");
2179 
2180  $active = null;
2181  foreach ($arr_templates as $templ) {
2182  $sel = "";
2183  $item_data = $templ->getMetadataProperties();
2184  $item_data['identifier'] = $templ->getIdentifier();
2185  array_push($templates, $item_data);
2186  if ($default_identifier == $item_data['identifier']) {
2187  $sel = 'selected';
2188  $active = $item_data;
2189  }
2190  $this->tpl->setVariable("VAL_SELECTED", $sel);
2191  $this->tpl->setVariable("VAL_IDENTIFIER", $item_data['identifier']);
2192  $this->tpl->setVariable("VAL_TITLE", $item_data['title']);
2193  $this->tpl->parseCurrentBlock();
2194  }
2195 
2196  //default
2197  if ($active == null) {
2198  $this->saveAllTitles(false);
2199  $description = $templates[0]['description'];
2200  $image = $templates[0]['thumbnail'];
2201  } else {
2202  $description = $active['description'];
2203  $image = $active['thumbnail'];
2204  }
2205 
2206  $this->tpl->setVariable("VAL_DESCRIPTION", $description);
2207  $this->tpl->setVariable("VAL_IMAGE", ilSCORM2004SeqTemplate::SEQ_TEMPLATE_DIR . "/images/" . $image);
2208 
2209  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2210  $this->tpl->setVariable("BTN_NAME", "insertScenario");
2211  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2212  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2213  $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2214 
2215  $this->tpl->setVariable("TXT_TITLE", "Choose Sequencing Template");
2216 
2217  $node_id = $_POST["node_id"];
2218  $first_child = $_POST["first_child"];
2219 
2220  if (!$node_id) {
2222  }
2223  if (!$first_child) {
2225  }
2226 
2227  $this->tpl->setVariable("VAL_NODE_ID", $node_id);
2228  $this->tpl->setVariable("VAL_FIRST_CHILD", $first_child);
2229  }
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
$_POST["username"]
+ Here is the call graph for this function:

◆ insertSco()

ilObjSCORM2004LearningModuleGUI::insertSco (   $a_redirect = true)

Insert (multiple) scos at node.

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

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

2018  {
2019  $ilCtrl = $this->ctrl;
2020  $lng = $this->lng;
2021 
2022  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2023 
2024  $slm_tree = new ilTree($this->object->getId());
2025  $slm_tree->setTreeTablePK("slm_id");
2026  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2027 
2030 
2031  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
2032  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2033 
2034  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2035  $parent_id = $slm_tree->getParentId($node_id);
2036  $target = $node_id;
2037  } else { // insert as first child
2038  $parent_id = $node_id;
2040  }
2041 
2042  $sco_ids = array();
2043  for ($i = 1; $i <= $num; $i++) {
2044  $sco = new ilSCORM2004Sco($this->object);
2045  $sco->setTitle($lng->txt("sahs_new_sco"));
2046  $sco->setSLMId($this->object->getId());
2047  $sco->create();
2048  ilSCORM2004Node::putInTree($sco, $parent_id, $target);
2049  $sco_ids[] = $sco->getId();
2050  }
2051  $sco_ids = array_reverse($sco_ids);
2052  $sco_ids = implode(":", $sco_ids);
2053 
2054  if ($a_redirect) {
2055  $ilCtrl->setParameter($this, "highlight", $sco_ids);
2056  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2057  }
2058  return array("node_id" => $node_id, "items" => $sco_ids);
2059  }
static getPostMulti()
Get multi number of _POST input.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
Class ilSCORM2004Sco.
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
$i
Definition: disco.tpl.php:19
$target
Definition: test.php:19
+ Here is the call graph for this function:

◆ insertScoClip()

ilObjSCORM2004LearningModuleGUI::insertScoClip ( )

Insert scos from clipboard.

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

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

2690  {
2691  $ilCtrl = $this->ctrl;
2692  $ilUser = $this->user;
2693 
2694  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2695  ilSCORM2004Node::insertScoClip($this->object);
2696 
2697  $ilCtrl->redirect(
2698  $this,
2699  "showOrganization",
2701  );
2702  }
static getPostNodeId()
Get node ID of _POST input.
static insertScoClip($a_slm_obj)
Insert scos from clipboard.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ insertSpecialPage()

ilObjSCORM2004LearningModuleGUI::insertSpecialPage (   $a_redirect = true)

Insert special page.

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

References insertTemplateGUI().

2269  {
2270  $this->insertTemplateGUI($a_redirect, true);
2271  }
insertTemplateGUI($a_redirect=true, $a_special_page=false)
Displays GUI to select template for page.
+ Here is the call graph for this function:

◆ insertTemplate()

ilObjSCORM2004LearningModuleGUI::insertTemplate (   $a_redirect = true)

Insert (multiple) pages at node.

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

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

2361  {
2362  $ilCtrl = $this->ctrl;
2363  $lng = $this->lng;
2364 
2365  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2366 
2367  $slm_tree = new ilTree($this->object->getId());
2368  $slm_tree->setTreeTablePK("slm_id");
2369  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2370 
2371  $num = $_POST["multi"];
2372  $node_id = $_POST["node_id"];
2373  $layout_id = $_POST["layout_id"];
2374 
2375 
2376  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2377  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2378 
2379  if (!$_POST["first_child"]) { // insert after node id
2380  $parent_id = $slm_tree->getParentId($node_id);
2381  $target = $node_id;
2382  } else { // insert as first child
2383  $parent_id = $node_id;
2385  }
2386 
2387  $page_ids = array();
2388  for ($i = 1; $i <= $num; $i++) {
2389  $page = new ilSCORM2004PageNode($this->object);
2390  $page->setTitle($lng->txt("sahs_new_page"));
2391  $page->setSLMId($this->object->getId());
2392  $page->create(false, $layout_id);
2393  ilSCORM2004Node::putInTree($page, $parent_id, $target);
2394  $page_ids[] = $page->getId();
2395  }
2396  $page_ids = array_reverse($page_ids);
2397  $page_ids = implode(":", $page_ids);
2398 
2399  if ($a_redirect) {
2400  if ($_GET["obj_id"] != "") {
2401  $this->jumpToNode($node_id, $page_ids);
2402  } else {
2403  $ilCtrl->setParameter($this, "highlight", $page_ids);
2404  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2405  }
2406  }
2407  }
jumpToNode($a_anchor_node="", $a_highlight_ids="")
Class ilSCORM2004PageNode.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
$i
Definition: disco.tpl.php:19
$target
Definition: test.php:19
$_POST["username"]
+ 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 2277 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by insertSpecialPage().

2278  {
2279  $ilCtrl = $this->ctrl;
2280  $lng = $this->lng;
2281  $tpl = $this->tpl;
2282 
2283  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2284 
2285  $arr_templates = ilPageLayout::activeLayouts($a_special_page, ilPageLayout::MODULE_SCORM);
2286 
2287  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_page_layout_chooser.html", "Modules/Scorm2004");
2288 
2289  $this->tpl->setCurrentBlock("option_item");
2290 
2291  $count = 0;
2292  foreach ($arr_templates as $templ) {
2293  $count++;
2294  $sel = "";
2295  $templ->readObject();
2296  $this->tpl->setVariable("VAL_LAYOUT_TITLE", $templ->getTitle());
2297  $this->tpl->setVariable("VAL_LAYOUT_IMAGE", $templ->getPreview());
2298  $this->tpl->setVariable("VAL_LAYOUT_ID", $templ->getId());
2299  $this->tpl->setVariable("VAL_DISPLAY", "inline");
2300  if ($count == 1) {
2301  $this->tpl->setVariable("VAL_CHECKED", "checked");
2302  }
2303  if ($count % 4 == 0) {
2304  $this->tpl->setVariable("END_ROW", "</tr>");
2305  }
2306  if ($count == 1 || ($count - 1) % 4 == 0) {
2307  $this->tpl->setVariable("BEGIN_ROW", "<tr>");
2308  }
2309  $this->tpl->parseCurrentBlock();
2310  }
2311 
2312  //matrix table
2313  if ($count % 4 != 0) {
2314  $rest = 4 - ($count % 4);
2315  } else {
2316  $rest = 0;
2317  }
2318 
2319  for ($i = 1;$i <= $rest;$i++) {
2320  $this->tpl->setVariable("VAL_DISPLAY", "none");
2321  $this->tpl->setVariable("VAL_LAYOUT_ID", $templ->getId());
2322 
2323  if ($i == $rest) {
2324  $this->tpl->setVariable("END_ROW", "</tr>");
2325  }
2326  $this->tpl->parseCurrentBlock();
2327  }
2328 
2329  //empty cells and closing <tr>
2330 
2331  $this->tpl->setVariable("VAL_NODE_ID", ilSCORM2004OrganizationHFormGUI::getPostNodeId());
2332  $this->tpl->setVariable("VAL_MULTI", ilSCORM2004OrganizationHFormGUI::getPostMulti());
2333  $this->tpl->setVariable("VAL_FIRST_CHILD", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2334  $this->tpl->setVariable("VAL_OBJ_ID", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2335 
2336  $ilCtrl->saveParameter($this, "obj_id");
2337 
2338  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2339 
2340  $this->tpl->setVariable("BTN_NAME", "insertTemplate");
2341  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2342  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("create"));
2343  $this->tpl->setVariable("CMD_CANCEL", "showOrganization");
2344 
2345  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2346  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2347  $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2348  if ($a_special_page) {
2349  $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_special_page"));
2350  } else {
2351  $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_page_template"));
2352  }
2353  }
static getPostMulti()
Get multi number of _POST input.
$rest
Definition: goto.php:46
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
$i
Definition: disco.tpl.php:19
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
+ 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 221 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by insertTemplate().

222  {
224 
225  $anchor = ($a_anchor_node != "")
226  ? "node_" . $a_anchor_node
227  : "";
228 
229  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
231  $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
232  switch ($type) {
233  case "sco":
234  $ilCtrl->setParameterByClass("ilscorm2004scogui", "highlight", $a_highlight_ids);
235  $ilCtrl->redirectByClass("ilscorm2004scogui", "showOrganization", $anchor);
236  // no break
237  case "ass":
238  $ilCtrl->setParameterByClass("ilscorm2004assetgui", "highlight", $a_highlight_ids);
239  $ilCtrl->redirectByClass("ilscorm2004assetgui", "showOrganization", $anchor);
240  // no break
241  case "chap":
242  $ilCtrl->setParameterByClass("ilscorm2004chaptergui", "highlight", $a_highlight_ids);
243  $ilCtrl->redirectByClass("ilscorm2004chaptergui", "showOrganization", $anchor);
244  // no break
245  case "seqc":
246  $ilCtrl->setParameterByClass("ilscorm2004seqchaptergui", "highlight", $a_highlight_ids);
247  $ilCtrl->redirectByClass("ilscorm2004seqchaptergui", "showOrganization", $anchor);
248  // no break
249  case "page":
250  $ilCtrl->redirectByClass("ilscorm2004pagenodegui", "edit");
251  }
252  }
$type
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static _lookupType($a_obj_id)
Lookup Type.
+ 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 2798 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2799  {
2802 
2803  include_once("./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
2804  $form = new ilLMChapterImportForm($this->object, $node_id, $first_child);
2805  $form->performInserts();
2806  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2807  $this->ctrl->redirect($this, "showOrganization");
2808  }
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) ...
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ preview()

ilObjSCORM2004LearningModuleGUI::preview ( )

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

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

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

◆ proceedDragDrop()

ilObjSCORM2004LearningModuleGUI::proceedDragDrop ( )

Perform drag and drop action.

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

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

2586  {
2587  $ilCtrl = $this->ctrl;
2588 
2589  $this->object->executeDragDrop(
2590  $_POST["il_hform_source_id"],
2591  $_POST["il_hform_target_id"],
2592  $_POST["il_hform_fc"],
2593  $_POST["il_hform_as_subitem"]
2594  );
2595  $ilCtrl->redirect($this, "showOrganization");
2596  }
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]

◆ properties()

ilObjSCORM2004LearningModuleGUI::properties ( )

Scorm 2004 module properties.

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

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

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

◆ publishExportFile()

ilObjSCORM2004LearningModuleGUI::publishExportFile ( )

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

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

2941  {
2942  $ilErr = $this->error;
2943 
2944  if (!isset($_POST["file"])) {
2945  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
2946  }
2947  if (count($_POST["file"]) > 1) {
2948  $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
2949  }
2950 
2951  $export = new ilSCORM2004Export($this->object);
2952  $file = $_POST['file'][0];
2953  $type = $_POST['type'][$_POST['file'][0]];
2954 
2955  if ($this->object->getPublicExportFile($type) == $file) {
2956  $this->object->setPublicExportFile($type, "");
2957  } else {
2958  $this->object->setPublicExportFile($type, $file);
2959  }
2960  $this->object->update();
2961  $this->ctrl->redirect($this, "showExportList");
2962  }
$type
$_POST["username"]

◆ saveAllTitles()

ilObjSCORM2004LearningModuleGUI::saveAllTitles (   $a_redirect = true)

Save all titles of chapters/scos/pages.

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

References $_POST, ilObjectGUI\$ctrl, $id, $ilCtrl, $title, ilSCORM2004Node\_writeTitle(), ilMD\getGeneral(), ilSCORM2004NodeFactory\getInstance(), ilUtil\stripSlashes(), and ilMDBase\update().

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

2454  {
2455  $ilCtrl = $this->ctrl;
2456 
2457  if (is_array($_POST["title"])) {
2458  include_once("./Services/MetaData/classes/class.ilMD.php");
2459  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2460  foreach ($_POST["title"] as $id => $title) {
2461  $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2462  if (is_object($node_obj)) {
2463  // Update Title and description
2464  $md = new ilMD($this->object->getId(), $id, $node_obj->getType());
2465  $md_gen = $md->getGeneral();
2466  $md_gen->setTitle(ilUtil::stripSlashes($title));
2467  $md_gen->update();
2468  $md->update();
2470  }
2471  }
2472  }
2473  if ($a_redirect) {
2474  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2475  $ilCtrl->redirect($this, "showOrganization");
2476  }
2477  }
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
& getGeneral()
Definition: class.ilMD.php:40
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static _writeTitle($a_obj_id, $a_title)
Write Title.
$_POST["username"]
+ 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 948 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

949  {
950  $tpl = $this->tpl;
951  $lng = $this->lng;
954  $tree = $this->tree;
955 
956  $parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
957  if (!$rbacsystem->checkAccess("create", $parent_ref_id, "glo")) {
958  ilUtil::sendFailure($lng->txt("no_permission"), true);
959  $ilCtrl->redirect($this, "properties");
960  }
961 
962  $this->initGlossaryCreationForm();
963  if ($this->form->checkInput()) {
964  include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
965  $newObj = new ilObjGlossary();
966  $newObj->setType("glo");
967  $newObj->setTitle($_POST["title"]);
968  $newObj->setDescription($_POST["description"]);
969  $newObj->setVirtualMode("none");
970  $newObj->create();
971  $newObj->createReference();
972  $newObj->putInTree($parent_ref_id);
973  $newObj->setPermissions($parent_ref_id);
974 
975  // perform save
976  $this->object->setAssignedGlossary($newObj->getId());
977  $this->object->update();
978 
979  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
980  $ilCtrl->redirect($this, "properties");
981  }
982 
983  $this->form->setValuesByPost();
984  $tpl->setContent($this->form->getHtml());
985  }
$_GET["client_id"]
Class ilObjGlossary.
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveProperties()

ilObjSCORM2004LearningModuleGUI::saveProperties ( )

save scorm 2004 module properties

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

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

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

◆ saveSequencing()

ilObjSCORM2004LearningModuleGUI::saveSequencing ( )

Save sequencing.

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

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

1520  {
1521  $tpl = $this->tpl;
1522  $lng = $this->lng;
1523  $ilCtrl = $this->ctrl;
1524 
1525  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1526  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
1527  $t = $this->object->getTree();
1528  $root_node = $t->getNodeData($t->getRootId());
1529  $nodes = $this->object->getTree()->getSubtree($root_node);
1530  foreach ($nodes as $node) {
1531  if (in_array($node["type"], array("", "chap", "sco"))) {
1532  if ($node["type"] == "") {
1533  $item = new ilSCORM2004Item($this->object->getId(), true);
1534  } else {
1535  $item = new ilSCORM2004Item($node["child"]);
1536  }
1537  $xml = '<?xml version="1.0"?>' . ilUtil::stripSlashes($_POST["seq"][$node["child"]], false);
1538 
1539  $ob_texts = array();
1540  if ($node["type"] == "sco") {
1541  $sco = new ilSCORM2004Sco($this->object, $node["child"]);
1542  $objectives = $sco->getObjectives();
1543  foreach ($objectives as $o) {
1544  $ob_texts[$o->getId()] = $o->getObjectiveId();
1545  }
1546  }
1547 
1548  $item->setSeqXml($xml);
1549  $item->initDom();
1550  $item->update();
1551 
1552  if ($node["type"] == "sco") {
1553  foreach ($ob_texts as $id => $t) {
1554  $objective = new ilScorm2004Objective($node["child"], $id);
1555  $objective->setObjectiveId($t);
1556  $objective->updateObjective();
1557  }
1558  }
1559  }
1560  }
1561 
1562  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1563 
1564  $ilCtrl->redirect($this, "showSequencing");
1565  }
Class ilSCORM2004Condition.
Class ilSCORM2004Sco.
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjSCORM2004LearningModuleGUI::saveStyleSettings ( )

Save style settings.

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

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

1185  {
1187 
1188  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1189  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1190  || $this->object->getStyleSheetId() == 0)) {
1191  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1192  $this->object->update();
1193  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1194  }
1195  $this->ctrl->redirect($this, "editStyleProperties");
1196  }
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ selectExport()

ilObjSCORM2004LearningModuleGUI::selectExport ( )

Select the export type of the SCORM 2004 module.

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

References $_POST.

1625  {
1626  switch ($_POST['select_export']) {
1627  case "exportScorm12":
1628  case "exportScorm2004_3rd":
1629  case "exportScorm2004_4th":
1630  case "exportPDF":
1631  case "exportISO":
1632  case "exportHTML":
1633  case "exportHTMLOne":
1634  $this->ctrl->redirect($this, $_POST['select_export']);
1635  break;
1636  default:
1637  $this->ctrl->redirect($this, 'showExportList');
1638  break;
1639  }
1640  }
$_POST["username"]

◆ selectGlossary()

ilObjSCORM2004LearningModuleGUI::selectGlossary ( )

Select glossary.

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

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

1034  {
1035  $ilCtrl = $this->ctrl;
1036 
1037  $this->object->setAssignedGlossary(ilObject::_lookupObjId((int) $_GET["glo_ref_id"]));
1038  $this->object->update();
1039  $ilCtrl->redirect($this, "properties");
1040  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ selectLObjChapter()

ilObjSCORM2004LearningModuleGUI::selectLObjChapter ( )

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

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

1614  {
1615  $ilCtrl = $this->ctrl;
1616 
1617  $_SESSION["sahs_cur_chap"] = (int) $_POST["chapter"];
1618  $ilCtrl->redirect($this, "showLearningObjectivesAlignment");
1619  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]

◆ setSubTabs()

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

Set sub tabs.

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

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

1828  {
1829  $ilTabs = $this->tabs;
1830  $ilCtrl = $this->ctrl;
1831  $lng = $this->lng;
1832 
1833  if ($a_main_tab == "settings" &&
1834  $this->object->editable == 1) {
1835  /* // general properties
1836  $ilTabs->addSubTab("general_settings",
1837  $lng->txt("general_settings"),
1838  $ilCtrl->getLinkTarget($this, 'properties'));
1839 
1840  // style properties
1841  $ilTabs->addSubTab("style",
1842  $lng->txt("cont_style"),
1843  $ilCtrl->getLinkTarget($this, 'editStyleProperties'));
1844  */
1845  $ilTabs->activateSubTab($a_active);
1846  }
1847  }
global $ilCtrl
Definition: ilias.php:18

◆ showEditTree()

ilObjSCORM2004LearningModuleGUI::showEditTree ( )

Show tree.

Parameters

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

References ilObjectGUI\$tpl.

Referenced by executeCommand().

165  {
166  $tpl = $this->tpl;
167 
168  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorerGUI.php");
169  $exp = new ilSCORM2004EditorExplorerGUI($this, "showEditTree", $this->object);
170  if (!$exp->handleCommand()) {
171  $tpl->setLeftNavContent($exp->getHTML());
172  }
173  }
+ Here is the caller graph for this function:

◆ showExportList()

ilObjSCORM2004LearningModuleGUI::showExportList ( )

Show Export List.

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

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

1646  {
1647  $tpl = $this->tpl;
1648  $ilToolbar = $this->toolbar;
1649 
1650  $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'selectExport'));
1651  $ilToolbar->setId("scorm2004export");
1652 
1653  //$template = new ilTemplate("tpl.scorm2004_export_buttons.html", true, true, 'Modules/Scorm2004');
1654 
1655  /* $buttons = array(
1656  "exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
1657  "exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
1658  "exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
1659  "exportPDF" => $this->lng->txt("scorm_create_export_file_pdf"),
1660  "exportISO" => $this->lng->txt("scorm_create_export_file_iso"),
1661  "exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
1662  "exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
1663  );*/
1664  $buttons = array(
1665  "exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
1666  "exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
1667  "exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
1668  "exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
1669  "exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
1670  );
1671 
1672  //
1673  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1674  $si = new ilSelectInputGUI($this->lng->txt('type'), "select_export");
1675  $si->setOptions($buttons);
1676  $ilToolbar->addInputItem($si, true);
1677 
1678  $ilToolbar->addFormButton($this->lng->txt('export'), "selectExport");
1679 
1680  $export_files = $this->object->getExportFiles();
1681 
1682  include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
1683  $table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList');
1684  $data = array();
1685  foreach ($export_files as $exp_file) {
1686  $filetype = $exp_file['type'];
1687  $public_str = ($exp_file["file"] == $this->object->getPublicExportFile($filetype))
1688  ? " <b>(" . $this->lng->txt("public") . ")<b>"
1689  : "";
1690  $file_arr = explode("__", $exp_file["file"]);
1691  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));
1692  }
1693  $table_gui->setData($data);
1694 
1695  $this->tpl->setContent($table_gui->getHTML());
1696  }
This class represents a selection list property in a property form.
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
Date and time handling
+ Here is the call graph for this function:

◆ showLearningObjectivesAlignment()

ilObjSCORM2004LearningModuleGUI::showLearningObjectivesAlignment ( )

Show Learning Objectives Alignment.

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

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

1571  {
1572  $tpl = $this->tpl;
1573  $lng = $this->lng;
1574  $ilCtrl = $this->ctrl;
1575  $ilToolbar = $this->toolbar;
1576 
1577  $chaps = $this->object->getTree()->getChilds(
1578  $this->object->getTree()->getRootId()
1579  );
1580  $s_chaps = array();
1581  foreach ($chaps as $chap) {
1582  if ($chap["type"] == "chap") {
1583  $s_chaps[$chap["child"]] = $chap["title"];
1584  }
1585  }
1586  $cur_chap = $_SESSION["sahs_cur_chap"]
1587  ? $_SESSION["sahs_cur_chap"]
1588  : 0;
1589 
1590  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1591  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1592  $options = array(
1593  "0" => $lng->txt("all")
1594  );
1595  $options = $options + $s_chaps;
1596  $si = new ilSelectInputGUI($lng->txt("chapter"), "chapter");
1597  $si->setOptions($options);
1598  $si->setValue($cur_chap);
1599  $ilToolbar->addInputItem($si, true);
1600  $ilToolbar->addFormButton($lng->txt("change"), "selectLObjChapter");
1601 
1602  include_once("./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
1603  $obj_table = new ilObjectivesAlignmentTableGUI(
1604  $this,
1605  "showLearningObjectivesAlignment",
1606  $this->getEditTree(),
1607  $this->object,
1608  $cur_chap
1609  );
1610  $tpl->setContent($obj_table->getHTML());
1611  }
TableGUI class for learning objectives alignments.
$_SESSION["AccountId"]
This class represents a selection list property in a property form.
global $ilCtrl
Definition: ilias.php:18
+ 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 1864 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by executeCommand().

1871  {
1872  $lng = $this->lng;
1873  $ilCtrl = $this->ctrl;
1874  $tpl = $this->tpl;
1875 
1876  if ($a_form_action == "") {
1877  $a_form_action = $ilCtrl->getFormAction($this);
1878  }
1879 
1880  if ($a_icon == "") {
1881  $a_title = $this->object->getTitle();
1882  $a_icon = ilUtil::getImagePath("icon_lm.svg");
1883  }
1884 
1885  $slm_tree = $this->getEditTree();
1886 
1887  if ($a_top_node == 0) {
1888  $a_top_node = $slm_tree->getRootId();
1889  }
1890 
1891  if (is_null($a_gui_obj)) {
1892  $a_gui_obj = $this;
1893  $a_gui_cmd = "showOrganization";
1894  }
1895 
1896  $ilCtrl->setParameter($this, "backcmd", "showOrganization");
1897  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1898  $form_gui = new ilSCORM2004OrganizationHFormGUI();
1899  $form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
1900  $form_gui->setFormAction($a_form_action);
1901  // $form_gui->setTitle($a_title);
1902  // $form_gui->setIcon($a_icon);
1903  $form_gui->setTree($slm_tree);
1904  $form_gui->setCurrentTopNodeId($a_top_node);
1905  $form_gui->addMultiCommand($lng->txt("delete"), "deleteNodes");
1906  $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
1907  $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
1908  $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
1909  $form_gui->addCommand($lng->txt("expand_all"), "expandAll");
1910  $form_gui->addCommand($lng->txt("collapse_all"), "collapseAll");
1911  $form_gui->setTriggeredUpdateCommand("saveAllTitles");
1912 
1913  // highlighted nodes
1914  if ($_GET["highlight"] != "") {
1915  $hl = explode(":", $_GET["highlight"]);
1916  $form_gui->setHighlightedNodes($hl);
1917  $form_gui->setFocusId($hl[0]);
1918  }
1919 
1920  $ilCtrl->setParameter($this, "active_node", $_GET["obj_id"]);
1921  // $form_gui->setExplorerUpdater("tree", "tree_div",
1922  // $ilCtrl->getLinkTarget($this, "showTree", "", true));
1923  $sc_tpl = new ilTemplate("tpl.scormeditor_orga_screen.html", true, true, "Modules/Scorm2004");
1924  $sc_tpl->setVariable("ORGANIZATION", $form_gui->getHTML());
1925  $sc_tpl->setVariable("NOTES", $this->getNotesHTML());
1926 
1927  $tpl->setContent($sc_tpl->get());
1928  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
This class allows quick editing of a chapter/sco/page hierarchy.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSequencing()

ilObjSCORM2004LearningModuleGUI::showSequencing ( )

Show Sequencing.

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

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

1425  {
1426  $tpl = $this->tpl;
1427  $lng = $this->lng;
1428  $ilTabs = $this->tabs;
1429  $ilToolbar = $this->toolbar;
1430  $ilCtrl = $this->ctrl;
1431 
1432  $ilTabs->setTabActive("sahs_sequencing");
1433 
1434  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1435 
1436  if (!$this->object->getSequencingExpertMode()) {
1437  $ilToolbar->addButton(
1438  $lng->txt("sahs_activate_expert_mode"),
1439  $ilCtrl->getLinkTarget($this, "confirmExpertMode")
1440  );
1441  } else {
1442  include_once("./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
1443  $list = new ilNestedList();
1444  $t = $this->object->getTree();
1445  $root_node = $t->getNodeData($t->getRootId());
1446  $nodes = $this->object->getTree()->getSubtree($root_node);
1447  foreach ($nodes as $node) {
1448  if (in_array($node["type"], array("", "chap", "sco"))) {
1449  $ntpl = new ilTemplate("tpl.seq_node.html", true, true, "Modules/Scorm2004");
1450  $ntpl->setVariable("NODE_ID", $node["child"]);
1451  if ($node["type"] == "") {
1452  $ntpl->setVariable("TITLE", $this->object->getTitle());
1453  $item = new ilSCORM2004Item($this->object->getId(), true);
1454  } else {
1455  $ntpl->setVariable("TITLE", $node["title"]);
1456  $item = new ilSCORM2004Item($node["child"]);
1457  }
1458  $ntpl->setVariable(
1459  "SEQ_INFO",
1460  ilUtil::prepareFormOutput($item->exportAsXML(false))
1461  );
1462  $list->addListNode($ntpl->get(), $node["child"], $node["parent"]);
1463  }
1464  }
1465 
1466  $tb = new ilToolbarGUI();
1467  $tb->addFormButton($lng->txt("save"), "saveSequencing");
1468  $ftpl = new ilTemplate("tpl.sequencing.html", true, true, "Modules/Scorm2004");
1469  $ftpl->setVariable("CONTENT", $list->getHTML());
1470  $ftpl->setVariable("FORM_ACTION", $ilCtrl->getFormAction($this));
1471  $ftpl->setVariable("TB", $tb->getHTML());
1472  $tpl->setContent($ftpl->get());
1473  }
1474  }
Class ilSCORM2004Condition.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
if(isset($_REQUEST['delete'])) $list
Definition: registry.php:41
Nested List.
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
+ Here is the call graph for this function:

◆ showTrackingItems()

ilObjSCORM2004LearningModuleGUI::showTrackingItems ( )

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

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

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

◆ showTrackingItemsBySco()

ilObjSCORM2004LearningModuleGUI::showTrackingItemsBySco ( )
protected

show tracking data

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

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

1202  {
1203  $ilTabs = $this->tabs;
1204 
1205 
1207  $ilTabs->setTabActive("cont_tracking_data");
1208  $ilTabs->setSubTabActive("cont_tracking_bysco");
1209 
1210  $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers');
1211 
1212  $scoSelected = "all";
1213  if (isset($_GET["scoSelected"])) {
1214  $scoSelected = ilUtil::stripSlashes($_GET["scoSelected"]);
1215  }
1216  if (isset($_POST["scoSelected"])) {
1217  $scoSelected = ilUtil::stripSlashes($_POST["scoSelected"]);
1218  }
1219  $this->ctrl->setParameter($this, 'scoSelected', $scoSelected);
1220 
1221  $report = "choose";
1222  if (isset($_GET["report"])) {
1223  $report = ilUtil::stripSlashes($_GET["report"]);
1224  }
1225  if (isset($_POST["report"])) {
1226  $report = ilUtil::stripSlashes($_POST["report"]);
1227  }
1228  $this->ctrl->setParameter($this, 'report', $report);
1229 
1230  include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerScoFilterGUI.php';
1231  $filter = new ilSCORM2004TrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
1232  $filter->parse($scoSelected, $report, $reports);
1233  if ($report == "choose") {
1234  $this->tpl->setContent($filter->form->getHTML());
1235  } else {
1236  $scosSelected = array();
1237  if ($scoSelected != "all") {
1238  $scosSelected[] = $scoSelected;
1239  } else {
1240  $tmpscos = $this->object->getTrackedItems();
1241  for ($i = 0; $i < count($tmpscos); $i++) {
1242  $scosSelected[] = $tmpscos[$i]["id"];
1243  }
1244  }
1245  //with check for course ...
1246  include_once "Services/Tracking/classes/class.ilTrQuery.php";
1247  $a_users = ilTrQuery::getParticipantsForObject($this->ref_id);
1248  // var_dump($this->object->getTrackedUsers(""));
1249  include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
1250  $tbl = new ilSCORM2004TrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
1251  $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
1252  }
1253  return true;
1254  }
$_GET["client_id"]
$tbl
Definition: example_048.php:81
Class ilSCORM2004TrackingItemsTableGUI.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
$i
Definition: disco.tpl.php:19
$_POST["username"]
+ Here is the call graph for this function:

◆ showTree()

ilObjSCORM2004LearningModuleGUI::showTree ( )

Show Editing Tree.

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

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $n, ilObjectGUI\$object, Sabre\VObject\$output, $path, exit, ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), iljQueryUtil\initjQuery(), and ilTree\setTableNames().

1329  {
1330  $ilCtrl = $this->ctrl;
1331  $lng = $this->lng;
1332 
1333  $mtree = new ilTree($this->object->getId());
1334  $mtree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1335  $mtree->setTreeTablePK("slm_id");
1336 
1337  if ($_POST["expandAll"] != "") {
1338  $_GET["scexpand"] = "";
1339  $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
1340  $n_arr = array();
1341  foreach ($stree as $n) {
1342  $n_arr[] = $n["child"];
1343  }
1344  $_SESSION["scexpand"] = $n_arr;
1345  }
1346 
1347  if ($_POST["collapseAll"] != "") {
1348  $_GET["scexpand"] = "";
1349  $_SESSION["scexpand"] = array($mtree->readRootId());
1350  }
1351 
1352  $this->tpl = new ilTemplate("tpl.main.html", true, true);
1353  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1354 
1355  $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
1356 
1357  $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
1358  $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
1359 
1360  $this->tpl->setCurrentBlock("exp2_button");
1361  $this->tpl->setVariable("CMD_EXP2_BTN", "expandAll");
1362  $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("expand_all"));
1363  $this->tpl->parseCurrentBlock();
1364 
1365  $this->tpl->setCurrentBlock("exp2_button");
1366  $this->tpl->setVariable("CMD_EXP2_BTN", "collapseAll");
1367  $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("collapse_all"));
1368  $this->tpl->parseCurrentBlock();
1369 
1370  require_once("./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
1371  $exp = new ilSCORM2004EditorExplorer(
1372  $this->ctrl->getLinkTarget($this, "edit"),
1374  );
1375  $exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
1376  $exp->setTargetGet("obj_id");
1377  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "showTree"));
1378 
1379  if ($_GET["scexpand"] == "") {
1380  $expanded = $mtree->readRootId();
1381  } else {
1382  $expanded = $_GET["scexpand"];
1383  }
1384 
1385  //echo "-".$_GET["active_node"]."-";
1386  if ($_GET["active_node"] != "") {
1387  $path = $mtree->getPathId($_GET["active_node"]);
1388  $exp->setForceOpenPath($path);
1389 
1390  $exp->highlightNode($_GET["active_node"]);
1391  }
1392  $exp->setExpand($expanded);
1393 
1394  // build html-output
1395  $exp->setOutput(0);
1396  $output = $exp->getOutput();
1397 
1398  // asynchronous output
1399  if ($ilCtrl->isAsynch()) {
1400  echo $output;
1401  exit;
1402  }
1403 
1404  $this->tpl->setCurrentBlock("content");
1405  $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
1406  $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
1407  $this->tpl->setVariable("EXPLORER", $output);
1408  $this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
1409  $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
1410  $this->tpl->parseCurrentBlock();
1411 
1412  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
1413  iljQueryUtil::initjQuery($this->tpl);
1414 
1415  $this->tpl->show(false);
1416 
1417 
1418  exit;
1419  }
$path
Definition: aliased.php:25
$_SESSION["AccountId"]
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be &#39;obj_id&#39; You may use...
$n
Definition: RandomTest.php:85
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
exit
Definition: backend.php:16
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
$_POST["username"]
+ 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


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