ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 

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
 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
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

Member Function Documentation

◆ activateExpertMode()

ilObjSCORM2004LearningModuleGUI::activateExpertMode ( )

Activate expert mode.

Parameters

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

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, and ilUtil\sendSuccess().

1497  {
1498  $ilCtrl = $this->ctrl;
1499  $lng = $this->lng;
1500 
1501  $this->object->setSequencingExpertMode(true);
1502  $this->object->update();
1503  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1504  $ilCtrl->redirect($this, "showSequencing");
1505  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ assignGlossary()

ilObjSCORM2004LearningModuleGUI::assignGlossary ( )

Assign glossary.

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

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

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

◆ assignObject()

ilObjSCORM2004LearningModuleGUI::assignObject ( )

assign scorm object to scorm gui object

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

1038  {
1039  if ($this->id != 0) {
1040  if ($this->call_by_reference) {
1041  $this->object = new ilObjSCORM2004LearningModule($this->id, true);
1042  } else {
1043  $this->object = new ilObjSCORM2004LearningModule($this->id, false);
1044  }
1045  }
1046  }
Class ilObjSCORM2004LearningModule.

◆ cancelDelete()

ilObjSCORM2004LearningModuleGUI::cancelDelete ( )

cancel delete

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

References $_GET.

2526  {
2527  $this->ctrl->redirect($this, $_GET["backcmd"]);
2528  }
$_GET["client_id"]

◆ cancelDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::cancelDeleteExportFile ( )

cancel deletion of export files

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

References ilSession\clear().

2905  {
2906  ilSession::clear("ilExportFiles");
2907  $this->ctrl->redirect($this, "showExportList");
2908  }
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 2423 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

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

◆ confirmDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::confirmDeleteExportFile ( )

confirmation screen for export file deletion

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

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

2874  {
2875  if (!isset($_POST["file"])) {
2876  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
2877  $this->ctrl->redirect($this, "showExportList");
2878  }
2879 
2880  ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
2881  $export_files = $this->object->getExportFiles();
2882 
2883  include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
2884  $table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList', true);
2885  $data = array();
2886  foreach ($export_files as $exp_file) {
2887  foreach ($_POST['file'] as $delete_file) {
2888  if (strcmp($delete_file, $exp_file['file']) == 0) {
2889  $public_str = ($exp_file["file"] == $this->object->getPublicExportFile($exp_file["type"]))
2890  ? " <b>(" . $this->lng->txt("public") . ")<b>"
2891  : "";
2892  $file_arr = explode("__", $exp_file["file"]);
2893  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));
2894  }
2895  }
2896  }
2897  $table_gui->setData($data);
2898  $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
2899  }
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
const IL_CAL_UNIX
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.
Create styles array
The data for the language used.
$_POST["username"]
+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSCORM2004LearningModuleGUI::confirmedDelete (   $a_redirect = true)

Delete chapters/scos/pages.

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

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

2534  {
2535  $ilCtrl = $this->ctrl;
2536 
2537  $tree = new ilTree($this->object->getId());
2538  $tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2539  $tree->setTreeTablePK("slm_id");
2540 
2541  // delete all selected objects
2542  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2543  foreach ($_POST["id"] as $id) {
2544  if ($id != IL_FIRST_NODE) {
2545  $obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2546  $node_data = $tree->getNodeData($id);
2547  if (is_object($obj)) {
2548  $obj->setSLMId($this->object->getId());
2549 
2550  /*include_once("./Services/History/classes/class.ilHistory.php");
2551  ilHistory::_createEntry($this->object->getId(), "delete_".$obj->getType(),
2552  array(ilLMObject::_lookupTitle($id), $id),
2553  $this->object->getType());*/
2554 
2555  $obj->delete();
2556  }
2557  if ($tree->isInTree($id)) {
2558  $tree->deleteTree($node_data);
2559  }
2560  }
2561  }
2562 
2563  // check the tree
2564  // $this->object->checkTree();
2565 
2566  // feedback
2567  ilUtil::sendInfo($this->lng->txt("info_deleted"), true);
2568 
2569  if ($a_redirect) {
2570  $ilCtrl->redirect($this, "showOrganization");
2571  }
2572  }
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...
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the call graph for this function:

◆ confirmExpertMode()

ilObjSCORM2004LearningModuleGUI::confirmExpertMode ( )

Confirm activation of expert mode.

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

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

1472  {
1473  $ilCtrl = $this->ctrl;
1474  $tpl = $this->tpl;
1475  $lng = $this->lng;
1476  $ilTabs = $this->tabs;
1477 
1478  $ilTabs->setTabActive("sahs_sequencing");
1479 
1480  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1481  $cgui = new ilConfirmationGUI();
1482  $cgui->setFormAction($ilCtrl->getFormAction($this));
1483  $cgui->setHeaderText($lng->txt("sahs_activate_expert_mode_info"));
1484  $cgui->setCancel($lng->txt("cancel"), "showSequencing");
1485  $cgui->setConfirm($lng->txt("sahs_activate_expert_mode"), "activateExpertMode");
1486 
1487  $tpl->setContent($cgui->getHTML());
1488  }
global $ilCtrl
Definition: ilias.php:18
Confirmation screen class.

◆ confirmLMChapterInsert()

ilObjSCORM2004LearningModuleGUI::confirmLMChapterInsert ( )

Confirm lm chapter insert.

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

References insertLMChapterClip().

2783  {
2784  $this->insertLMChapterClip(true);
2785  }
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 2593 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2594  {
2595  $ilCtrl = $this->ctrl;
2596  $lng = $this->lng;
2597 
2598  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2599 
2600  $items = ilUtil::stripSlashesArray($_POST["id"]);
2601  $todel = array(); // delete IDs < 0 (needed for non-js editing)
2602  foreach ($items as $k => $item) {
2603  if ($item < 0) {
2604  $todel[] = $k;
2605  }
2606  }
2607  foreach ($todel as $k) {
2608  unset($items[$k]);
2609  }
2610  if (!ilSCORM2004Node::uniqueTypesCheck($items)) {
2611  ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2612  $ilCtrl->redirect($this, $a_return);
2613  }
2614  ilSCORM2004Node::clipboardCopy($this->object->getId(), $items);
2615 
2616  // @todo: move this to a service since it can be used here, too
2617  include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2619  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
2620 
2621  $ilCtrl->redirect($this, $a_return);
2622  }
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)
Create styles array
The data for the language used.
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.
Create new PHPExcel object
obj_idprivate
static setAction($a_action)
$_POST["username"]
+ Here is the call graph for this function:

◆ createGlossary()

ilObjSCORM2004LearningModuleGUI::createGlossary ( )

Create glossary.

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

References ilObjectGUI\$tpl, and initGlossaryCreationForm().

903  {
904  $tpl = $this->tpl;
905 
906  $this->initGlossaryCreationForm();
907  $tpl->setContent($this->form->getHTML());
908  }
+ Here is the call graph for this function:

◆ createStyle()

ilObjSCORM2004LearningModuleGUI::createStyle ( )

Create Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1147  {
1148  $ilCtrl = $this->ctrl;
1149 
1150  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1151  }
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 2627 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2628  {
2629  $ilCtrl = $this->ctrl;
2630  $lng = $this->lng;
2631 
2632  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2633 
2634  $items = ilUtil::stripSlashesArray($_POST["id"]);
2635  $todel = array(); // delete IDs < 0 (needed for non-js editing)
2636  foreach ($items as $k => $item) {
2637  if ($item < 0) {
2638  $todel[] = $k;
2639  }
2640  }
2641  foreach ($todel as $k) {
2642  unset($items[$k]);
2643  }
2644 
2645  if (!ilSCORM2004Node::uniqueTypesCheck($items)) {
2646  ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2647  $ilCtrl->redirect($this, $a_return);
2648  }
2649 
2650  ilSCORM2004Node::clipboardCut($this->object->getId(), $items);
2651 
2652  include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2654 
2655  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
2656 
2657  $ilCtrl->redirect($this, $a_return);
2658  }
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)
Create styles array
The data for the language used.
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.
Create new PHPExcel object
obj_idprivate
static setAction($a_action)
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteExportFile()

ilObjSCORM2004LearningModuleGUI::deleteExportFile ( )

delete export files

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

References $_POST, $file, and ilUtil\sendSuccess().

2915  {
2916  include_once "./Services/Utilities/classes/class.ilUtil.php";
2917  $export = new ilSCORM2004Export($this->object);
2918  foreach ($_POST['file'] as $idx => $file) {
2919  $export_dir = $export->getExportDirectoryForType($_POST['type'][$idx]);
2920  $exp_file = $export_dir . "/" . $file;
2921  if (@is_file($exp_file)) {
2922  unlink($exp_file);
2923  }
2924  }
2925  ilUtil::sendSuccess($this->lng->txt('msg_deleted_export_files'), true);
2926  $this->ctrl->redirect($this, "showExportList");
2927  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSCORM2004LearningModuleGUI::deleteNodes (   $a_form_action = "")

confirm deletion screen of chapters/scos/pages

Parameters
stringform action

Definition at line 2476 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.

2477  {
2478  $lng = $this->lng;
2479  $tpl = $this->tpl;
2480  $ilErr = $this->error;
2481 
2482  if (!isset($_POST["id"])) {
2483  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
2484  }
2485 
2486  // SAVE POST VALUES
2487  $_SESSION["saved_post"] = $_POST["id"];
2488 
2489  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2490  $confirmation_gui = new ilConfirmationGUI();
2491 
2492  if ($a_form_action == "") {
2493  $cmd = ($_GET["backcmd"] == "")
2494  ? "showOrganization"
2495  : $_GET["backcmd"];
2496  $this->ctrl->setParameter($this, "backcmd", $cmd);
2497  $a_form_action = $this->ctrl->getFormAction($this);
2498  }
2499  $confirmation_gui->setFormAction($a_form_action);
2500  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
2501 
2502  // Add items to delete
2503  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2504  foreach ($_POST["id"] as $id) {
2505  if ($id != IL_FIRST_NODE) {
2506  $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2507  $confirmation_gui->addItem(
2508  "id[]",
2509  $node_obj->getId(),
2510  $node_obj->getTitle(),
2511  ilUtil::getImagePath("icon_" . $node_obj->getType() . ".svg")
2512  );
2513  }
2514  }
2515 
2516  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
2517  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
2518 
2519  $tpl->setContent($confirmation_gui->getHTML());
2520  }
$_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 1166 of file class.ilObjSCORM2004LearningModuleGUI.php.

References ilObjectGUI\$ctrl, and $ilCtrl.

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

◆ detachGlossary()

ilObjSCORM2004LearningModuleGUI::detachGlossary ( )

Detach glossary.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

891  {
893 
894  $this->object->setAssignedGlossary(0);
895  $this->object->update();
896  $ilCtrl->redirect($this, "properties");
897  }
global $ilCtrl
Definition: ilias.php:18

◆ downloadExportFile()

ilObjSCORM2004LearningModuleGUI::downloadExportFile ( )

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

References $_GET, and ilUtil\deliverFile().

2863  {
2864  $export = new ilSCORM2004Export($this->object);
2865 
2866  $export_dir = $export->getExportDirectoryForType($_GET['type']);
2867  ilUtil::deliverFile($export_dir . "/" . $_GET['file'], $_GET['file']);
2868  }
$_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, ilSCORM2004Node\_lookupType(), and array.

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.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ editStyle()

ilObjSCORM2004LearningModuleGUI::editStyle ( )

Edit Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

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

◆ editStyleProperties()

ilObjSCORM2004LearningModuleGUI::editStyleProperties ( )

Edit Stlye Properties.

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

References ilObjectGUI\$tpl, and initStylePropertiesForm().

1052  {
1053  $tpl = $this->tpl;
1054 
1055  $this->initStylePropertiesForm();
1056  $tpl->setContent($this->form->getHTML());
1057  }
+ 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(), object, 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.
Create new PHPExcel object
obj_idprivate
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 2404 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2405  {
2406  $_GET["scexpand"] = "";
2407  $mtree = $this->object->getTree();
2408  $n_id = ($_GET["obj_id"] > 0)
2409  ? $_GET["obj_id"]
2410  : $mtree->readRootId();
2411  $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2412  $n_arr = array();
2413  foreach ($stree as $n) {
2414  $n_arr[] = $n["child"];
2415  $_SESSION["scexpand"] = $n_arr;
2416  }
2417  $this->saveAllTitles($a_redirect);
2418  }
$_SESSION["AccountId"]
$_GET["client_id"]
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
$n
Definition: RandomTest.php:85
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ exportHTML()

ilObjSCORM2004LearningModuleGUI::exportHTML ( )

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

References ilUtil\sendSuccess().

2827  {
2828  $export = new ilScorm2004Export($this->object, 'HTML');
2829  $export->buildExportFile();
2830  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2831  $this->ctrl->redirect($this, "showExportList");
2832  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Export class for SCORM 2004 object.
+ Here is the call graph for this function:

◆ exportHTMLOne()

ilObjSCORM2004LearningModuleGUI::exportHTMLOne ( )

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

References ilUtil\sendSuccess().

2835  {
2836  $export = new ilScorm2004Export($this->object, 'HTMLOne');
2837  $export->buildExportFile();
2838  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2839  $this->ctrl->redirect($this, "showExportList");
2840  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Export class for SCORM 2004 object.
+ Here is the call graph for this function:

◆ exportISO()

ilObjSCORM2004LearningModuleGUI::exportISO ( )

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

References $error, and ilObjectGUI\$ilErr.

2843  {
2844  $ilErr = $this->error;
2845 
2846  $export = new ilScorm2004Export($this->object, 'ISO');
2847  if (!$export->buildExportFile()) {
2848  if (!PATH_TO_MKISOFS) {
2849  $ilErr->raiseError($this->lng->txt("no_mkisofs_configured"), $ilErr->MESSAGE);
2850  }
2851  }
2852  $this->ctrl->redirect($this, "showExportList");
2853  }
Export class for SCORM 2004 object.

◆ exportPDF()

ilObjSCORM2004LearningModuleGUI::exportPDF ( )

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

2856  {
2857  $export = new ilScorm2004Export($this->object, 'PDF');
2858  $export->buildExportFile();
2859  $this->ctrl->redirect($this, "showExportList");
2860  }
Export class for SCORM 2004 object.

◆ exportScorm12()

ilObjSCORM2004LearningModuleGUI::exportScorm12 ( )

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

References ilUtil\sendSuccess().

2819  {
2820  $export = new ilScorm2004Export($this->object, 'SCORM 1.2');
2821  $export->buildExportFile();
2822  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2823  $this->ctrl->redirect($this, "showExportList");
2824  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Export class for SCORM 2004 object.
+ Here is the call graph for this function:

◆ exportScorm2004_3rd()

ilObjSCORM2004LearningModuleGUI::exportScorm2004_3rd ( )

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

References ilUtil\sendSuccess().

2811  {
2812  $export = new ilScorm2004Export($this->object, 'SCORM 2004 3rd');
2813  $export->buildExportFile();
2814  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2815  $this->ctrl->redirect($this, "showExportList");
2816  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Export class for SCORM 2004 object.
+ Here is the call graph for this function:

◆ exportScorm2004_4th()

ilObjSCORM2004LearningModuleGUI::exportScorm2004_4th ( )

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

References ilUtil\sendSuccess().

2803  {
2804  $export = new ilScorm2004Export($this->object, 'SCORM 2004 4th');
2805  $export->buildExportFile();
2806  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2807  $this->ctrl->redirect($this, "showExportList");
2808  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Export class for SCORM 2004 object.
+ Here is the call graph for this function:

◆ 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, and object.

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
Create new PHPExcel object
obj_idprivate

◆ getEditTree()

ilObjSCORM2004LearningModuleGUI::getEditTree ( )

Get editing tree object.

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

References object, and ilTree\setTreeTablePK().

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

1846  {
1847  $slm_tree = new ilTree($this->object->getId());
1848  $slm_tree->setTreeTablePK("slm_id");
1849  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1850  return $slm_tree;
1851  }
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
Create new PHPExcel object
obj_idprivate
+ 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 1925 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by showOrganization().

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

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

Referenced by properties().

777  {
778  $values = array();
779 
780  if (ilObject::_lookupType($this->object->getAssignedGlossary()) == "glo") {
781  $values["glossary"] = ilObject::_lookupTitle($this->object->getAssignedGlossary());
782  } else {
783  $values["glossary"] = $this->lng->txt("cont_no_glossary");
784  }
785  $values["q_tries"] = $this->object->getTries();
786  $values["localization"] = $this->object->getLocalization();
787  $values["style_id"] = $this->object->getStyleSheetId();
788 
789  $this->form->setValuesByArray($values);
790  }
static _lookupTitle($a_id)
lookup object title
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
Create new PHPExcel object
obj_idprivate
+ 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 1695 of file class.ilObjSCORM2004LearningModuleGUI.php.

References ilObjectGUI\$access, $help, array, and object.

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

◆ initGlossaryCreationForm()

ilObjSCORM2004LearningModuleGUI::initGlossaryCreationForm ( )

Init glossary creation form.

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

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

Referenced by createGlossary(), and saveGlossary().

914  {
915  $lng = $this->lng;
917 
918  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
919  $this->form = new ilPropertyFormGUI();
920 
921  // title
922  $ti = new ilTextInputGUI($lng->txt("title"), "title");
923  $ti->setRequired(true);
924  $this->form->addItem($ti);
925 
926  // description
927  $ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
928  $this->form->addItem($ta);
929 
930  $this->form->addCommandButton("saveGlossary", $lng->txt("save"));
931  $this->form->addCommandButton("properties", $lng->txt("cancel"));
932 
933  $this->form->setTitle($lng->txt("cont_glo_create"));
934  $this->form->setFormAction($ilCtrl->getFormAction($this));
935  }
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 687 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by properties(), and saveProperties().

688  {
689  $lng = $this->lng;
692 
693  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
694  $this->form = new ilPropertyFormGUI();
695 
696  // localization
697  $options = array(
698  "" => $lng->txt("please_select"),
699  );
700  $langs = $lng->getInstalledLanguages();
701  $lng->loadLanguageModule("meta");
702  foreach ($langs as $l) {
703  $options[$l] = $lng->txt("meta_l_" . $l);
704  }
705  $loc = new ilSelectInputGUI($this->lng->txt("cont_localization"), "localization");
706  $loc->setOptions($options);
707  $loc->setInfo($this->lng->txt("cont_localization_info"));
708  $this->form->addItem($loc);
709 
710  // glossary
711  $ne = new ilNonEditableValueGUI($lng->txt("obj_glo"), "glossary");
712  $ne->setInfo($lng->txt("sahs_glo_info"));
713  $this->form->addItem($ne);
714 
715  // style
716  $lng->loadLanguageModule("style");
717  $fixed_style = $ilSetting->get("fixed_content_style_id");
718  $style_id = $this->object->getStyleSheetId();
719 
720  if ($fixed_style > 0) {
721  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
722  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
723  $this->lng->txt("global_fixed") . ")");
724  $this->form->addItem($st);
725  } else {
727  true,
728  false,
729  $_GET["ref_id"]
730  );
731 
732  $st_styles[0] = $this->lng->txt("default");
733  ksort($st_styles);
734 
735  if ($style_id > 0) {
736  // individual style
737  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
738  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
739  $st->setValue(ilObject::_lookupTitle($style_id));
740  $this->form->addItem($st);
741  }
742  }
743 
744  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
745  $style_sel = ilUtil::formSelect(
746  $style_id,
747  "style_id",
748  $st_styles,
749  false,
750  true
751  );
752  $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
753  $style_sel->setOptions($st_styles);
754  $style_sel->setValue($style_id);
755  $this->form->addItem($style_sel);
756  }
757  }
758 
759  // number of tries
760  $ni = new ilNumberInputGUI($lng->txt("cont_qtries"), "q_tries");
761  $ni->setInfo($lng->txt("cont_qtries_info")); // #15133
762  $ni->setMaxLength(3);
763  $ni->setSize(3);
764  $this->form->addItem($ni);
765 
766 
767  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
768 
769  $this->form->setTitle($lng->txt("cont_scorm_ed_properties"));
770  $this->form->setFormAction($ilCtrl->getFormAction($this));
771  }
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.
Create styles array
The data for the language used.
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
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ 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, $options, $si, ilObjSAHSLearningModule\_lookupSubType(), ilSubEnabledFormPropertyGUI\addSubItem(), array, ilSCORMOfflineMode\checkIfAnyoneIsInOfflineMode(), PHPExcel\getID(), object, ilNumberInputGUI\setMaxLength(), ilTextInputGUI\setMaxLength(), ilSelectInputGUI\setOptions(), ilCheckboxInputGUI\setValue(), ilRadioOption\setValue(), ilNonEditableValueGUI\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by properties().

360  {
361  $lng = $this->lng;
363 
364  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
365  $this->form = new ilPropertyFormGUI();
366  $this->form->setFormAction($ilCtrl->getFormAction($this));
367  $this->form->setTitle($this->lng->txt("cont_lm_properties"));
368 
369  //check/select only once
370  $this->object->checkMasteryScoreValues();
371 
372  //title
373  $ti = new ilTextInputGUI($this->lng->txt("title"), "Fobject_title");
374  $ti->setMaxLength(200);
375  $ti->setValue($this->object->getTitle());
376  $this->form->addItem($ti);
377 
378  //description
379  $ti = new ilTextAreaInputGUI($this->lng->txt("description"), "Fobject_description");
380  $ti->setValue($this->object->getDescription());
381  $this->form->addItem($ti);
382 
383  // SCORM-type
384  $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
385  $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
386  $this->form->addItem($ne);
387 
388  // version
389  $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
390  $ne->setValue($this->object->getModuleVersion());
391  $ne->setInfo($this->lng->txt("cont_sc_version_info"));
392  $this->form->addItem($ne);
393 
394  //
395  // activation
396  //
397  $sh = new ilFormSectionHeaderGUI();
398  $sh->setTitle($this->lng->txt("activation"));
399  $this->form->addItem($sh);
400 
401  // online
402  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
403  $cb->setValue("y");
404  if ($this->object->getOnline()) {
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 
510  //
511  // scorm options
512  //
513  $sh = new ilFormSectionHeaderGUI();
514  $sh->setTitle($this->lng->txt("cont_scorm_options"));
515  $this->form->addItem($sh);
516 
517  // lesson mode
518  $radg = new ilRadioGroupInputGUI($lng->txt("cont_def_lesson_mode"), "lesson_mode");
519  $op0 = new ilRadioOption($this->lng->txt("cont_sc_less_mode_normal"), "normal");
520  $radg->addOption($op0);
521  $op1 = new ilRadioOption($this->lng->txt("cont_sc_less_mode_browse"), "browse");
522  $radg->addOption($op1);
523  $radg->setValue($this->object->getDefaultLessonMode());
524  // credit mode
525  $cmradg = new ilRadioGroupInputGUI($lng->txt("cont_credit_mode"), "credit_mode");
526  $cmop0 = new ilRadioOption($this->lng->txt("cont_credit_on"), "credit");
527  $cmradg->addOption($cmop0);
528  $cmop1 = new ilRadioOption($this->lng->txt("cont_credit_off"), "no_credit");
529  $cmradg->addOption($cmop1);
530  $cmradg->setValue($this->object->getCreditMode());
531  $op0->addSubItem($cmradg);
532  // set lesson mode review when completed
533  $options = array(
534  "n" => $this->lng->txt("cont_sc_auto_review_no"),
535  "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
536  "p" => $this->lng->txt("cont_sc_auto_review_passed"),
537  "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
538  "c" => $this->lng->txt("cont_sc_auto_review_completed"),
539  "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
540  "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
541  "s" => $this->lng->txt("cont_sc_store_if_previous_score_was_lower")
542  );
543  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
544  $si->setOptions($options);
545  $si->setValue($this->object->getAutoReviewChar());
546  $si->setInfo($this->lng->txt("cont_sc_auto_review_info_2004"));
547  $op0->addSubItem($si);
548  // end lesson mode
549  $this->form->addItem($radg);
550 
551 
552  // mastery_score
553  if ($this->object->getMasteryScoreValues() != "") {
554  $ni = new ilNumberInputGUI($this->lng->txt("cont_mastery_score_2004"), "mastery_score");
555  $ni->setMaxLength(3);
556  $ni->setSize(3);
557  $ni->setValue($this->object->getMasteryScore());
558  $ni->setInfo($this->lng->txt("cont_mastery_score_2004_info") . $this->object->getMasteryScoreValues());
559  $this->form->addItem($ni);
560  }
561 
562  //
563  // rte settings
564  //
565  $sh = new ilFormSectionHeaderGUI();
566  $sh->setTitle($this->lng->txt("cont_rte_settings"));
567  $this->form->addItem($sh);
568 
569  // unlimited session timeout
570  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
571  $cb->setValue("y");
572  $cb->setChecked($this->object->getSession());
573  $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
574  $this->form->addItem($cb);
575 
576  // SCORM 2004 fourth edition features
577  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_fourth_edition"), "cobj_fourth_edition");
578  $cb->setValue("y");
579  $cb->setChecked($this->object->getFourth_edition());
580  $cb->setInfo($this->lng->txt("cont_fourth_edition_info"));
581  $this->form->addItem($cb);
582 
583  // sequencing
584  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sequencing"), "cobj_sequencing");
585  $cb->setValue("y");
586  $cb->setChecked($this->object->getSequencing());
587  $cb->setInfo($this->lng->txt("cont_sequencing_info"));
588  $this->form->addItem($cb);
589 
590  // storage of interactions
591  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
592  $cb->setValue("y");
593  $cb->setChecked($this->object->getInteractions());
594  $cb->setInfo($this->lng->txt("cont_interactions_info"));
595  $this->form->addItem($cb);
596 
597  // objectives
598  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
599  $cb->setValue("y");
600  $cb->setChecked($this->object->getObjectives());
601  $cb->setInfo($this->lng->txt("cont_objectives_info"));
602  $this->form->addItem($cb);
603 
604  // comments
605  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_comments"), "cobj_comments");
606  $cb->setValue("y");
607  $cb->setChecked($this->object->getComments());
608  $cb->setInfo($this->lng->txt("cont_comments_info"));
609  $this->form->addItem($cb);
610 
611  // time from lms
612  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
613  $cb->setValue("y");
614  $cb->setChecked($this->object->getTime_from_lms());
615  $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
616  $this->form->addItem($cb);
617 
618  // check values
619  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
620  $cb->setValue("y");
621  $cb->setChecked($this->object->getCheck_values());
622  $cb->setInfo($this->lng->txt("cont_check_values_info"));
623  $this->form->addItem($cb);
624 
625  // auto cmi.exit to suspend
626  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
627  $cb->setValue("y");
628  $cb->setChecked($this->object->getAutoSuspend());
629  $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
630  $this->form->addItem($cb);
631 
632  // settings for student_id
633  $options = array(
634  0 => $this->lng->txt("cont_sc_id_setting_user_id"),
635  1 => $this->lng->txt("cont_sc_id_setting_user_login"),
636  2 => $this->lng->txt("cont_sc_id_setting_user_id_plus_ref_id"),
637  3 => $this->lng->txt("cont_sc_id_setting_user_login_plus_ref_id"),
638  4 => $this->lng->txt("cont_sc_id_setting_user_id_plus_obj_id"),
639  5 => $this->lng->txt("cont_sc_id_setting_user_login_plus_obj_id")
640  );
641  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_id_setting_2004"), "id_setting");
642  $si->setOptions($options);
643  $si->setValue($this->object->getIdSetting());
644  $si->setInfo($this->lng->txt("cont_sc_id_setting_info"));
645  $this->form->addItem($si);
646 
647  // settings for student_name
648  $options = array(
649  0 => $this->lng->txt("cont_sc_name_setting_last_firstname"),
650  1 => $this->lng->txt("cont_sc_name_setting_first_lastname"),
651  2 => $this->lng->txt("cont_sc_name_setting_fullname"),
652  3 => $this->lng->txt("cont_sc_name_setting_salutation_lastname"),
653  4 => $this->lng->txt("cont_sc_name_setting_first_name"),
654  9 => $this->lng->txt("cont_sc_name_setting_no_name")
655  );
656  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_name_setting_2004"), "name_setting");
657  $si->setOptions($options);
658  $si->setValue($this->object->getNameSetting());
659  $si->setInfo($this->lng->txt("cont_sc_name_setting_info"));
660  $this->form->addItem($si);
661 
662  //
663  // debugging
664  //
665  $sh = new ilFormSectionHeaderGUI();
666  $sh->setTitle($this->lng->txt("cont_debugging"));
667  $this->form->addItem($sh);
668 
669  // test tool
670  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
671  $cb->setValue("y");
672  $cb->setChecked($this->object->getDebug());
673  if ($this->object->getDebugActivated() == false) {
674  $cb->setDisabled(true);
675  $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
676  } else {
677  $cb->setInfo($this->lng->txt("cont_debug_deactivate"));
678  }
679  $this->form->addItem($cb);
680  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
681  }
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
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.
getID()
Return the unique ID value assigned to this spreadsheet workbook.
Definition: PHPExcel.php:1135
setOptions($a_options)
Set Options.
Create styles array
The data for the language used.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a non editable value in a property form.
Create new PHPExcel object
obj_idprivate
This class represents a text area property in a property form.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ 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 1062 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().

1063  {
1064  $ilCtrl = $this->ctrl;
1065  $lng = $this->lng;
1066  $ilTabs = $this->tabs;
1068 
1069  $lng->loadLanguageModule("style");
1070  $this->setSubTabs("settings", "style");
1071  $ilTabs->setTabActive("settings");
1072 
1073  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1074  $this->form = new ilPropertyFormGUI();
1075 
1076  $fixed_style = $ilSetting->get("fixed_content_style_id");
1077  $style_id = $this->object->getStyleSheetId();
1078 
1079  if ($fixed_style > 0) {
1080  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
1081  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1082  $this->lng->txt("global_fixed") . ")");
1083  $this->form->addItem($st);
1084  } else {
1086  true,
1087  false,
1088  $_GET["ref_id"]
1089  );
1090 
1091  $st_styles[0] = $this->lng->txt("default");
1092  ksort($st_styles);
1093 
1094  if ($style_id > 0) {
1095  // individual style
1096  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1097  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
1098  $st->setValue(ilObject::_lookupTitle($style_id));
1099  $this->form->addItem($st);
1100 
1101  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1102 
1103  // delete command
1104  $this->form->addCommandButton(
1105  "editStyle",
1106  $lng->txt("cont_edit_style")
1107  );
1108  $this->form->addCommandButton(
1109  "deleteStyle",
1110  $lng->txt("cont_delete_style")
1111  );
1112  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1113  }
1114  }
1115 
1116  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1117  $style_sel = ilUtil::formSelect(
1118  $style_id,
1119  "style_id",
1120  $st_styles,
1121  false,
1122  true
1123  );
1124  $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
1125  $style_sel->setOptions($st_styles);
1126  $style_sel->setValue($style_id);
1127  $this->form->addItem($style_sel);
1128  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1129  $this->form->addCommandButton(
1130  "saveStyleSettings",
1131  $lng->txt("save")
1132  );
1133  $this->form->addCommandButton(
1134  "createStyle",
1135  $lng->txt("sty_create_ind_style")
1136  );
1137  }
1138  }
1139  $this->form->setTitle($lng->txt("cont_style"));
1140  $this->form->setFormAction($ilCtrl->getFormAction($this));
1141  }
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 2056 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2057  {
2058  $ilCtrl = $this->ctrl;
2059  $lng = $this->lng;
2060 
2061  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2062 
2063  $slm_tree = new ilTree($this->object->getId());
2064  $slm_tree->setTreeTablePK("slm_id");
2065  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2066 
2069 
2070  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
2071  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2072 
2073  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2074  $parent_id = $slm_tree->getParentId($node_id);
2075  $target = $node_id;
2076  } else { // insert as first child
2077  $parent_id = $node_id;
2079  }
2080 
2081  $ass_ids = array();
2082  for ($i = 1; $i <= $num; $i++) {
2083  $ass = new ilSCORM2004Asset($this->object);
2084  $ass->setTitle($lng->txt("sahs_new_asset"));
2085  $ass->setSLMId($this->object->getId());
2086  $ass->create();
2087  ilSCORM2004Node::putInTree($ass, $parent_id, $target);
2088  $ass_ids[] = $ass->getId();
2089  }
2090  $ass_ids = array_reverse($ass_ids);
2091  $ass_ids = implode($ass_ids, ":");
2092 
2093  if ($a_redirect) {
2094  $ilCtrl->setParameter($this, "highlight", $ass_ids);
2095  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2096  }
2097  return array("node_id" => $node_id, "items" => $ass_ids);
2098  }
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...
Create styles array
The data for the language used.
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Create new PHPExcel object
obj_idprivate
Class ilSCORM2004Asset.
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ insertAssetClip()

ilObjSCORM2004LearningModuleGUI::insertAssetClip ( )

Insert assets from clipboard.

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

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

2700  {
2701  $ilCtrl = $this->ctrl;
2702  $ilUser = $this->user;
2703 
2704  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2705  ilSCORM2004Node::insertAssetClip($this->object);
2706 
2707  $ilCtrl->redirect(
2708  $this,
2709  "showOrganization",
2711  );
2712  }
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 1963 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

1964  {
1965  $ilCtrl = $this->ctrl;
1966  $lng = $this->lng;
1967 
1968  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1969 
1970  $slm_tree = new ilTree($this->object->getId());
1971  $slm_tree->setTreeTablePK("slm_id");
1972  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1973 
1976 
1977  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
1978  $parent_id = $slm_tree->getParentId($node_id);
1979  $target = $node_id;
1980  } else { // insert as first child
1981  $parent_id = $node_id;
1983  }
1984  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
1985  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1986 
1987  $chap_ids = array();
1988  for ($i = 1; $i <= $num; $i++) {
1989  $chap = new ilSCORM2004Chapter($this->object);
1990  $chap->setTitle($lng->txt("sahs_new_chapter"));
1991  $chap->setSLMId($this->object->getId());
1992  $chap->create();
1993  ilSCORM2004Node::putInTree($chap, $parent_id, $target);
1994  $chap_ids[] = $chap->getId();
1995  }
1996  $chap_ids = array_reverse($chap_ids);
1997  $chap_ids = implode($chap_ids, ":");
1998 
1999  if ($a_redirect) {
2000  $ilCtrl->setParameter($this, "highlight", $chap_ids);
2001  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2002  }
2003  return array("node_id" => $node_id, "items" => $chap_ids);
2004  }
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...
Create styles array
The data for the language used.
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Create new PHPExcel object
obj_idprivate
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ insertChapterClip()

ilObjSCORM2004LearningModuleGUI::insertChapterClip ( )

Insert chapter from clipboard.

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

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

2718  {
2719  $ilCtrl = $this->ctrl;
2720  $ilUser = $this->user;
2721 
2722  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2723  ilSCORM2004Node::insertChapterClip($this->object);
2724 
2725  $ilCtrl->redirect(
2726  $this,
2727  "showOrganization",
2729  );
2730  }
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 2735 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by confirmLMChapterInsert().

2736  {
2737  $ilCtrl = $this->ctrl;
2738  $tpl = $this->tpl;
2739  $ilToolbar = $this->toolbar;
2740  $ilCtrl = $this->ctrl;
2741  $lng = $this->lng;
2742  $ilTabs = $this->tabs;
2743 
2744  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2745 
2746 
2747  $pf = "";
2748  foreach (ilSCORM2004OrganizationHFormGUI::getPostFields() as $f => $v) {
2749  $pf.= '<input type="hidden" name="' . $f . '" value="' . $v . '" />';
2750  }
2751  if ($a_confirm && is_array($_POST["node"])) {
2752  foreach ($_POST["node"] as $f => $v) {
2753  $pf.= '<input type="hidden" name="node[' . $f . ']" value="' . $v . '" />';
2754  }
2755  }
2756 
2757 
2760 
2761  include_once("./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
2762  $form = new ilLMChapterImportForm($this->object, $node_id, $first_child, $a_confirm);
2763  $tpl->setContent($form->getHTML() . $pf . "</form>");
2764 
2765  $ilTabs->clearTargets();
2766  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2767  if ($a_confirm) {
2768  if ($form->isCorrect()) {
2769  $ilToolbar->addFormButton($lng->txt("insert"), "performLMChapterInsert");
2770  }
2771  $ilToolbar->addFormButton($lng->txt("back"), "insertLMChapterClip");
2772  } else {
2773  $ilToolbar->addFormButton($lng->txt("check"), "confirmLMChapterInsert");
2774  }
2775  $ilToolbar->addFormButton($lng->txt("cancel"), "showOrganization");
2776  $ilToolbar->setCloseFormTag(false);
2777  }
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 2103 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2104  {
2105  $ilCtrl = $this->ctrl;
2106  $lng = $this->lng;
2107 
2108  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2109 
2110  $slm_tree = new ilTree($this->object->getId());
2111  $slm_tree->setTreeTablePK("slm_id");
2112  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2113 
2116 
2117  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2118  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2119  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2120  $parent_id = $slm_tree->getParentId($node_id);
2121  $target = $node_id;
2122  } else { // insert as first child
2123  $parent_id = $node_id;
2125  }
2126 
2127  $page_ids = array();
2128  for ($i = 1; $i <= $num; $i++) {
2129  $page = new ilSCORM2004PageNode($this->object);
2130  $page->setTitle($lng->txt("sahs_new_page"));
2131  $page->setSLMId($this->object->getId());
2132  $page->create();
2133  ilSCORM2004Node::putInTree($page, $parent_id, $target);
2134  $page_ids[] = $page->getId();
2135  }
2136  $page_ids = array_reverse($page_ids);
2137  $page_ids = implode($page_ids, ":");
2138 
2139  if ($a_redirect) {
2140  $ilCtrl->setParameter($this, "highlight", $page_ids);
2141  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2142  }
2143  return array("node_id" => $node_id, "items" => $page_ids);
2144  }
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...
Create styles array
The data for the language used.
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Create new PHPExcel object
obj_idprivate
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ insertPageClip()

ilObjSCORM2004LearningModuleGUI::insertPageClip ( )

Insert pages from clipboard.

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

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

2664  {
2665  $ilCtrl = $this->ctrl;
2666  $ilUser = $this->user;
2667 
2668  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2669  ilSCORM2004Node::insertPageClip($this->object);
2670 
2671  $ilCtrl->redirect(
2672  $this,
2673  "showOrganization",
2675  );
2676  }
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 2227 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2228  {
2229  $ilCtrl = $this->ctrl;
2230 
2231  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2232 
2233  $slm_tree = new ilTree($this->object->getId());
2234  $slm_tree->setTreeTablePK("slm_id");
2235  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2236 
2237  $node_id = $_POST["node_id"];
2238 
2239  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2240  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2241  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2242 
2243  if (!$_POST["first_child"]) { // insert after node id
2244  $parent_id = $slm_tree->getParentId($node_id);
2245  $target = $node_id;
2246  } else { // insert as first child
2247  $parent_id = $node_id;
2249  }
2250 
2251  $template = new ilSCORM2004SeqTemplate($_POST["identifier"]);
2252  $id = $template->insertTemplateForObjectAtParent($this->object, $parent_id, $target);
2253  $ilCtrl->setParameter($this, "highlight", $id);
2254  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2255  }
$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.
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the call graph for this function:

◆ insertScenarioGUI()

ilObjSCORM2004LearningModuleGUI::insertScenarioGUI ( )

Insert sequencing scenario at node.

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

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

2151  {
2152  $ilCtrl = $this->ctrl;
2153  $lng = $this->lng;
2154  $tpl = $this->tpl;
2155 
2156  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2157  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2158 
2159  $templates = array();
2160  $description = null;
2161  $image = null;
2162 
2163  $default_identifier = $_POST["identifier"];
2164 
2165  //get available templates
2166  $arr_templates = ilSCORM2004SeqTemplate::availableTemplates();
2167 
2168  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_seq_chooser.html", "Modules/Scorm2004");
2169 
2170  $this->tpl->setCurrentBlock("option_item");
2171 
2172  $active = null;
2173  foreach ($arr_templates as $templ) {
2174  $sel= "";
2175  $item_data = $templ->getMetadataProperties();
2176  $item_data['identifier'] = $templ->getIdentifier();
2177  array_push($templates, $item_data);
2178  if ($default_identifier == $item_data['identifier']) {
2179  $sel = 'selected';
2180  $active = $item_data;
2181  }
2182  $this->tpl->setVariable("VAL_SELECTED", $sel);
2183  $this->tpl->setVariable("VAL_IDENTIFIER", $item_data['identifier']);
2184  $this->tpl->setVariable("VAL_TITLE", $item_data['title']);
2185  $this->tpl->parseCurrentBlock();
2186  }
2187 
2188  //default
2189  if ($active == null) {
2190  $this->saveAllTitles(false);
2191  $description = $templates[0]['description'];
2192  $image = $templates[0]['thumbnail'];
2193  } else {
2194  $description = $active['description'];
2195  $image = $active['thumbnail'];
2196  }
2197 
2198  $this->tpl->setVariable("VAL_DESCRIPTION", $description);
2199  $this->tpl->setVariable("VAL_IMAGE", ilSCORM2004SeqTemplate::SEQ_TEMPLATE_DIR . "/images/" . $image);
2200 
2201  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2202  $this->tpl->setVariable("BTN_NAME", "insertScenario");
2203  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2204  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2205  $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2206 
2207  $this->tpl->setVariable("TXT_TITLE", "Choose Sequencing Template");
2208 
2209  $node_id = $_POST["node_id"];
2210  $first_child = $_POST["first_child"];
2211 
2212  if (!$node_id) {
2214  }
2215  if (!$first_child) {
2217  }
2218 
2219  $this->tpl->setVariable("VAL_NODE_ID", $node_id);
2220  $this->tpl->setVariable("VAL_FIRST_CHILD", $first_child);
2221  }
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) ...
Create styles array
The data for the language used.
$_POST["username"]
+ Here is the call graph for this function:

◆ insertSco()

ilObjSCORM2004LearningModuleGUI::insertSco (   $a_redirect = true)

Insert (multiple) scos at node.

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

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

2010  {
2011  $ilCtrl = $this->ctrl;
2012  $lng = $this->lng;
2013 
2014  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2015 
2016  $slm_tree = new ilTree($this->object->getId());
2017  $slm_tree->setTreeTablePK("slm_id");
2018  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2019 
2022 
2023  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
2024  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2025 
2026  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) { // insert after node id
2027  $parent_id = $slm_tree->getParentId($node_id);
2028  $target = $node_id;
2029  } else { // insert as first child
2030  $parent_id = $node_id;
2032  }
2033 
2034  $sco_ids = array();
2035  for ($i = 1; $i <= $num; $i++) {
2036  $sco = new ilSCORM2004Sco($this->object);
2037  $sco->setTitle($lng->txt("sahs_new_sco"));
2038  $sco->setSLMId($this->object->getId());
2039  $sco->create();
2040  ilSCORM2004Node::putInTree($sco, $parent_id, $target);
2041  $sco_ids[] = $sco->getId();
2042  }
2043  $sco_ids = array_reverse($sco_ids);
2044  $sco_ids = implode($sco_ids, ":");
2045 
2046  if ($a_redirect) {
2047  $ilCtrl->setParameter($this, "highlight", $sco_ids);
2048  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2049  }
2050  return array("node_id" => $node_id, "items" => $sco_ids);
2051  }
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...
Create styles array
The data for the language used.
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Create new PHPExcel object
obj_idprivate
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ insertScoClip()

ilObjSCORM2004LearningModuleGUI::insertScoClip ( )

Insert scos from clipboard.

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

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

2682  {
2683  $ilCtrl = $this->ctrl;
2684  $ilUser = $this->user;
2685 
2686  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2687  ilSCORM2004Node::insertScoClip($this->object);
2688 
2689  $ilCtrl->redirect(
2690  $this,
2691  "showOrganization",
2693  );
2694  }
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 2260 of file class.ilObjSCORM2004LearningModuleGUI.php.

References insertTemplateGUI().

2261  {
2262  $this->insertTemplateGUI($a_redirect, true);
2263  }
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 2352 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2353  {
2354  $ilCtrl = $this->ctrl;
2355  $lng = $this->lng;
2356 
2357  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2358 
2359  $slm_tree = new ilTree($this->object->getId());
2360  $slm_tree->setTreeTablePK("slm_id");
2361  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2362 
2363  $num = $_POST["multi"];
2364  $node_id = $_POST["node_id"];
2365  $layout_id = $_POST["layout_id"];
2366 
2367 
2368  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2369  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2370 
2371  if (!$_POST["first_child"]) { // insert after node id
2372  $parent_id = $slm_tree->getParentId($node_id);
2373  $target = $node_id;
2374  } else { // insert as first child
2375  $parent_id = $node_id;
2377  }
2378 
2379  $page_ids = array();
2380  for ($i = 1; $i <= $num; $i++) {
2381  $page = new ilSCORM2004PageNode($this->object);
2382  $page->setTitle($lng->txt("sahs_new_page"));
2383  $page->setSLMId($this->object->getId());
2384  $page->create(false, $layout_id);
2385  ilSCORM2004Node::putInTree($page, $parent_id, $target);
2386  $page_ids[] = $page->getId();
2387  }
2388  $page_ids = array_reverse($page_ids);
2389  $page_ids = implode($page_ids, ":");
2390 
2391  if ($a_redirect) {
2392  if ($_GET["obj_id"] != "") {
2393  $this->jumpToNode($node_id, $page_ids);
2394  } else {
2395  $ilCtrl->setParameter($this, "highlight", $page_ids);
2396  $ilCtrl->redirect($this, "showOrganization", "node_" . $node_id);
2397  }
2398  }
2399  }
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...
Create styles array
The data for the language used.
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Create new PHPExcel object
obj_idprivate
$i
Definition: disco.tpl.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 2269 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().

2270  {
2271  $ilCtrl = $this->ctrl;
2272  $lng = $this->lng;
2273  $tpl = $this->tpl;
2274 
2275  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2276 
2277  $arr_templates = ilPageLayout::activeLayouts($a_special_page, ilPageLayout::MODULE_SCORM);
2278 
2279  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_page_layout_chooser.html", "Modules/Scorm2004");
2280 
2281  $this->tpl->setCurrentBlock("option_item");
2282 
2283  $count = 0;
2284  foreach ($arr_templates as $templ) {
2285  $count++;
2286  $sel= "";
2287  $templ->readObject();
2288  $this->tpl->setVariable("VAL_LAYOUT_TITLE", $templ->getTitle());
2289  $this->tpl->setVariable("VAL_LAYOUT_IMAGE", $templ->getPreview());
2290  $this->tpl->setVariable("VAL_LAYOUT_ID", $templ->getId());
2291  $this->tpl->setVariable("VAL_DISPLAY", "inline");
2292  if ($count==1) {
2293  $this->tpl->setVariable("VAL_CHECKED", "checked");
2294  }
2295  if ($count%4 == 0) {
2296  $this->tpl->setVariable("END_ROW", "</tr>");
2297  }
2298  if ($count == 1 || ($count-1)%4 == 0) {
2299  $this->tpl->setVariable("BEGIN_ROW", "<tr>");
2300  }
2301  $this->tpl->parseCurrentBlock();
2302  }
2303 
2304  //matrix table
2305  if ($count%4!=0) {
2306  $rest = 4-($count%4);
2307  } else {
2308  $rest=0;
2309  }
2310 
2311  for ($i=1;$i<=$rest;$i++) {
2312  $this->tpl->setVariable("VAL_DISPLAY", "none");
2313  $this->tpl->setVariable("VAL_LAYOUT_ID", $templ->getId());
2314 
2315  if ($i == $rest) {
2316  $this->tpl->setVariable("END_ROW", "</tr>");
2317  }
2318  $this->tpl->parseCurrentBlock();
2319  }
2320 
2321  //empty cells and closing <tr>
2322 
2323  $this->tpl->setVariable("VAL_NODE_ID", ilSCORM2004OrganizationHFormGUI::getPostNodeId());
2324  $this->tpl->setVariable("VAL_MULTI", ilSCORM2004OrganizationHFormGUI::getPostMulti());
2325  $this->tpl->setVariable("VAL_FIRST_CHILD", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2326  $this->tpl->setVariable("VAL_OBJ_ID", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2327 
2328  $ilCtrl->saveParameter($this, "obj_id");
2329 
2330  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2331 
2332  $this->tpl->setVariable("BTN_NAME", "insertTemplate");
2333  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2334  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("create"));
2335  $this->tpl->setVariable("CMD_CANCEL", "showOrganization");
2336 
2337  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2338  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2339  $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2340  if ($a_special_page) {
2341  $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_special_page"));
2342  } else {
2343  $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_page_template"));
2344  }
2345  }
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 2790 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2791  {
2794 
2795  include_once("./Modules/Scorm2004/classes/class.ilLMChapterImportForm.php");
2796  $form = new ilLMChapterImportForm($this->object, $node_id, $first_child);
2797  $form->performInserts();
2798  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2799  $this->ctrl->redirect($this, "showOrganization");
2800  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 2959 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2960  {
2961  global $DIC;
2962 
2963  $export = new ilScorm2004Export($this->object, 'SCORM 2004 3rd');
2964  $zipfile = $export->buildExportFile();
2965  $zipPathinfo = pathinfo($zipfile);
2966  $file_path = $this->object->getDataDirectory() . "/" . ($zipPathinfo["basename"]);
2967  copy($zipfile, $file_path);
2968  unlink($zipfile);
2969 
2970  ilUtil::unzip($file_path, true);
2971  ilUtil::renameExecutables($this->object->getDataDirectory());
2972  unlink($file_path);
2973 
2974  include_once("./Modules/Scorm2004/classes/ilSCORM13Package.php");
2975  $rte_pkg = new ilSCORM13Package();
2976  $rte_pkg->il_import($this->object->getDataDirectory(), $this->object->getId(), $DIC["ilias"], false, true);
2977 
2978  //increase module version is it necessary?
2979  //$this->object->setModuleVersion($module_version+1);
2980  //$this->object->update();
2981 
2982  //redirect to view player
2983  ilUtil::redirect("ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=" . $this->object->getRefID() . "&envEditor=1");
2984  }
global $DIC
Definition: saml.php:7
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
Export class for SCORM 2004 object.
Create new PHPExcel object
obj_idprivate
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 2577 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2578  {
2579  $ilCtrl = $this->ctrl;
2580 
2581  $this->object->executeDragDrop(
2582  $_POST["il_hform_source_id"],
2583  $_POST["il_hform_target_id"],
2584  $_POST["il_hform_fc"],
2585  $_POST["il_hform_as_subitem"]
2586  );
2587  $ilCtrl->redirect($this, "showOrganization");
2588  }
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(), object, 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
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ publishExportFile()

ilObjSCORM2004LearningModuleGUI::publishExportFile ( )

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

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

2933  {
2934  $ilErr = $this->error;
2935 
2936  if (!isset($_POST["file"])) {
2937  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
2938  }
2939  if (count($_POST["file"]) > 1) {
2940  $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
2941  }
2942 
2943  $export = new ilSCORM2004Export($this->object);
2944  $file = $_POST['file'][0];
2945  $type = $_POST['type'][$_POST['file'][0]];
2946 
2947  if ($this->object->getPublicExportFile($type) == $file) {
2948  $this->object->setPublicExportFile($type, "");
2949  } else {
2950  $this->object->setPublicExportFile($type, $file);
2951  }
2952  $this->object->update();
2953  $this->ctrl->redirect($this, "showExportList");
2954  }
$type
Create new PHPExcel object
obj_idprivate
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
$_POST["username"]

◆ saveAllTitles()

ilObjSCORM2004LearningModuleGUI::saveAllTitles (   $a_redirect = true)

Save all titles of chapters/scos/pages.

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

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

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

2446  {
2447  $ilCtrl = $this->ctrl;
2448 
2449  if (is_array($_POST["title"])) {
2450  include_once("./Services/MetaData/classes/class.ilMD.php");
2451  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2452  foreach ($_POST["title"] as $id => $title) {
2453  $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2454  if (is_object($node_obj)) {
2455  // Update Title and description
2456  $md = new ilMD($this->object->getId(), $id, $node_obj->getType());
2457  $md_gen = $md->getGeneral();
2458  $md_gen->setTitle(ilUtil::stripSlashes($title));
2459  $md_gen->update();
2460  $md->update();
2462  }
2463  }
2464  }
2465  if ($a_redirect) {
2466  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2467  $ilCtrl->redirect($this, "showOrganization");
2468  }
2469  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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
Create new PHPExcel object
obj_idprivate
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 940 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

941  {
942  $tpl = $this->tpl;
943  $lng = $this->lng;
946  $tree = $this->tree;
947 
948  $parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
949  if (!$rbacsystem->checkAccess("create", $parent_ref_id, "glo")) {
950  ilUtil::sendFailure($lng->txt("no_permission"), true);
951  $ilCtrl->redirect($this, "properties");
952  }
953 
954  $this->initGlossaryCreationForm();
955  if ($this->form->checkInput()) {
956  include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
957  $newObj = new ilObjGlossary();
958  $newObj->setType("glo");
959  $newObj->setTitle($_POST["title"]);
960  $newObj->setDescription($_POST["description"]);
961  $newObj->setVirtualMode("none");
962  $newObj->create();
963  $newObj->createReference();
964  $newObj->putInTree($parent_ref_id);
965  $newObj->setPermissions($parent_ref_id);
966 
967  // perform save
968  $this->object->setAssignedGlossary($newObj->getId());
969  $this->object->update();
970 
971  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
972  $ilCtrl->redirect($this, "properties");
973  }
974 
975  $this->form->setValuesByPost();
976  $tpl->setContent($this->form->getHtml());
977  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_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 795 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

796  {
798 
799  if ($this->object->editable != 1) {
800  //check if OfflineMode-Zip has to be created
801  $tmpOfflineMode= ilUtil::yn2tf($_POST["cobj_offline_mode"]);
802  $tmpFourth_edition = ilUtil::yn2tf($_POST["cobj_fourth_edition"]);
803  $tmpSequencing = ilUtil::yn2tf($_POST["cobj_sequencing"]);
804  if ($tmpOfflineMode == true) {
805  // $tmpSequencing = false; //actually no sequencing for offline_mode
806  $tmpFourth_edition = false; //4th edition is not possible
807  if ($this->object->getOfflineMode() == false) {
808  $this->object->zipLmForOfflineMode();
809  }
810  }
811 
812  if (isset($_POST["mastery_score"])) {
813  $this->object->setMasteryScore($_POST["mastery_score"]);
814  // $this->object->updateMasteryScoreValues();
815  }
816 
817  $t_auto_review = $_POST["auto_review"];
818  $t_auto_suspend = ilUtil::yn2tf($_POST["cobj_auto_suspend"]);
819  $t_session = ilUtil::yn2tf($_POST["cobj_session"]);
820  if ($t_auto_review == "s") {
821  $t_auto_suspend = true;
822  //if not storing without session
823  $t_session = true;
824  }
825 
826  $t_height = $this->object->getHeight();
827  if ($_POST["height_0"] != $this->object->getHeight()) {
828  $t_height = $_POST["height_0"];
829  }
830  if ($_POST["height_1"] != $this->object->getHeight()) {
831  $t_height = $_POST["height_1"];
832  }
833 
834  $t_width = $this->object->getWidth();
835  if ($_POST["width_0"] != $this->object->getWidth()) {
836  $t_width = $_POST["width_0"];
837  }
838  if ($_POST["width_1"] != $this->object->getWidth()) {
839  $t_width = $_POST["width_1"];
840  }
841 
842  $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
843  $this->object->setOpenMode($_POST["open_mode"]);
844  $this->object->setWidth($t_width);
845  $this->object->setHeight($t_height);
846  $this->object->setCreditMode($_POST["credit_mode"]);
847  $this->object->setMaxAttempt($_POST["max_attempt"]);
848  $this->object->setAutoReviewChar($t_auto_review);
849  $this->object->setDefaultLessonMode($_POST["lesson_mode"]);
850  $this->object->setSession($t_session);
851  $this->object->setNoMenu(ilUtil::yn2tf($_POST["cobj_nomenu"]));
852  $this->object->setHideNavig(ilUtil::yn2tf($_POST["cobj_hidenavig"]));
853  $this->object->setAuto_last_visited(ilUtil::yn2tf($_POST["cobj_auto_last_visited"]));
854  $this->object->setIe_force_render(ilUtil::yn2tf($_POST["cobj_ie_force_render"]));
855  $this->object->setFourth_edition($tmpFourth_edition);
856  $this->object->setSequencing($tmpSequencing);
857  $this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
858  $this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
859  $this->object->setComments(ilUtil::yn2tf($_POST["cobj_comments"]));
860  $this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
861  $this->object->setCheck_values(ilUtil::yn2tf($_POST["cobj_check_values"]));
862  $this->object->setAutoSuspend($t_auto_suspend);
863  $this->object->setOfflineMode($tmpOfflineMode);
864  $this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
865  $this->object->setIdSetting($_POST["id_setting"]);
866  $this->object->setNameSetting($_POST["name_setting"]);
867  $this->object->setTitle($_POST["Fobject_title"]);
868  $this->object->setDescription($_POST["Fobject_description"]);
869  } else {
871  if ($this->form->checkInput()) {
872  $this->object->setTries($_POST["q_tries"]);
873  $this->object->setLocalization($_POST["localization"]);
874 
875  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
876  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
877  || $this->object->getStyleSheetId() == 0)) {
878  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
879  }
880  }
881  }
882  $this->object->update();
883  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
884  $this->ctrl->redirect($this, "properties");
885  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
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 1511 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

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

◆ saveStyleSettings()

ilObjSCORM2004LearningModuleGUI::saveStyleSettings ( )

Save style settings.

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

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

1177  {
1179 
1180  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1181  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1182  || $this->object->getStyleSheetId() == 0)) {
1183  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1184  $this->object->update();
1185  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1186  }
1187  $this->ctrl->redirect($this, "editStyleProperties");
1188  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create new PHPExcel object
obj_idprivate
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 1616 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_POST.

1617  {
1618  switch ($_POST['select_export']) {
1619  case "exportScorm12":
1620  case "exportScorm2004_3rd":
1621  case "exportScorm2004_4th":
1622  case "exportPDF":
1623  case "exportISO":
1624  case "exportHTML":
1625  case "exportHTMLOne":
1626  $this->ctrl->redirect($this, $_POST['select_export']);
1627  break;
1628  default:
1629  $this->ctrl->redirect($this, 'showExportList');
1630  break;
1631  }
1632  }
$_POST["username"]

◆ selectGlossary()

ilObjSCORM2004LearningModuleGUI::selectGlossary ( )

Select glossary.

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

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

1026  {
1027  $ilCtrl = $this->ctrl;
1028 
1029  $this->object->setAssignedGlossary(ilObject::_lookupObjId((int) $_GET["glo_ref_id"]));
1030  $this->object->update();
1031  $ilCtrl->redirect($this, "properties");
1032  }
$_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 1605 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

1606  {
1607  $ilCtrl = $this->ctrl;
1608 
1609  $_SESSION["sahs_cur_chap"] = (int) $_POST["chapter"];
1610  $ilCtrl->redirect($this, "showLearningObjectivesAlignment");
1611  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]

◆ setSubTabs()

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

Set sub tabs.

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

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

1820  {
1821  $ilTabs = $this->tabs;
1822  $ilCtrl = $this->ctrl;
1823  $lng = $this->lng;
1824 
1825  if ($a_main_tab == "settings" &&
1826  $this->object->editable == 1) {
1827  /* // general properties
1828  $ilTabs->addSubTab("general_settings",
1829  $lng->txt("general_settings"),
1830  $ilCtrl->getLinkTarget($this, 'properties'));
1831 
1832  // style properties
1833  $ilTabs->addSubTab("style",
1834  $lng->txt("cont_style"),
1835  $ilCtrl->getLinkTarget($this, 'editStyleProperties'));
1836  */
1837  $ilTabs->activateSubTab($a_active);
1838  }
1839  }
global $ilCtrl
Definition: ilias.php:18
Create new PHPExcel object
obj_idprivate

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

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

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

◆ showLearningObjectivesAlignment()

ilObjSCORM2004LearningModuleGUI::showLearningObjectivesAlignment ( )

Show Learning Objectives Alignment.

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

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

1563  {
1564  $tpl = $this->tpl;
1565  $lng = $this->lng;
1566  $ilCtrl = $this->ctrl;
1567  $ilToolbar = $this->toolbar;
1568 
1569  $chaps = $this->object->getTree()->getChilds(
1570  $this->object->getTree()->getRootId()
1571  );
1572  $s_chaps = array();
1573  foreach ($chaps as $chap) {
1574  if ($chap["type"] == "chap") {
1575  $s_chaps[$chap["child"]] = $chap["title"];
1576  }
1577  }
1578  $cur_chap = $_SESSION["sahs_cur_chap"]
1579  ? $_SESSION["sahs_cur_chap"]
1580  : 0;
1581 
1582  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1583  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1584  $options = array(
1585  "0" => $lng->txt("all")
1586  );
1587  $options = $options + $s_chaps;
1588  $si = new ilSelectInputGUI($lng->txt("chapter"), "chapter");
1589  $si->setOptions($options);
1590  $si->setValue($cur_chap);
1591  $ilToolbar->addInputItem($si, true);
1592  $ilToolbar->addFormButton($lng->txt("change"), "selectLObjChapter");
1593 
1594  include_once("./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
1595  $obj_table = new ilObjectivesAlignmentTableGUI(
1596  $this,
1597  "showLearningObjectivesAlignment",
1598  $this->getEditTree(),
1599  $this->object,
1600  $cur_chap
1601  );
1602  $tpl->setContent($obj_table->getHTML());
1603  }
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
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ 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 1856 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by executeCommand().

1863  {
1864  $lng = $this->lng;
1865  $ilCtrl = $this->ctrl;
1866  $tpl = $this->tpl;
1867 
1868  if ($a_form_action == "") {
1869  $a_form_action = $ilCtrl->getFormAction($this);
1870  }
1871 
1872  if ($a_icon == "") {
1873  $a_title = $this->object->getTitle();
1874  $a_icon = ilUtil::getImagePath("icon_lm.svg");
1875  }
1876 
1877  $slm_tree = $this->getEditTree();
1878 
1879  if ($a_top_node == 0) {
1880  $a_top_node = $slm_tree->getRootId();
1881  }
1882 
1883  if (is_null($a_gui_obj)) {
1884  $a_gui_obj = $this;
1885  $a_gui_cmd = "showOrganization";
1886  }
1887 
1888  $ilCtrl->setParameter($this, "backcmd", "showOrganization");
1889  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1890  $form_gui = new ilSCORM2004OrganizationHFormGUI();
1891  $form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
1892  $form_gui->setFormAction($a_form_action);
1893  // $form_gui->setTitle($a_title);
1894  // $form_gui->setIcon($a_icon);
1895  $form_gui->setTree($slm_tree);
1896  $form_gui->setCurrentTopNodeId($a_top_node);
1897  $form_gui->addMultiCommand($lng->txt("delete"), "deleteNodes");
1898  $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
1899  $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
1900  $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
1901  $form_gui->addCommand($lng->txt("expand_all"), "expandAll");
1902  $form_gui->addCommand($lng->txt("collapse_all"), "collapseAll");
1903  $form_gui->setTriggeredUpdateCommand("saveAllTitles");
1904 
1905  // highlighted nodes
1906  if ($_GET["highlight"] != "") {
1907  $hl = explode(":", $_GET["highlight"]);
1908  $form_gui->setHighlightedNodes($hl);
1909  $form_gui->setFocusId($hl[0]);
1910  }
1911 
1912  $ilCtrl->setParameter($this, "active_node", $_GET["obj_id"]);
1913  // $form_gui->setExplorerUpdater("tree", "tree_div",
1914  // $ilCtrl->getLinkTarget($this, "showTree", "", true));
1915  $sc_tpl = new ilTemplate("tpl.scormeditor_orga_screen.html", true, true, "Modules/Scorm2004");
1916  $sc_tpl->setVariable("ORGANIZATION", $form_gui->getHTML());
1917  $sc_tpl->setVariable("NOTES", $this->getNotesHTML());
1918 
1919  $tpl->setContent($sc_tpl->get());
1920  }
$_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 1416 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

1417  {
1418  $tpl = $this->tpl;
1419  $lng = $this->lng;
1420  $ilTabs = $this->tabs;
1421  $ilToolbar = $this->toolbar;
1422  $ilCtrl = $this->ctrl;
1423 
1424  $ilTabs->setTabActive("sahs_sequencing");
1425 
1426  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1427 
1428  if (!$this->object->getSequencingExpertMode()) {
1429  $ilToolbar->addButton(
1430  $lng->txt("sahs_activate_expert_mode"),
1431  $ilCtrl->getLinkTarget($this, "confirmExpertMode")
1432  );
1433  } else {
1434  include_once("./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
1435  $list = new ilNestedList();
1436  $t = $this->object->getTree();
1437  $root_node = $t->getNodeData($t->getRootId());
1438  $nodes = $this->object->getTree()->getSubtree($root_node);
1439  foreach ($nodes as $node) {
1440  if (in_array($node["type"], array("", "chap", "sco"))) {
1441  $ntpl = new ilTemplate("tpl.seq_node.html", true, true, "Modules/Scorm2004");
1442  $ntpl->setVariable("NODE_ID", $node["child"]);
1443  if ($node["type"] == "") {
1444  $ntpl->setVariable("TITLE", $this->object->getTitle());
1445  $item = new ilSCORM2004Item($this->object->getId(), true);
1446  } else {
1447  $ntpl->setVariable("TITLE", $node["title"]);
1448  $item = new ilSCORM2004Item($node["child"]);
1449  }
1450  $ntpl->setVariable(
1451  "SEQ_INFO",
1452  ilUtil::prepareFormOutput($item->exportAsXML(false))
1453  );
1454  $list->addListNode($ntpl->get(), $node["child"], $node["parent"]);
1455  }
1456  }
1457 
1458  $tb = new ilToolbarGUI();
1459  $tb->addFormButton($lng->txt("save"), "saveSequencing");
1460  $ftpl = new ilTemplate("tpl.sequencing.html", true, true, "Modules/Scorm2004");
1461  $ftpl->setVariable("CONTENT", $list->getHTML());
1462  $ftpl->setVariable("FORM_ACTION", $ilCtrl->getFormAction($this));
1463  $ftpl->setVariable("TB", $tb->getHTML());
1464  $tpl->setContent($ftpl->get());
1465  }
1466  }
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
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ showTrackingItems()

ilObjSCORM2004LearningModuleGUI::showTrackingItems ( )

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

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

1248  {
1249  $ilTabs = $this->tabs;
1250  $ilAccess = $this->access;
1251 
1252  $ilTabs->setTabActive('cont_tracking_data');
1253 
1254  if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
1256  $ilTabs->setSubTabActive('cont_tracking_byuser');
1257 
1258  $reports = array('exportSelectedSuccess','exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportObjGlobalToSystem');
1259 
1260  $userSelected = "all";
1261  if (isset($_GET["userSelected"])) {
1262  $userSelected = ilUtil::stripSlashes($_GET["userSelected"]);
1263  }
1264  if (isset($_POST["userSelected"])) {
1265  $userSelected = ilUtil::stripSlashes($_POST["userSelected"]);
1266  }
1267  $this->ctrl->setParameter($this, 'userSelected', $userSelected);
1268 
1269  $report = "choose";
1270  if (isset($_GET["report"])) {
1271  $report = ilUtil::stripSlashes($_GET["report"]);
1272  }
1273  if (isset($_POST["report"])) {
1274  $report = ilUtil::stripSlashes($_POST["report"]);
1275  }
1276  $this->ctrl->setParameter($this, 'report', $report);
1277 
1278  include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerUserFilterGUI.php';
1279  $filter = new ilSCORM2004TrackingItemsPerUserFilterGUI($this, 'showTrackingItems');
1280  $filter->parse($userSelected, $report, $reports);
1281  if ($report == "choose") {
1282  $this->tpl->setContent($filter->form->getHTML());
1283  } else {
1284  $usersSelected = array();
1285  if ($userSelected != "all") {
1286  $usersSelected[] = $userSelected;
1287  } else {
1288  include_once "Services/Tracking/classes/class.ilTrQuery.php";
1290  foreach ($users as $user) {
1291  if (ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr') {
1292  $usersSelected[] = $user;
1293  }
1294  }
1295  }
1296  $scosSelected = array();
1297  $tmpscos=$this->object->getTrackedItems();
1298  for ($i=0; $i<count($tmpscos); $i++) {
1299  $scosSelected[] = $tmpscos[$i]["id"];
1300  }
1301  //with check for course ...
1302  // include_once "Services/Tracking/classes/class.ilTrQuery.php";
1303  // $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
1304  // var_dump($this->object->getTrackedUsers(""));
1305  include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
1306  $tbl = new ilSCORM2004TrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItems', $usersSelected, $scosSelected, $report);
1307  $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
1308  }
1309  } elseif ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
1310  $this->modifyTrackingItems();
1311  }
1312  return true;
1313  }
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
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
Create new PHPExcel object
obj_idprivate
$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 1193 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

1194  {
1195  $ilTabs = $this->tabs;
1196 
1197 
1199  $ilTabs->setTabActive("cont_tracking_data");
1200  $ilTabs->setSubTabActive("cont_tracking_bysco");
1201 
1202  $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers');
1203 
1204  $scoSelected = "all";
1205  if (isset($_GET["scoSelected"])) {
1206  $scoSelected = ilUtil::stripSlashes($_GET["scoSelected"]);
1207  }
1208  if (isset($_POST["scoSelected"])) {
1209  $scoSelected = ilUtil::stripSlashes($_POST["scoSelected"]);
1210  }
1211  $this->ctrl->setParameter($this, 'scoSelected', $scoSelected);
1212 
1213  $report = "choose";
1214  if (isset($_GET["report"])) {
1215  $report = ilUtil::stripSlashes($_GET["report"]);
1216  }
1217  if (isset($_POST["report"])) {
1218  $report = ilUtil::stripSlashes($_POST["report"]);
1219  }
1220  $this->ctrl->setParameter($this, 'report', $report);
1221 
1222  include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsPerScoFilterGUI.php';
1223  $filter = new ilSCORM2004TrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
1224  $filter->parse($scoSelected, $report, $reports);
1225  if ($report == "choose") {
1226  $this->tpl->setContent($filter->form->getHTML());
1227  } else {
1228  $scosSelected = array();
1229  if ($scoSelected != "all") {
1230  $scosSelected[] = $scoSelected;
1231  } else {
1232  $tmpscos=$this->object->getTrackedItems();
1233  for ($i=0; $i<count($tmpscos); $i++) {
1234  $scosSelected[] = $tmpscos[$i]["id"];
1235  }
1236  }
1237  //with check for course ...
1238  include_once "Services/Tracking/classes/class.ilTrQuery.php";
1239  $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
1240  // var_dump($this->object->getTrackedUsers(""));
1241  include_once './Modules/Scorm2004/classes/class.ilSCORM2004TrackingItemsTableGUI.php';
1242  $tbl = new ilSCORM2004TrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
1243  $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
1244  }
1245  return true;
1246  }
$_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
Create styles array
The data for the language used.
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
Create new PHPExcel object
obj_idprivate
$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 1320 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

1321  {
1322  $ilCtrl = $this->ctrl;
1323  $lng = $this->lng;
1324 
1325  $mtree = new ilTree($this->object->getId());
1326  $mtree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
1327  $mtree->setTreeTablePK("slm_id");
1328 
1329  if ($_POST["expandAll"] != "") {
1330  $_GET["scexpand"] = "";
1331  $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
1332  $n_arr = array();
1333  foreach ($stree as $n) {
1334  $n_arr[] = $n["child"];
1335  }
1336  $_SESSION["scexpand"] = $n_arr;
1337  }
1338 
1339  if ($_POST["collapseAll"] != "") {
1340  $_GET["scexpand"] = "";
1341  $_SESSION["scexpand"] = array($mtree->readRootId());
1342  }
1343 
1344  $this->tpl = new ilTemplate("tpl.main.html", true, true);
1345  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1346 
1347  $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
1348 
1349  $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
1350  $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
1351 
1352  $this->tpl->setCurrentBlock("exp2_button");
1353  $this->tpl->setVariable("CMD_EXP2_BTN", "expandAll");
1354  $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("expand_all"));
1355  $this->tpl->parseCurrentBlock();
1356 
1357  $this->tpl->setCurrentBlock("exp2_button");
1358  $this->tpl->setVariable("CMD_EXP2_BTN", "collapseAll");
1359  $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("collapse_all"));
1360  $this->tpl->parseCurrentBlock();
1361 
1362  require_once("./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
1363  $exp = new ilSCORM2004EditorExplorer(
1364  $this->ctrl->getLinkTarget($this, "edit"),
1366  );
1367  $exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
1368  $exp->setTargetGet("obj_id");
1369  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "showTree"));
1370 
1371  if ($_GET["scexpand"] == "") {
1372  $expanded = $mtree->readRootId();
1373  } else {
1374  $expanded = $_GET["scexpand"];
1375  }
1376 
1377  //echo "-".$_GET["active_node"]."-";
1378  if ($_GET["active_node"] != "") {
1379  $path = $mtree->getPathId($_GET["active_node"]);
1380  $exp->setForceOpenPath($path);
1381 
1382  $exp->highlightNode($_GET["active_node"]);
1383  }
1384  $exp->setExpand($expanded);
1385 
1386  // build html-output
1387  $exp->setOutput(0);
1388  $output = $exp->getOutput();
1389 
1390  // asynchronous output
1391  if ($ilCtrl->isAsynch()) {
1392  echo $output;
1393  exit;
1394  }
1395 
1396  $this->tpl->setCurrentBlock("content");
1397  $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
1398  $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
1399  $this->tpl->setVariable("EXPLORER", $output);
1400  $this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
1401  $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
1402  $this->tpl->parseCurrentBlock();
1403 
1404  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
1405  iljQueryUtil::initjQuery($this->tpl);
1406 
1407  $this->tpl->show(false);
1408 
1409 
1410  exit;
1411  }
$_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
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
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...
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
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: