ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjSCORM2004LearningModuleGUI Class Reference

Class ilObjSCORMLearningModuleGUI. More...

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

Public Member Functions

 ilObjSCORM2004LearningModuleGUI ($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 ()
 show tracking data More...
 
 exportAll ()
 
 exportSelected ()
 
 showTrackingItem ()
 show tracking data of item More...
 
 deleteTrackingForUser ()
 display deletion confirmation screen More...
 
 resetSearch ()
 
 cancelDeleteTracking ()
 cancel deletion of export files More...
 
 confirmedDeleteTracking ()
 Confirmed tracking deletion. More...
 
 deleteTrackingData ()
 
 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 (&$tabs_gui)
 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...
 
 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
 ilObjSCORMLearningModuleGUI ($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...
 
 deleteTrackingForUser ()
 display deletion confirmation screen More...
 
 cancelDelete ()
 cancel deletion of export files More...
 
 confirmedDelete ()
 
 cancel ()
 overwrite..jump back to trackingdata not parent More...
 
 decreaseAttempts ()
 
 setSubTabs ()
 
 cancelStopUserOfflineMode ()
 
 confirmedStopUserOfflineMode ()
 
- Public Member Functions inherited from ilObjSAHSLearningModuleGUI
 ilObjSAHSLearningModuleGUI ($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 main frameset of media pool left frame: explorer tree of folders right frame: media pool content More...
 
 certificate ()
 Shows the certificate editor. More...
 
 getTabs (&$tabs_gui)
 adds tabs to tab gui object More...
 
 _goto ($a_target)
 goto target course More...
 
 addLocatorItems ()
 
 editContent ()
 List files. More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 editObject ()
 edit object More...
 
 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...
 

Additional Inherited Members

- 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
 
 $ilias
 
 $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
 
- Protected Member Functions inherited from ilObjSCORMLearningModuleGUI
 showTrackingItemsBySco ()
 show tracking data More...
 
 showTrackingItems ()
 Show tracking table ilTabs $ilTabs $global ilToolbar $ilToolbar. More...
 
 applyUserTableFilter ()
 Apply table filter. More...
 
 resetUserTableFilter ()
 Reset table filter. More...
 
 import ()
 gui functions for GUI export More...
 
 importForm ()
 Show import form. More...
 
 initImportForm ()
 Init import form. More...
 
 exportSelectionAll ()
 Show export section for all users. More...
 
 exportSelectionUsers ()
 Export selection for selected users. More...
 
 exportSelection ($a_type)
 Show export selection. More...
 
 initExportForm ($a_type)
 Init export form. More...
 
 export ()
 Do export. 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 ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 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...
 
 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 

Detailed Description

Member Function Documentation

◆ activateExpertMode()

ilObjSCORM2004LearningModuleGUI::activateExpertMode ( )

Activate expert mode.

Parameters

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

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

1590  {
1591  global $ilCtrl, $lng;
1592 
1593  $this->object->setSequencingExpertMode(true);
1594  $this->object->update();
1595  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1596  $ilCtrl->redirect($this, "showSequencing");
1597  }
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 869 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

870  {
871  global $tpl, $ilCtrl, $tree;
872 
873  include_once("./Modules/Scorm2004/classes/class.ilGlossarySelectorGUI.php");
874  $exp = new ilGlossarySelectorGUI(
875  $ilCtrl->getLinkTarget($this, "selectGlossary"), "ilobjscorm2004learningmodulegui");
876  $exp->setSelectableTypes(array("glo"));
877 
878  if ($_GET["expand"] == "")
879  {
880  $expanded = $tree->readRootId();
881  }
882  else
883  {
884  $expanded = $_GET["expand"];
885  }
886  $exp->setExpand($expanded);
887 
888  $exp->setTargetGet("glo_id");
889  //$this->ctrl->setParameter($this, "target_type", $a_type);
890  //$ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
891  $exp->setParamsGet($this->ctrl->getParameterArray($this, "assignGlossary"));
892 
893  // filter
894  $exp->setFiltered(true);
895  $exp->setFilterMode(IL_FM_POSITIVE);
896  $exp->addFilter("root");
897  $exp->addFilter("cat");
898  $exp->addFilter("grp");
899  $exp->addFilter("fold");
900  $exp->addFilter("crs");
901  $exp->addFilter("glo");
902 
903  $exp->setOutput(0);
904 
905  $tpl->setContent($exp->getOutput());
906  }
Select file for being added into file lists.
$_GET["client_id"]
const IL_FM_POSITIVE
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ assignObject()

ilObjSCORM2004LearningModuleGUI::assignObject ( )

assign scorm object to scorm gui object

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

924  {
925  if ($this->id != 0)
926  {
927  if ($this->call_by_reference)
928  {
929  $this->object =& new ilObjSCORM2004LearningModule($this->id, true);
930  }
931  else
932  {
933  $this->object =& new ilObjSCORM2004LearningModule($this->id, false);
934  }
935  }
936  }
Class ilObjSCORM2004LearningModule.

◆ cancelDelete()

ilObjSCORM2004LearningModuleGUI::cancelDelete ( )

cancel delete

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

References $_GET.

2611  {
2612  $this->ctrl->redirect($this, $_GET["backcmd"]);
2613  }
$_GET["client_id"]

◆ cancelDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::cancelDeleteExportFile ( )

cancel deletion of export files

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

References ilSession\clear().

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

◆ cancelDeleteTracking()

ilObjSCORM2004LearningModuleGUI::cancelDeleteTracking ( )

cancel deletion of export files

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

References ilUtil\sendInfo().

1376  {
1377  ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
1378  $this->ctrl->redirect($this, "showTrackingItems");
1379  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ collapseAll()

ilObjSCORM2004LearningModuleGUI::collapseAll (   $a_redirect = true)

Collapse all.

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

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

2506  {
2507  $_GET["scexpand"] = "";
2508  $mtree = $this->object->getTree();
2509  $n_id = ($_GET["obj_id"] > 0)
2510  ? $_GET["obj_id"]
2511  : $mtree->readRootId();
2512  $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2513  $old = $_SESSION["scexpand"];
2514  foreach ($stree as $n)
2515  {
2516  if (in_array($n["child"], $old) && $n["child"] != $n_id)
2517  {
2518  $k = array_search($n["child"], $old);
2519  unset($old[$k]);
2520  }
2521  }
2522  $_SESSION["scexpand"] = $old;
2523  $this->saveAllTitles($a_redirect);
2524  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
$n
Definition: RandomTest.php:80
+ Here is the call graph for this function:

◆ confirmDeleteExportFile()

ilObjSCORM2004LearningModuleGUI::confirmDeleteExportFile ( )

confirmation screen for export file deletion

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

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

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

◆ confirmedDelete()

ilObjSCORM2004LearningModuleGUI::confirmedDelete (   $a_redirect = true)

Delete chapters/scos/pages.

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

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

2619  {
2620  global $ilCtrl;
2621 
2622  $tree = new ilTree($this->object->getId());
2623  $tree->setTableNames('sahs_sc13_tree','sahs_sc13_tree_node');
2624  $tree->setTreeTablePK("slm_id");
2625 
2626  // delete all selected objects
2627  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2628  foreach ($_POST["id"] as $id)
2629  {
2630  if ($id != IL_FIRST_NODE)
2631  {
2632  $obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2633  $node_data = $tree->getNodeData($id);
2634  if (is_object($obj))
2635  {
2636  $obj->setSLMId($this->object->getId());
2637 
2638  /*include_once("./Services/History/classes/class.ilHistory.php");
2639  ilHistory::_createEntry($this->object->getId(), "delete_".$obj->getType(),
2640  array(ilLMObject::_lookupTitle($id), $id),
2641  $this->object->getType());*/
2642 
2643  $obj->delete();
2644  }
2645  if($tree->isInTree($id))
2646  {
2647  $tree->deleteTree($node_data);
2648  }
2649  }
2650  }
2651 
2652  // check the tree
2653  // $this->object->checkTree();
2654 
2655  // feedback
2656  ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
2657 
2658  if ($a_redirect)
2659  {
2660  $ilCtrl->redirect($this, "showOrganization");
2661  }
2662  }
$_POST['username']
Definition: cron.php:12
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...
+ Here is the call graph for this function:

◆ confirmedDeleteTracking()

ilObjSCORM2004LearningModuleGUI::confirmedDeleteTracking ( )

Confirmed tracking deletion.

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

References $_POST, ilLPStatusWrapper\_updateStatus(), and ilSCORM2004DeleteData\removeCMIDataForUserAndPackage().

1386  {
1387  foreach ($_POST["user"] as $user)
1388  {
1389  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004DeleteData.php");
1390  ilSCORM2004DeleteData::removeCMIDataForUserAndPackage($user,$this->object->getId());
1391 
1392  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1393  ilLPStatusWrapper::_updateStatus($this->object->getId(), $user);
1394  }
1395 
1396  $this->ctrl->redirect($this, "showTrackingItems");
1397  }
$_POST['username']
Definition: cron.php:12
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
Update status.
removeCMIDataForUserAndPackage($user_id, $packageId)
+ Here is the call graph for this function:

◆ confirmExpertMode()

ilObjSCORM2004LearningModuleGUI::confirmExpertMode ( )

Confirm activation of expert mode.

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

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

1568  {
1569  global $ilCtrl, $tpl, $lng, $ilTabs;
1570 
1571  $ilTabs->setTabActive("sahs_sequencing");
1572 
1573  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1574  $cgui = new ilConfirmationGUI();
1575  $cgui->setFormAction($ilCtrl->getFormAction($this));
1576  $cgui->setHeaderText($lng->txt("sahs_activate_expert_mode_info"));
1577  $cgui->setCancel($lng->txt("cancel"), "showSequencing");
1578  $cgui->setConfirm($lng->txt("sahs_activate_expert_mode"), "activateExpertMode");
1579 
1580  $tpl->setContent($cgui->getHTML());
1581  }
global $ilCtrl
Definition: ilias.php:18
Confirmation screen class.

◆ copyItems()

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

Copy items to clipboard.

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

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

2680  {
2681  global $ilCtrl, $lng;
2682 
2683  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2684 
2685  $items = ilUtil::stripSlashesArray($_POST["id"]);
2686  $todel = array(); // delete IDs < 0 (needed for non-js editing)
2687  foreach($items as $k => $item)
2688  {
2689  if ($item < 0)
2690  {
2691  $todel[] = $k;
2692  }
2693  }
2694  foreach($todel as $k)
2695  {
2696  unset($items[$k]);
2697  }
2698  if (!ilSCORM2004Node::uniqueTypesCheck($items))
2699  {
2700  ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2701  $ilCtrl->redirect($this, $a_return);
2702  }
2703  ilSCORM2004Node::clipboardCopy($this->object->getId(), $items);
2704 
2705  // @todo: move this to a service since it can be used here, too
2706  include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2708  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
2709 
2710  $ilCtrl->redirect($this, $a_return);
2711  }
$_POST['username']
Definition: cron.php:12
static clipboardCopy($a_slm_obj_id, $a_ids)
Copy a set of chapters/pages/scos into the clipboard.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters or all scos)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
+ Here is the call graph for this function:

◆ createGlossary()

ilObjSCORM2004LearningModuleGUI::createGlossary ( )

Create glossary.

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

References ilObjectGUI\$tpl, and initGlossaryCreationForm().

792  {
793  global $tpl;
794 
795  $this->initGlossaryCreationForm();
796  $tpl->setContent($this->form->getHTML());
797  }
+ Here is the call graph for this function:

◆ createStyle()

ilObjSCORM2004LearningModuleGUI::createStyle ( )

Create Style.

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

References $ilCtrl.

1024  {
1025  global $ilCtrl;
1026 
1027  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1028  }
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 2716 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2717  {
2718  global $ilCtrl, $lng;
2719 
2720  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2721 
2722  $items = ilUtil::stripSlashesArray($_POST["id"]);
2723  $todel = array(); // delete IDs < 0 (needed for non-js editing)
2724  foreach($items as $k => $item)
2725  {
2726  if ($item < 0)
2727  {
2728  $todel[] = $k;
2729  }
2730  }
2731  foreach($todel as $k)
2732  {
2733  unset($items[$k]);
2734  }
2735 
2736  if (!ilSCORM2004Node::uniqueTypesCheck($items))
2737  {
2738  ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
2739  $ilCtrl->redirect($this, $a_return);
2740  }
2741 
2742  ilSCORM2004Node::clipboardCut($this->object->getId(), $items);
2743 
2744  include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
2746 
2747  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
2748 
2749  $ilCtrl->redirect($this, $a_return);
2750  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters or all scos)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
clipboardCut($a_slm_obj_id, $a_ids)
Cut and copy a set of chapters/pages into the clipboard.
+ Here is the call graph for this function:

◆ deleteExportFile()

ilObjSCORM2004LearningModuleGUI::deleteExportFile ( )

delete export files

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

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

2932  {
2933  include_once "./Services/Utilities/classes/class.ilUtil.php";
2934  $export = new ilSCORM2004Export($this->object);
2935  foreach($_POST['file'] as $idx => $file)
2936  {
2937  $export_dir = $export->getExportDirectoryForType($_POST['type'][$idx]);
2938  $exp_file = $export_dir."/".$file;
2939  if (@is_file($exp_file))
2940  {
2941  unlink($exp_file);
2942  }
2943  }
2944  ilUtil::sendSuccess($this->lng->txt('msg_deleted_export_files'), true);
2945  $this->ctrl->redirect($this, "showExportList");
2946  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
print $file
$_POST['username']
Definition: cron.php:12
+ 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 2563 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2564  {
2565  global $lng, $tpl;
2566 
2567  if(!isset($_POST["id"]))
2568  {
2569  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2570  }
2571 
2572  // SAVE POST VALUES
2573  $_SESSION["saved_post"] = $_POST["id"];
2574 
2575  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2576  $confirmation_gui = new ilConfirmationGUI();
2577 
2578  if ($a_form_action == "")
2579  {
2580  $cmd = ($_GET["backcmd"] == "")
2581  ? "showOrganization"
2582  : $_GET["backcmd"];
2583  $this->ctrl->setParameter($this, "backcmd", $cmd);
2584  $a_form_action = $this->ctrl->getFormAction($this);
2585  }
2586  $confirmation_gui->setFormAction($a_form_action);
2587  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
2588 
2589  // Add items to delete
2590  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2591  foreach($_POST["id"] as $id)
2592  {
2593  if ($id != IL_FIRST_NODE)
2594  {
2595  $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2596  $confirmation_gui->addItem("id[]", $node_obj->getId(),
2597  $node_obj->getTitle(), ilUtil::getImagePath("icon_".$node_obj->getType().".png"));
2598  }
2599  }
2600 
2601  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
2602  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
2603 
2604  $tpl->setContent($confirmation_gui->getHTML());
2605  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
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
redirection script todo: (a better solution should control the processing via a xml file) ...
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteStyle()

ilObjSCORM2004LearningModuleGUI::deleteStyle ( )

Delete Style.

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

References $ilCtrl.

1044  {
1045  global $ilCtrl;
1046 
1047  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1048  }
global $ilCtrl
Definition: ilias.php:18

◆ deleteTrackingData()

ilObjSCORM2004LearningModuleGUI::deleteTrackingData ( )

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

References $_POST, and showTrackingItems().

1401  {
1402  if (is_array($_POST["id"]))
1403  {
1404  $this->object->deleteTrackingDataOfUsers($_POST["id"]);
1405  }
1406  $this->showTrackingItems();
1407  }
$_POST['username']
Definition: cron.php:12
+ Here is the call graph for this function:

◆ deleteTrackingForUser()

ilObjSCORM2004LearningModuleGUI::deleteTrackingForUser ( )

display deletion confirmation screen

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

References $_POST, ilObject\_exists(), and ilUtil\getImageTagByType().

1335  {
1336  if(!isset($_POST["user"]))
1337  {
1338  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1339  }
1340 
1341  // display confirmation message
1342  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1343  $cgui = new ilConfirmationGUI();
1344  $cgui->setFormAction($this->ctrl->getFormAction($this));
1345  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1346  $cgui->setCancel($this->lng->txt("cancel"), "cancelDeleteTracking");
1347  $cgui->setConfirm($this->lng->txt("confirm"), "confirmedDeleteTracking");
1348 
1349  foreach($_POST["user"] as $id)
1350  {
1351  if (ilObject::_exists($id) && ilObject::_lookUpType($id)=="usr" )
1352  {
1353  $user = new ilObjUser($id);
1354 
1355  $caption = ilUtil::getImageTagByType("sahs", $this->tpl->tplPath).
1356  " ".$this->lng->txt("cont_tracking_data").
1357  ": ".$user->getLastname().", ".$user->getFirstname();
1358 
1359 
1360  $cgui->addItem("user[]", $id, $caption);
1361  }
1362  }
1363 
1364  $this->tpl->setContent($cgui->getHTML());
1365  }
$_POST['username']
Definition: cron.php:12
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
redirection script todo: (a better solution should control the processing via a xml file) ...
Confirmation screen class.
+ Here is the call graph for this function:

◆ detachGlossary()

ilObjSCORM2004LearningModuleGUI::detachGlossary ( )

Detach glossary.

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

References $ilCtrl.

780  {
781  global $ilCtrl;
782 
783  $this->object->setAssignedGlossary(0);
784  $this->object->update();
785  $ilCtrl->redirect($this, "properties");
786  }
global $ilCtrl
Definition: ilias.php:18

◆ downloadExportFile()

ilObjSCORM2004LearningModuleGUI::downloadExportFile ( )

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

References $_POST, and ilUtil\deliverFile().

2868  {
2869  if(!isset($_POST["file"]))
2870  {
2871  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2872  }
2873 
2874  if (count($_POST["file"]) > 1)
2875  {
2876  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2877  }
2878  $export = new ilSCORM2004Export($this->object);
2879  $export_dir = $export->getExportDirectoryForType($_POST['type'][$_POST['file'][0]]);
2880  ilUtil::deliverFile($export_dir."/".$_POST['file'][0], $_POST['file'][0]);
2881  }
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
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 146 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET, and ilSCORM2004Node\_lookupType().

147  {
148  if ($_GET["obj_id"] > 0)
149  {
150  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
151  $type = ilSCORM2004Node::_lookupType($_GET["obj_id"]);
152  }
153  if (in_array($type, array("sco", "chap", "seqc", "page")))
154  {
155  $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
156  $this->ctrl->redirect($this, "jumpToNode");
157  }
158  else
159  {
160  if ($a_to_organization)
161  {
162  $this->ctrl->redirect($this, "showOrganization");
163  }
164  else
165  {
166  $this->ctrl->redirect($this, "properties");
167  }
168  }
169 
170  }
$_GET["client_id"]
static _lookupType($a_obj_id)
Lookup Type.
+ Here is the call graph for this function:

◆ editStyle()

ilObjSCORM2004LearningModuleGUI::editStyle ( )

Edit Style.

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

References $ilCtrl.

1034  {
1035  global $ilCtrl;
1036 
1037  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1038  }
global $ilCtrl
Definition: ilias.php:18

◆ editStyleProperties()

ilObjSCORM2004LearningModuleGUI::editStyleProperties ( )

Edit Stlye Properties.

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

References ilObjectGUI\$tpl, and initStylePropertiesForm().

942  {
943  global $tpl;
944 
945  $this->initStylePropertiesForm();
946  $tpl->setContent($this->form->getHTML());
947  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjSCORM2004LearningModuleGUI::executeCommand ( )

execute command

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

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

47  {
48  global $ilAccess, $ilCtrl, $tpl, $ilTabs, $lng;
49 
50  $next_class = $ilCtrl->getNextClass($this);
51  $cmd = $ilCtrl->getCmd();
52 
53  if ($this->object->getEditable() && $cmd != "showEditTree") // show editing frameset
54  {
55  $this->showEditTree();
56  }
57 
58  // update expander
59  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
60  $form_gui = new ilSCORM2004OrganizationHFormGUI();
61  $form_gui->setTree($this->getEditTree());
62  $form_gui->updateExpanded();
63  switch($next_class)
64  {
65  // notes
66  case "ilnotegui":
67  $this->getTemplate();
68  $this->setLocator();
69  $this->setTabs();
70  switch($_GET["notes_mode"])
71  {
72  default:
73  $ilTabs->setTabActive("sahs_organization");
74  return $this->showOrganization();
75  }
76  break;
77 
78  // chapters
79  case "ilscorm2004chaptergui":
80  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004ChapterGUI.php");
81  $chap_gui = new ilSCORM2004ChapterGUI($this->object, $_GET["obj_id"]);
82  $chap_gui->setParentGUI($this);
83  return $ilCtrl->forwardCommand($chap_gui);
84 
85  // sequencing chapters
86  case "ilscorm2004seqchaptergui":
87  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004SeqChapterGUI.php");
88  $chap_gui = new ilSCORM2004SeqChapterGUI($this->object, $_GET["obj_id"]);
89  $chap_gui->setParentGUI($this);
90  return $ilCtrl->forwardCommand($chap_gui);
91 
92  // scos
93  case "ilscorm2004scogui":
94  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
95  $sco_gui = new ilSCORM2004ScoGUI($this->object, $_GET["obj_id"]);
96  $sco_gui->setParentGUI($this);
97  return $ilCtrl->forwardCommand($sco_gui);
98 
99  // assets
100  case "ilscorm2004assetgui":
101  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004AssetGUI.php");
102  $ass_gui = new ilSCORM2004AssetGUI($this->object, $_GET["obj_id"]);
103  $ass_gui->setParentGUI($this);
104  return $ilCtrl->forwardCommand($ass_gui);
105 
106  // pages
107  case "ilscorm2004pagenodegui":
108  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNodeGUI.php");
109  $page_gui = new ilSCORM2004PageNodeGUI($this->object, $_GET["obj_id"]);
110  $page_gui->setParentGUI($this);
111  $ilCtrl->forwardCommand($page_gui);
112  break;
113 
114  default:
115  parent::executeCommand();
116  $this->addHeaderAction();
117  break;
118  }
119  }
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
getTemplate()
output main header (title and locator)
global $ilCtrl
Definition: ilias.php:18
Class ilSCORM2004PageNodeGUI.
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.
Class ilSCORM2004ChapterGUI.
This class allows quick editing of a chapter/sco/page hierarchy.
Class ilSCORM2004ScoGUI.
Class ilSCORM2004ChapterGUI.
setTabs()
output main frameset of media pool left frame: explorer tree of folders right frame: media pool conte...
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 2485 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2486  {
2487  $_GET["scexpand"] = "";
2488  $mtree = $this->object->getTree();
2489  $n_id = ($_GET["obj_id"] > 0)
2490  ? $_GET["obj_id"]
2491  : $mtree->readRootId();
2492  $stree = $mtree->getSubTree($mtree->getNodeData($n_id));
2493  $n_arr = array();
2494  foreach ($stree as $n)
2495  {
2496  $n_arr[] = $n["child"];
2497  $_SESSION["scexpand"] = $n_arr;
2498  }
2499  $this->saveAllTitles($a_redirect);
2500  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
saveAllTitles($a_redirect=true)
Save all titles of chapters/scos/pages.
$n
Definition: RandomTest.php:80
+ Here is the call graph for this function:

◆ exportAll()

ilObjSCORM2004LearningModuleGUI::exportAll ( )

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

1225  {
1226  $this->object->exportSelected(1);
1227 }

◆ exportHTML()

ilObjSCORM2004LearningModuleGUI::exportHTML ( )

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

References ilUtil\sendSuccess().

2834  {
2835  $export = new ilScorm2004Export($this->object,'HTML');
2836  $export->buildExportFile();
2837  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2838  $this->ctrl->redirect($this, "showExportList");
2839  }
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 2841 of file class.ilObjSCORM2004LearningModuleGUI.php.

References ilUtil\sendSuccess().

2842  {
2843  $export = new ilScorm2004Export($this->object,'HTMLOne');
2844  $export->buildExportFile();
2845  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2846  $this->ctrl->redirect($this, "showExportList");
2847  }
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 2849 of file class.ilObjSCORM2004LearningModuleGUI.php.

2850  {
2851  $export = new ilScorm2004Export($this->object,'ISO');
2852  if(!$export->buildExportFile())
2853  {
2854  if(!PATH_TO_MKISOFS)
2855  $this->ilias->raiseError($this->lng->txt("no_mkisofs_configured"),$this->ilias->error_obj->MESSAGE);
2856  }
2857  $this->ctrl->redirect($this, "showExportList");
2858  }
redirection script todo: (a better solution should control the processing via a xml file) ...
Export class for SCORM 2004 object.

◆ exportPDF()

ilObjSCORM2004LearningModuleGUI::exportPDF ( )

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

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

◆ exportScorm12()

ilObjSCORM2004LearningModuleGUI::exportScorm12 ( )

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

References ilUtil\sendSuccess().

2826  {
2827  $export = new ilScorm2004Export($this->object,'SCORM 1.2');
2828  $export->buildExportFile();
2829  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2830  $this->ctrl->redirect($this, "showExportList");
2831  }
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 2817 of file class.ilObjSCORM2004LearningModuleGUI.php.

References ilUtil\sendSuccess().

2818  {
2819  $export = new ilScorm2004Export($this->object,'SCORM 2004 3rd');
2820  $export->buildExportFile();
2821  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2822  $this->ctrl->redirect($this, "showExportList");
2823  }
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 2809 of file class.ilObjSCORM2004LearningModuleGUI.php.

References ilUtil\sendSuccess().

2810  {
2811  $export = new ilScorm2004Export($this->object,'SCORM 2004 4th');
2812  $export->buildExportFile();
2813  ilUtil::sendSuccess($this->lng->txt("exp_file_created"), true);
2814  $this->ctrl->redirect($this, "showExportList");
2815  }
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:

◆ exportSelected()

ilObjSCORM2004LearningModuleGUI::exportSelected ( )

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

References $_POST, and ilUtil\sendInfo().

1230 {
1231  if (!isset($_POST["user"]))
1232  {
1233  ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
1234  $this->ctrl->redirect($this, "showTrackingItems");
1235  } else {
1236  $this->object->exportSelected(0,$_POST["user"]);
1237  }
1238 }
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ 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 177 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

178  {
179  if ($this->object->getEditable()) // show editing frameset
180  {
181 $this->ctrl->redirect($this, "properties");
182  include_once("./Services/Frameset/classes/class.ilFramesetGUI.php");
183  $fs_gui = new ilFramesetGUI();
184  $fs_gui->setFramesetTitle($this->lng->txt("editor"));
185  $fs_gui->setMainFrameName("content");
186  $fs_gui->setSideFrameName("tree");
187  $this->ctrl->setParameter($this, "active_node", $_GET["obj_id"]);
188  $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this, "showTree"));
189  $this->ctrl->setParameter($this, "activeNode", "");
190  if ($_GET["obj_id"] > 0)
191  {
192  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
193  $type = ilSCORM2004Node::_lookupType($_GET["obj_id"]);
194  }
195  if (in_array($type, array("sco", "chap", "seqc", "page")))
196  {
197  $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
198  $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, "jumpToNode"));
199  }
200  else
201  {
202  if ($a_to_organization)
203  {
204  $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, "showOrganization"));
205  }
206  else
207  {
208  $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, "properties"));
209  }
210  }
211  $fs_gui->show();
212  exit;
213  }
214  else // otherwise show standard frameset
215  {
216  $this->tpl = new ilTemplate("tpl.sahs_edit_frameset.html", false, false, "Modules/ScormAicc");
217  $this->tpl->setVariable("SRC",
218  $this->ctrl->getLinkTarget($this, "properties"));
219  $this->tpl->show("DEFAULT", false);
220  }
221  exit;
222  }
exit
Definition: login.php:54
$_GET["client_id"]
static _lookupType($a_obj_id)
Lookup Type.
special template class to simplify handling of ITX/PEAR
Class ilFramesetGUI.
+ Here is the call graph for this function:

◆ getEditTree()

ilObjSCORM2004LearningModuleGUI::getEditTree ( )

Get editing tree object.

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

References ilTree\setTreeTablePK().

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

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

◆ getNotesHTML()

ilObjSCORM2004LearningModuleGUI::getNotesHTML (   $a_mode = "")

Get notes HTML.

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

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

Referenced by showOrganization().

1984  {
1985  global $ilCtrl;
1986 
1987  // notes
1988  $ilCtrl->setParameter($this, "nodes_mode", $a_mode);
1989  include_once("Services/Notes/classes/class.ilNoteGUI.php");
1990  $node_id = $_GET["obj_id"];
1991  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
1992  $node_type = ($node_id > 0)
1993  ? ilSCORM2004Node::_lookupType($node_id)
1994  : "sahs";
1995 
1996  $notes_gui = new ilNoteGUI($this->object->getId(),
1997  (int) $node_id, $node_type);
1998 // if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
1999 // {
2000 // $notes_gui->enablePublicNotesDeletion(true);
2001 // }
2002  $notes_gui->enablePrivateNotes();
2003  $notes_gui->enablePublicNotes();
2004 
2005  $next_class = $ilCtrl->getNextClass($this);
2006  if ($next_class == "ilnotegui")
2007  {
2008  $html = $this->ctrl->forwardCommand($notes_gui);
2009  }
2010  else
2011  {
2012  $html = $notes_gui->getNotesHTML();
2013  }
2014  return $html;
2015  }
$_GET["client_id"]
Notes GUI class.
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:

◆ getPropertiesEditableValues()

ilObjSCORM2004LearningModuleGUI::getPropertiesEditableValues ( )

Get current values for properties (editable) from.

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

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

Referenced by properties().

689  {
690  $values = array();
691 
692  if (ilObject::_lookupType($this->object->getAssignedGlossary()) == "glo")
693  {
694  $values["glossary"] = ilObject::_lookupTitle($this->object->getAssignedGlossary());
695  }
696  else
697  {
698  $values["glossary"] = $this->lng->txt("cont_no_glossary");
699  }
700  $values["q_tries"] = $this->object->getTries();
701  $values["localization"] = $this->object->getLocalization();
702  $values["style_id"] = $this->object->getStyleSheetId();
703 
704  $this->form->setValuesByArray($values);
705  }
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjSCORM2004LearningModuleGUI::getTabs ( $tabs_gui)

Adds tabs to tab gui object.

Parameters
object$tabs_guiilTabsGUI object

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

1787  {
1788  global $ilAccess, $ilHelp;
1789 
1790  if ($this->ctrl->getCmd() == "delete")
1791  {
1792  return;
1793  }
1794 
1795  if (!$this->object->getEditable())
1796  {
1797  return parent::getTabs($tabs_gui);
1798  }
1799 
1800  $ilHelp->setScreenIdComponent("sahsed");
1801 
1802  // organization
1803  $tabs_gui->addTarget("sahs_organization",
1804  $this->ctrl->getLinkTarget($this, "showOrganization"), "showOrganization",
1805  get_class($this));
1806 
1807  // info screen
1808  $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui")
1809  ? true
1810  : false;
1811  $tabs_gui->addTarget("info_short",
1812  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
1813  "ilinfoscreengui", "", $force_active);
1814 
1815  // settings
1816  $tabs_gui->addTarget("settings",
1817  $this->ctrl->getLinkTarget($this, "properties"), "properties",
1818  get_class($this));
1819 
1820  // tracking data
1821  /* Later, only if tracking data exists
1822  $tabs_gui->addTarget("cont_tracking_data",
1823  $this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems",
1824  get_class($this));
1825  */
1826 
1827  // objective alignment
1828  $tabs_gui->addTarget("sahs_objectives_alignment",
1829  $this->ctrl->getLinkTarget($this, "showLearningObjectivesAlignment"), "showLearningObjectivesAlignment",
1830  get_class($this));
1831 
1832  // sequencing
1833  $tabs_gui->addTarget("sahs_sequencing",
1834  $this->ctrl->getLinkTarget($this, "showSequencing"), "showSequencing",
1835  get_class($this));
1836 
1837  // learning progress
1838  /* Later, only if tracking data exists
1839  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
1840  if(ilObjUserTracking::_enabledLearningProgress())
1841  {
1842  $tabs_gui->addTarget('learning_progress',
1843  $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''),
1844  '',
1845  array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
1846  }
1847  */
1848 
1849  // edit meta
1850  $tabs_gui->addTarget("meta_data",
1851  $this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
1852  "", "ilmdeditorgui");
1853 
1854  // export
1855  $tabs_gui->addTarget("export",
1856  $this->ctrl->getLinkTarget($this, "showExportList"), array("showExportList", 'confirmDeleteExportFile'),
1857  get_class($this));
1858 
1859  // perm
1860  if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId()))
1861  {
1862  $tabs_gui->addTarget("perm_settings",
1863  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
1864  }
1865 
1866  if ($this->object->editable==1)
1867  {
1868  // preview
1869  $tabs_gui->addNonTabbedLink("preview",
1870  $this->lng->txt("cont_sc_preview"),
1871  $this->ctrl->getLinkTarget($this, "preview"),
1872  "_blank");
1873  }
1874 
1875  }

◆ ilObjSCORM2004LearningModuleGUI()

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

Constructor.

public

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

References ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

31  {
32  global $lng;
33 
34  $lng->loadLanguageModule("content");
35  $lng->loadLanguageModule("sahs");
36  $lng->loadLanguageModule("search");
37  $lng->loadLanguageModule("exp");
38  $this->type = "sahs";
39  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
40  #$this->tabs_gui =& new ilTabsGUI();
41  }
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
+ Here is the call graph for this function:

◆ initGlossaryCreationForm()

ilObjSCORM2004LearningModuleGUI::initGlossaryCreationForm ( )

Init glossary creation form.

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

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

Referenced by createGlossary(), and saveGlossary().

803  {
804  global $lng, $ilCtrl;
805 
806  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
807  $this->form = new ilPropertyFormGUI();
808 
809  // title
810  $ti = new ilTextInputGUI($lng->txt("title"), "title");
811  $ti->setRequired(true);
812  $this->form->addItem($ti);
813 
814  // description
815  $ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
816  $this->form->addItem($ta);
817 
818  $this->form->addCommandButton("saveGlossary", $lng->txt("save"));
819  $this->form->addCommandButton("properties", $lng->txt("cancel"));
820 
821  $this->form->setTitle($lng->txt("cont_glo_create"));
822  $this->form->setFormAction($ilCtrl->getFormAction($this));
823  }
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 604 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, $options, ilObjectGUI\$tree, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilUtil\formSelect(), ilNumberInputGUI\setMaxLength(), ilSelectInputGUI\setOptions(), and ilNonEditableValueGUI\setValue().

Referenced by properties(), and saveProperties().

605  {
606  global $lng, $ilCtrl, $tree, $rbacsystem, $ilSetting;
607 
608  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
609  $this->form = new ilPropertyFormGUI();
610 
611  // localization
612  $options = array(
613  "" => $lng->txt("please_select"),
614  );
615  $langs = $lng->getInstalledLanguages();
616  $lng->loadLanguageModule("meta");
617  foreach ($langs as $l)
618  {
619  $options[$l] = $lng->txt("meta_l_".$l);
620  }
621  $loc = new ilSelectInputGUI($this->lng->txt("cont_localization"), "localization");
622  $loc->setOptions($options);
623  $loc->setInfo($this->lng->txt("cont_localization_info"));
624  $this->form->addItem($loc);
625 
626  // glossary
627  $ne = new ilNonEditableValueGUI($lng->txt("obj_glo"), "glossary");
628  $this->form->addItem($ne);
629 
630  // style
631  $lng->loadLanguageModule("style");
632  $fixed_style = $ilSetting->get("fixed_content_style_id");
633  $style_id = $this->object->getStyleSheetId();
634 
635  if ($fixed_style > 0)
636  {
637  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
638  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
639  $this->lng->txt("global_fixed").")");
640  $this->form->addItem($st);
641  }
642  else
643  {
644  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
645  $_GET["ref_id"]);
646 
647  $st_styles[0] = $this->lng->txt("default");
648  ksort($st_styles);
649 
650  if ($style_id > 0)
651  {
652  // individual style
653  if (!ilObjStyleSheet::_lookupStandard($style_id))
654  {
655  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
656  $st->setValue(ilObject::_lookupTitle($style_id));
657  $this->form->addItem($st);
658  }
659  }
660 
661  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
662  {
663  $style_sel = ilUtil::formSelect ($style_id, "style_id",
664  $st_styles, false, true);
665  $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
666  $style_sel->setOptions($st_styles);
667  $style_sel->setValue($style_id);
668  $this->form->addItem($style_sel);
669  }
670  }
671 
672  // number of tries
673  $ni = new ilNumberInputGUI($lng->txt("cont_qtries"), "q_tries");
674  $ni->setMaxLength(3);
675  $ni->setSize(3);
676  $this->form->addItem($ni);
677 
678 
679  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
680 
681  $this->form->setTitle($lng->txt("cont_scorm_ed_properties"));
682  $this->form->setFormAction($ilCtrl->getFormAction($this));
683  }
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
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options
This class represents a number property in a property form.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
setOptions($a_options)
Set Options.
_lookupStandard($a_id)
Lookup standard flag.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:40
+ 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 355 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $options, $si, ilObjSAHSLearningModule\_lookupSubType(), ilSCORMOfflineMode\checkIfAnyoneIsInOfflineMode(), ilNumberInputGUI\setMaxLength(), ilSelectInputGUI\setOptions(), ilCheckboxInputGUI\setValue(), and ilNonEditableValueGUI\setValue().

Referenced by properties().

356  {
357  global $lng, $ilCtrl;
358 
359  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
360  $this->form = new ilPropertyFormGUI();
361  $this->form->setFormAction($ilCtrl->getFormAction($this));
362  $this->form->setTitle($this->lng->txt("cont_lm_properties"));
363 
364  // SCORM-type
365  $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
366  $ne->setValue($this->lng->txt( "lm_type_" . ilObjSAHSLearningModule::_lookupSubType( $this->object->getID() ) ) );
367  $this->form->addItem($ne);
368 
369  // version
370  $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
371  $ne->setValue($this->object->getModuleVersion());
372  $this->form->addItem($ne);
373 
374  // online
375  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
376  $cb->setValue("y");
377  if ($this->object->getOnline())
378  {
379  $cb->setChecked(true);
380  }
381  $this->form->addItem($cb);
382 
383  // offline Mode
384  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
385  $cb->setValue("y");
386  $cb->setChecked($this->object->getOfflineMode());
387  include_once("./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
388  if ($this->object->getOfflineMode()== true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
389  $cb->setDisabled(true);
390  $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
391  } else {
392  $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
393  }
394  $this->form->addItem($cb);
395 
396  //
397  // presentation
398  //
399  $sh = new ilFormSectionHeaderGUI();
400  $sh->setTitle($this->lng->txt("cont_presentation"));
401  $this->form->addItem($sh);
402 
403  // display mode (open)
404  $options = array(
405  "0" => $this->lng->txt("cont_open_normal"),
406  "1" => $this->lng->txt("cont_open_iframe_max"),
407  "2" => $this->lng->txt("cont_open_iframe_defined"),
408  "5" => $this->lng->txt("cont_open_window_undefined"),
409  "6" => $this->lng->txt("cont_open_window_defined")
410  );
411  $si = new ilSelectInputGUI($this->lng->txt("cont_open"), "open_mode");
412  $si->setOptions($options);
413  $si->setValue($this->object->getOpenMode());
414  $this->form->addItem($si);
415 
416  // width
417  $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width");
418  $ni->setMaxLength(4);
419  $ni->setSize(4);
420  $ni->setValue($this->object->getWidth());
421  $this->form->addItem($ni);
422 
423  // height
424  $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height");
425  $ni->setMaxLength(4);
426  $ni->setSize(4);
427  $ni->setValue($this->object->getHeight());
428  $this->form->addItem($ni);
429 
430  // disable top menu
431  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_nomenu"), "cobj_nomenu");
432  $cb->setValue("y");
433  $cb->setChecked($this->object->getNoMenu());
434  $this->form->addItem($cb);
435 
436  // disable left-side navigation
437  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_hidenavig"), "cobj_hidenavig");
438  $cb->setValue("y");
439  $cb->setChecked($this->object->getHideNavig());
440  $this->form->addItem($cb);
441 
442  // auto navigation to last visited item
443  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
444  $cb->setValue("y");
445  $cb->setChecked($this->object->getAuto_last_visited());
446  $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
447  $this->form->addItem($cb);
448 
449  // set IE compatibility mode
450  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_ie_compatibility"), "cobj_ie_compatibility");
451  $cb->setValue("y");
452  $cb->setChecked($this->object->getIe_compatibility());
453  $cb->setInfo($this->lng->txt("cont_ie_compatibility_info"));
454  $this->form->addItem($cb);
455 
456  // force IE to render again
457  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_ie_force_render"), "cobj_ie_force_render");
458  $cb->setValue("y");
459  $cb->setChecked($this->object->getIe_force_render());
460  $cb->setInfo($this->lng->txt("cont_ie_force_render_info"));
461  $this->form->addItem($cb);
462 
463  //
464  // scorm options
465  //
466  $sh = new ilFormSectionHeaderGUI();
467  $sh->setTitle($this->lng->txt("cont_scorm_options"));
468  $this->form->addItem($sh);
469 
470  // max attempts
471  $ni = new ilNumberInputGUI($this->lng->txt("cont_sc_max_attempt"), "max_attempt");
472  $ni->setMaxLength(3);
473  $ni->setSize(3);
474  $ni->setValue($this->object->getMaxAttempt());
475  $this->form->addItem($ni);
476 
477  // lesson mode
478  $options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"),
479  "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
480  $si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
481  $si->setOptions($options);
482  $si->setValue($this->object->getDefaultLessonMode());
483  $this->form->addItem($si);
484 
485  // credit mode
486  $options = array("credit" => $this->lng->txt("cont_credit_on"),
487  "no_credit" => $this->lng->txt("cont_credit_off"));
488  $si = new ilSelectInputGUI($this->lng->txt("cont_credit_mode"), "credit_mode");
489  $si->setOptions($options);
490  $si->setValue($this->object->getCreditMode());
491  $si->setInfo($this->lng->txt("cont_credit_mode_info"));
492  $this->form->addItem($si);
493 
494  // set lesson mode review when completed
495  $options = array(
496  "n" => $this->lng->txt("cont_sc_auto_review_no"),
497  "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
498  "p" => $this->lng->txt("cont_sc_auto_review_passed"),
499  "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
500  "c" => $this->lng->txt("cont_sc_auto_review_completed"),
501  "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
502  "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
503  );
504  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
505  $si->setOptions($options);
506  $si->setValue($this->object->getAutoReviewChar());
507  $si->setInfo($this->lng->txt("cont_sc_auto_review_info_2004"));
508  $this->form->addItem($si);
509 
510  //
511  // rte settings
512  //
513  $sh = new ilFormSectionHeaderGUI();
514  $sh->setTitle($this->lng->txt("cont_rte_settings"));
515  $this->form->addItem($sh);
516 
517  // unlimited session timeout
518  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
519  $cb->setValue("y");
520  $cb->setChecked($this->object->getSession());
521  $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
522  $this->form->addItem($cb);
523 
524  // SCORM 2004 fourth edition features
525  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_fourth_edition"), "cobj_fourth_edition");
526  $cb->setValue("y");
527  $cb->setChecked($this->object->getFourth_edition());
528  $cb->setInfo($this->lng->txt("cont_fourth_edition_info"));
529  $this->form->addItem($cb);
530 
531  // sequencing
532  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sequencing"), "cobj_sequencing");
533  $cb->setValue("y");
534  $cb->setChecked($this->object->getSequencing());
535  $cb->setInfo($this->lng->txt("cont_sequencing_info"));
536  $this->form->addItem($cb);
537 
538  // storage of interactions
539  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
540  $cb->setValue("y");
541  $cb->setChecked($this->object->getInteractions());
542  $this->form->addItem($cb);
543 
544  // objectives
545  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
546  $cb->setValue("y");
547  $cb->setChecked($this->object->getObjectives());
548  $this->form->addItem($cb);
549 
550  // comments
551  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_comments"), "cobj_comments");
552  $cb->setValue("y");
553  $cb->setChecked($this->object->getComments());
554  $this->form->addItem($cb);
555 
556  // time from lms
557  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
558  $cb->setValue("y");
559  $cb->setChecked($this->object->getTime_from_lms());
560  $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
561  $this->form->addItem($cb);
562 
563  // check values
564  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
565  $cb->setValue("y");
566  $cb->setChecked($this->object->getCheck_values());
567  $this->form->addItem($cb);
568 
569  // auto cmi.exit to suspend
570  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
571  $cb->setValue("y");
572  $cb->setChecked($this->object->getAutoSuspend());
573  $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
574  $this->form->addItem($cb);
575 
576  //
577  // debugging
578  //
579  $sh = new ilFormSectionHeaderGUI();
580  $sh->setTitle($this->lng->txt("cont_debugging"));
581  $this->form->addItem($sh);
582 
583  // test tool
584  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
585  $cb->setValue("y");
586  $cb->setChecked($this->object->getDebug());
587  if ($this->object->getDebugActivated() == false)
588  {
589  $cb->setDisabled(true);
590  $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
591  }
592  else
593  {
594  $cb->setInfo($this->lng->txt("cont_debug_deactivate"));
595  }
596  $this->form->addItem($cb);
597  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
598  }
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.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options
This class represents a number property in a property form.
setValue($a_value)
Set Value.
_lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)
setOptions($a_options)
Set Options.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a non editable value in a property form.
+ 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 952 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by editStyleProperties().

953  {
954  global $ilCtrl, $lng, $ilTabs, $ilSetting;
955 
956  $lng->loadLanguageModule("style");
957  $this->setSubTabs("settings", "style");
958  $ilTabs->setTabActive("settings");
959 
960  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
961  $this->form = new ilPropertyFormGUI();
962 
963  $fixed_style = $ilSetting->get("fixed_content_style_id");
964  $style_id = $this->object->getStyleSheetId();
965 
966  if ($fixed_style > 0)
967  {
968  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
969  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
970  $this->lng->txt("global_fixed").")");
971  $this->form->addItem($st);
972  }
973  else
974  {
975  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
976  $_GET["ref_id"]);
977 
978  $st_styles[0] = $this->lng->txt("default");
979  ksort($st_styles);
980 
981  if ($style_id > 0)
982  {
983  // individual style
984  if (!ilObjStyleSheet::_lookupStandard($style_id))
985  {
986  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
987  $st->setValue(ilObject::_lookupTitle($style_id));
988  $this->form->addItem($st);
989 
990 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
991 
992  // delete command
993  $this->form->addCommandButton("editStyle",
994  $lng->txt("cont_edit_style"));
995  $this->form->addCommandButton("deleteStyle",
996  $lng->txt("cont_delete_style"));
997 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
998  }
999  }
1000 
1001  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
1002  {
1003  $style_sel = ilUtil::formSelect ($style_id, "style_id",
1004  $st_styles, false, true);
1005  $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
1006  $style_sel->setOptions($st_styles);
1007  $style_sel->setValue($style_id);
1008  $this->form->addItem($style_sel);
1009 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1010  $this->form->addCommandButton("saveStyleSettings",
1011  $lng->txt("save"));
1012  $this->form->addCommandButton("createStyle",
1013  $lng->txt("sty_create_ind_style"));
1014  }
1015  }
1016  $this->form->setTitle($lng->txt("cont_style"));
1017  $this->form->setFormAction($ilCtrl->getFormAction($this));
1018  }
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
global $ilCtrl
Definition: ilias.php:18
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.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
setOptions($a_options)
Set Options.
_lookupStandard($a_id)
Lookup standard flag.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:40
+ 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 2121 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2122  {
2123  global $ilCtrl, $lng;
2124 
2125  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2126 
2127  $slm_tree =& new ilTree($this->object->getId());
2128  $slm_tree->setTreeTablePK("slm_id");
2129  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2130 
2133 
2134  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
2135  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2136 
2137  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) // insert after node id
2138  {
2139  $parent_id = $slm_tree->getParentId($node_id);
2140  $target = $node_id;
2141  }
2142  else // insert as first child
2143  {
2144  $parent_id = $node_id;
2145  $target = IL_FIRST_NODE;
2146  }
2147 
2148  $ass_ids = array();
2149  for ($i = 1; $i <= $num; $i++)
2150  {
2151  $ass = new ilSCORM2004Asset($this->object);
2152  $ass->setTitle($lng->txt("sahs_new_asset"));
2153  $ass->setSLMId($this->object->getId());
2154  $ass->create();
2155  ilSCORM2004Node::putInTree($ass, $parent_id, $target);
2156  $ass_ids[] = $ass->getId();
2157  }
2158  $ass_ids = array_reverse($ass_ids);
2159  $ass_ids = implode($ass_ids, ":");
2160 
2161  if ($a_redirect)
2162  {
2163  $ilCtrl->setParameter($this, "highlight", $ass_ids);
2164  $ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
2165  }
2166  return array("node_id" => $node_id, "items" => $ass_ids);
2167  }
static getPostMulti()
Get multi number of _POST input.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
Class ilSCORM2004Asset.
+ Here is the call graph for this function:

◆ insertAssetClip()

ilObjSCORM2004LearningModuleGUI::insertAssetClip ( )

Insert assets from clipboard.

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

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

2784  {
2785  global $ilCtrl, $ilUser;
2786 
2787  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2788  ilSCORM2004Node::insertAssetClip($this->object);
2789 
2790  $ilCtrl->redirect($this, "showOrganization",
2792  }
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
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 2020 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

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

◆ insertChapterClip()

ilObjSCORM2004LearningModuleGUI::insertChapterClip ( )

Insert chapter from clipboard.

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

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

2798  {
2799  global $ilCtrl, $ilUser;
2800 
2801  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2802  ilSCORM2004Node::insertChapterClip($this->object);
2803 
2804  $ilCtrl->redirect($this, "showOrganization",
2806  }
static getPostNodeId()
Get node ID of _POST input.
insertChapterClip($a_slm_obj, $a_as_sub=false)
Insert Chapter from clipboard.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ insertPage()

ilObjSCORM2004LearningModuleGUI::insertPage (   $a_redirect = true)

Insert (multiple) pages at node.

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

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

2173  {
2174  global $ilCtrl, $lng;
2175 
2176  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2177 
2178  $slm_tree =& new ilTree($this->object->getId());
2179  $slm_tree->setTreeTablePK("slm_id");
2180  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2181 
2184 
2185  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2186  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2187  if (!ilSCORM2004OrganizationHFormGUI::getPostFirstChild()) // insert after node id
2188  {
2189  $parent_id = $slm_tree->getParentId($node_id);
2190  $target = $node_id;
2191  }
2192  else // insert as first child
2193  {
2194  $parent_id = $node_id;
2195  $target = IL_FIRST_NODE;
2196  }
2197 
2198  $page_ids = array();
2199  for ($i = 1; $i <= $num; $i++)
2200  {
2201  $page = new ilSCORM2004PageNode($this->object);
2202  $page->setTitle($lng->txt("sahs_new_page"));
2203  $page->setSLMId($this->object->getId());
2204  $page->create();
2205  ilSCORM2004Node::putInTree($page, $parent_id, $target);
2206  $page_ids[] = $page->getId();
2207  }
2208  $page_ids = array_reverse($page_ids);
2209  $page_ids = implode($page_ids, ":");
2210 
2211  if ($a_redirect)
2212  {
2213  $ilCtrl->setParameter($this, "highlight", $page_ids);
2214  $ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
2215  }
2216  return array("node_id" => $node_id, "items" => $page_ids);
2217  }
Class ilSCORM2004PageNode.
static getPostMulti()
Get multi number of _POST input.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
+ Here is the call graph for this function:

◆ insertPageClip()

ilObjSCORM2004LearningModuleGUI::insertPageClip ( )

Insert pages from clipboard.

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

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

2756  {
2757  global $ilCtrl, $ilUser;
2758 
2759  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2760  ilSCORM2004Node::insertPageClip($this->object);
2761 
2762  $ilCtrl->redirect($this, "showOrganization",
2764  }
static getPostNodeId()
Get node ID of _POST input.
static insertPageClip($a_slm_obj)
Insert pages from clipboard.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ insertScenario()

ilObjSCORM2004LearningModuleGUI::insertScenario ( )

Insert sequencing scenario at node.

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

References $_POST, $ilCtrl, IL_FIRST_NODE, and ilTree\setTreeTablePK().

2296  {
2297  global $ilCtrl;
2298 
2299  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2300 
2301  $slm_tree =& new ilTree($this->object->getId());
2302  $slm_tree->setTreeTablePK("slm_id");
2303  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2304 
2305  $node_id = $_POST["node_id"];
2306 
2307  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2308  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2309  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2310 
2311  if (!$_POST["first_child"]) // insert after node id
2312  {
2313  $parent_id = $slm_tree->getParentId($node_id);
2314  $target = $node_id;
2315  }
2316  else // insert as first child
2317  {
2318  $parent_id = $node_id;
2319  $target = IL_FIRST_NODE;
2320  }
2321 
2322  $template = new ilSCORM2004SeqTemplate($_POST["identifier"]);
2323  $id = $template->insertTemplateForObjectAtParent($this->object,$parent_id,$target);
2324  $ilCtrl->setParameter($this, "highlight", $id);
2325  $ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
2326 
2327  }
$_POST['username']
Definition: cron.php:12
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.
+ Here is the call graph for this function:

◆ insertScenarioGUI()

ilObjSCORM2004LearningModuleGUI::insertScenarioGUI ( )

Insert sequencing scenario at node.

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

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

2224  {
2225 
2226  global $ilCtrl,$lng, $tpl;
2227 
2228  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2229  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
2230 
2231  $templates = array();
2232  $description = null;
2233  $image = null;
2234 
2235  $default_identifier = $_POST["identifier"];
2236 
2237  //get available templates
2238  $arr_templates = ilSCORM2004SeqTemplate::availableTemplates();
2239 
2240  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_seq_chooser.html", "Modules/Scorm2004");
2241 
2242  $this->tpl->setCurrentBlock("option_item");
2243 
2244  $active = null;
2245  foreach ($arr_templates as $templ)
2246  {
2247  $sel= "";
2248  $item_data = $templ->getMetadataProperties();
2249  $item_data['identifier'] = $templ->getIdentifier();
2250  array_push($templates,$item_data);
2251  if ($default_identifier == $item_data['identifier']) {$sel = 'selected'; $active = $item_data;}
2252  $this->tpl->setVariable("VAL_SELECTED",$sel );
2253  $this->tpl->setVariable("VAL_IDENTIFIER",$item_data['identifier'] );
2254  $this->tpl->setVariable("VAL_TITLE",$item_data['title'] );
2255  $this->tpl->parseCurrentBlock();
2256  }
2257 
2258  //default
2259  if ($active == null )
2260  {
2261  $this->saveAllTitles(false);
2262  $description = $templates[0]['description'];
2263  $image = $templates[0]['thumbnail'];
2264  } else {
2265  $description = $active['description'];
2266  $image = $active['thumbnail'];
2267  }
2268 
2269  $this->tpl->setVariable("VAL_DESCRIPTION",$description);
2270  $this->tpl->setVariable("VAL_IMAGE",ilSCORM2004SeqTemplate::SEQ_TEMPLATE_DIR."/images/".$image);
2271 
2272  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2273  $this->tpl->setVariable("BTN_NAME", "insertScenario");
2274  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2275  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2276  $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2277 
2278  $this->tpl->setVariable("TXT_TITLE", "Choose Sequencing Template");
2279 
2280  $node_id = $_POST["node_id"];
2281  $first_child = $_POST["first_child"];
2282 
2283  if (!$node_id) {$node_id = ilSCORM2004OrganizationHFormGUI::getPostNodeId();}
2284  if (!$first_child) {$first_child = ilSCORM2004OrganizationHFormGUI::getPostFirstChild();}
2285 
2286  $this->tpl->setVariable("VAL_NODE_ID", $node_id);
2287  $this->tpl->setVariable("VAL_FIRST_CHILD", $first_child);
2288 
2289  }
$_POST['username']
Definition: cron.php:12
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) ...
+ Here is the call graph for this function:

◆ insertSco()

ilObjSCORM2004LearningModuleGUI::insertSco (   $a_redirect = true)

Insert (multiple) scos at node.

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

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

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

◆ insertScoClip()

ilObjSCORM2004LearningModuleGUI::insertScoClip ( )

Insert scos from clipboard.

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

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

2770  {
2771  global $ilCtrl, $ilUser;
2772 
2773  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2774  ilSCORM2004Node::insertScoClip($this->object);
2775 
2776  $ilCtrl->redirect($this, "showOrganization",
2778  }
static getPostNodeId()
Get node ID of _POST input.
static insertScoClip($a_slm_obj)
Insert scos from clipboard.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ insertSpecialPage()

ilObjSCORM2004LearningModuleGUI::insertSpecialPage (   $a_redirect = true)

Insert special page.

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

References insertTemplateGUI().

2333  {
2334  $this->insertTemplateGUI($a_redirect, true);
2335  }
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 2426 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

2427  {
2428  global $ilCtrl, $lng;
2429 
2430  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2431 
2432  $slm_tree =& new ilTree($this->object->getId());
2433  $slm_tree->setTreeTablePK("slm_id");
2434  $slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
2435 
2436  $num = $_POST["multi"];
2437  $node_id = $_POST["node_id"];
2438  $layout_id = $_POST["layout_id"];
2439 
2440 
2441  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
2442  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
2443 
2444  if (!$_POST["first_child"]) // insert after node id
2445  {
2446  $parent_id = $slm_tree->getParentId($node_id);
2447  $target = $node_id;
2448  }
2449  else // insert as first child
2450  {
2451  $parent_id = $node_id;
2452  $target = IL_FIRST_NODE;
2453  }
2454 
2455  $page_ids = array();
2456  for ($i = 1; $i <= $num; $i++)
2457  {
2458  $page = new ilSCORM2004PageNode($this->object);
2459  $page->setTitle($lng->txt("sahs_new_page"));
2460  $page->setSLMId($this->object->getId());
2461  $page->create(false,$layout_id);
2462  ilSCORM2004Node::putInTree($page, $parent_id, $target);
2463  $page_ids[] = $page->getId();
2464  }
2465  $page_ids = array_reverse($page_ids);
2466  $page_ids = implode($page_ids, ":");
2467 
2468  if ($a_redirect)
2469  {
2470  if ($_GET["obj_id"] != "")
2471  {
2472  $this->jumpToNode($node_id, $page_ids);
2473  }
2474  else
2475  {
2476  $ilCtrl->setParameter($this, "highlight", $page_ids);
2477  $ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
2478  }
2479  }
2480  }
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
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
+ 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 2341 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by insertSpecialPage().

2342  {
2343  global $ilCtrl,$lng, $tpl;
2344 
2345  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
2346 
2347  $arr_templates = ilPageLayout::activeLayouts($a_special_page, ilPageLayout::MODULE_SCORM);
2348 
2349  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_page_layout_chooser.html", "Modules/Scorm2004");
2350 
2351  $this->tpl->setCurrentBlock("option_item");
2352 
2353  $count = 0;
2354  foreach ($arr_templates as $templ)
2355  {
2356  $count++;
2357  $sel= "";
2358  $templ->readObject();
2359  $this->tpl->setVariable("VAL_LAYOUT_TITLE",$templ->getTitle());
2360  $this->tpl->setVariable("VAL_LAYOUT_IMAGE",$templ->getPreview());
2361  $this->tpl->setVariable("VAL_LAYOUT_ID",$templ->getId());
2362  $this->tpl->setVariable("VAL_DISPLAY","inline");
2363  if ($count==1) {
2364  $this->tpl->setVariable("VAL_CHECKED","checked");
2365  }
2366  if ($count%4 == 0) {
2367  $this->tpl->setVariable("END_ROW","</tr>");
2368  }
2369  if ($count == 1 || ($count-1)%4 == 0) {
2370  $this->tpl->setVariable("BEGIN_ROW","<tr>");
2371  }
2372  $this->tpl->parseCurrentBlock();
2373  }
2374 
2375  //matrix table
2376  if ($count%4!=0) {
2377  $rest = 4-($count%4);
2378  } else {
2379  $rest=0;
2380  }
2381 
2382  for ($i=1;$i<=$rest;$i++) {
2383  $this->tpl->setVariable("VAL_DISPLAY","none");
2384  $this->tpl->setVariable("VAL_LAYOUT_ID",$templ->getId());
2385 
2386  if ($i == $rest) {
2387  $this->tpl->setVariable("END_ROW","</tr>");
2388  }
2389  $this->tpl->parseCurrentBlock();
2390  }
2391 
2392  //empty cells and closing <tr>
2393 
2394  $this->tpl->setVariable("VAL_NODE_ID",ilSCORM2004OrganizationHFormGUI::getPostNodeId());
2395  $this->tpl->setVariable("VAL_MULTI", ilSCORM2004OrganizationHFormGUI::getPostMulti());
2396  $this->tpl->setVariable("VAL_FIRST_CHILD", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2397  $this->tpl->setVariable("VAL_OBJ_ID", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
2398 
2399  $ilCtrl->saveParameter($this,"obj_id");
2400 
2401  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
2402 
2403  $this->tpl->setVariable("BTN_NAME", "insertTemplate");
2404  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2405  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("create"));
2406  $this->tpl->setVariable("CMD_CANCEL", "showOrganization");
2407 
2408  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
2409  $this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
2410  $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
2411  if ($a_special_page)
2412  {
2413  $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_special_page"));
2414  }
2415  else
2416  {
2417  $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_page_template"));
2418  }
2419  }
static getPostMulti()
Get multi number of _POST input.
$rest
Definition: goto.php:85
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) ...
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 224 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by insertTemplate().

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

◆ preview()

ilObjSCORM2004LearningModuleGUI::preview ( )

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

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

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

◆ proceedDragDrop()

ilObjSCORM2004LearningModuleGUI::proceedDragDrop ( )

Perform drag and drop action.

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

References $_POST, and $ilCtrl.

2668  {
2669  global $ilCtrl;
2670 
2671  $this->object->executeDragDrop($_POST["il_hform_source_id"], $_POST["il_hform_target_id"],
2672  $_POST["il_hform_fc"], $_POST["il_hform_as_subitem"]);
2673  $ilCtrl->redirect($this, "showOrganization");
2674  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ properties()

ilObjSCORM2004LearningModuleGUI::properties ( )

Scorm 2004 module properties.

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

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupType(), getPropertiesEditableValues(), initPropertiesEditableForm(), initPropertiesForm(), and ilObjSCORMLearningModuleGUI\setSubTabs().

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

◆ publishExportFile()

ilObjSCORM2004LearningModuleGUI::publishExportFile ( )

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

References $_POST, and $file.

2952  {
2953  if(!isset($_POST["file"]))
2954  {
2955  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2956  }
2957  if (count($_POST["file"]) > 1)
2958  {
2959  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2960  }
2961 
2962  $export = new ilSCORM2004Export($this->object);
2963  $file = $_POST['file'][0];
2964  $type = $_POST['type'][$_POST['file'][0]];
2965 
2966  if ($this->object->getPublicExportFile($type) == $file)
2967  {
2968  $this->object->setPublicExportFile($type, "");
2969  }
2970  else
2971  {
2972  $this->object->setPublicExportFile($type, $file);
2973  }
2974  $this->object->update();
2975  $this->ctrl->redirect($this, "showExportList");
2976  }
print $file
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ resetSearch()

ilObjSCORM2004LearningModuleGUI::resetSearch ( )

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

References $_SESSION.

1367  {
1368  unset($_SESSION["scorm_search_string"]);
1369  $this->ctrl->redirect($this, "showTrackingItems");
1370  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ saveAllTitles()

ilObjSCORM2004LearningModuleGUI::saveAllTitles (   $a_redirect = true)

Save all titles of chapters/scos/pages.

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

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

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

2530  {
2531  global $ilCtrl;
2532 
2533  if (is_array($_POST["title"]))
2534  {
2535  include_once("./Services/MetaData/classes/class.ilMD.php");
2536  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
2537  foreach($_POST["title"] as $id => $title)
2538  {
2539  $node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
2540  if (is_object($node_obj))
2541  {
2542  // Update Title and description
2543  $md = new ilMD($this->object->getId(), $id, $node_obj->getType());
2544  $md_gen = $md->getGeneral();
2545  $md_gen->setTitle(ilUtil::stripSlashes($title));
2546  $md_gen->update();
2547  $md->update();
2549  }
2550  }
2551  }
2552  if ($a_redirect)
2553  {
2554  $ilCtrl->redirect($this, "showOrganization");
2555  }
2556  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
& getGeneral()
Definition: class.ilMD.php:55
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static _writeTitle($a_obj_id, $a_title)
Write Title.
+ 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 828 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

829  {
830  global $tpl, $lng, $ilCtrl, $rbacsystem, $tree;
831 
832  $parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
833  if (!$rbacsystem->checkAccess("create", $parent_ref_id, "glo"))
834  {
835  ilUtil::sendFailure($lng->txt("no_permission"), true);
836  $ilCtrl->redirect($this, "properties");
837  }
838 
839  $this->initGlossaryCreationForm();
840  if ($this->form->checkInput())
841  {
842  include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
843  $newObj = new ilObjGlossary();
844  $newObj->setType("glo");
845  $newObj->setTitle($_POST["title"]);
846  $newObj->setDescription($_POST["description"]);
847  $newObj->setVirtualMode("none");
848  $newObj->create();
849  $newObj->createReference();
850  $newObj->putInTree($parent_ref_id);
851  $newObj->setPermissions($parent_ref_id);
852  $newObj->notify("new",$parent_ref_id,$_GET["parent_non_rbac_id"],$parent_ref_id,$newObj->getRefId());
853 
854  // perform save
855  $this->object->setAssignedGlossary($newObj->getId());
856  $this->object->update();
857 
858  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
859  $ilCtrl->redirect($this, "properties");
860  }
861 
862  $this->form->setValuesByPost();
863  $tpl->setContent($this->form->getHtml());
864  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilObjGlossary.
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ saveProperties()

ilObjSCORM2004LearningModuleGUI::saveProperties ( )

save scorm 2004 module properties

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

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

711  {
712  global $ilSetting;
713 
714  if ($this->object->editable != 1)
715  {
716  //check if OfflineMode-Zip has to be created
717  $tmpOfflineMode= ilUtil::yn2tf($_POST["cobj_offline_mode"]);
718  $tmpFourth_edition = ilUtil::yn2tf($_POST["cobj_fourth_edition"]);
719  $tmpSequencing = ilUtil::yn2tf($_POST["cobj_sequencing"]);
720  if ($tmpOfflineMode == true) {
721 // $tmpSequencing = false; //actually no sequencing for offline_mode
722  $tmpFourth_edition = false; //4th edition is not possible
723  if ($this->object->getOfflineMode() == false) {
724  $this->object->zipLmForOfflineMode();
725  }
726  }
727 
728  $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
729  $this->object->setOpenMode($_POST["open_mode"]);
730  $this->object->setWidth($_POST["width"]);
731  $this->object->setHeight($_POST["height"]);
732  $this->object->setCreditMode($_POST["credit_mode"]);
733  $this->object->setMaxAttempt($_POST["max_attempt"]);
734  $this->object->setAutoReviewChar($_POST["auto_review"]);
735  $this->object->setDefaultLessonMode($_POST["lesson_mode"]);
736  $this->object->setSession(ilUtil::yn2tf($_POST["cobj_session"]));
737  $this->object->setNoMenu(ilUtil::yn2tf($_POST["cobj_nomenu"]));
738  $this->object->setHideNavig(ilUtil::yn2tf($_POST["cobj_hidenavig"]));
739  $this->object->setAuto_last_visited(ilUtil::yn2tf($_POST["cobj_auto_last_visited"]));
740  $this->object->setIe_compatibility(ilUtil::yn2tf($_POST["cobj_ie_compatibility"]));
741  $this->object->setIe_force_render(ilUtil::yn2tf($_POST["cobj_ie_force_render"]));
742  $this->object->setFourth_edition($tmpFourth_edition);
743  $this->object->setSequencing($tmpSequencing);
744  $this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
745  $this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
746  $this->object->setComments(ilUtil::yn2tf($_POST["cobj_comments"]));
747  $this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
748  $this->object->setCheck_values(ilUtil::yn2tf($_POST["cobj_check_values"]));
749  $this->object->setAutoSuspend(ilUtil::yn2tf($_POST["cobj_auto_suspend"]));
750  $this->object->setOfflineMode($tmpOfflineMode);
751  $this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
752  //$this->object->setDebugPw($_POST["debug_pw"]);
753 
754  }
755  else
756  {
758  if ($this->form->checkInput())
759  {
760  $this->object->setTries($_POST["q_tries"]);
761  $this->object->setLocalization($_POST["localization"]);
762 
763  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
764  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
765  || $this->object->getStyleSheetId() == 0))
766  {
767  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
768  }
769  }
770  }
771  $this->object->update();
772  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
773  $this->ctrl->redirect($this, "properties");
774  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
initPropertiesEditableForm()
Init properties (editable) form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
_lookupStandard($a_id)
Lookup standard flag.
global $ilSetting
Definition: privfeed.php:40
static yn2tf($a_yn)
convert "y"/"n" to true/false
+ Here is the call graph for this function:

◆ saveSequencing()

ilObjSCORM2004LearningModuleGUI::saveSequencing ( )

Save sequencing.

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, $t, ilObjectGUI\$tpl, and ilUtil\sendSuccess().

1604  {
1605  global $tpl,$lng, $ilCtrl;
1606 
1607  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1608  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
1609  $t = $this->object->getTree();
1610  $root_node = $t->getNodeData($t->getRootId());
1611  $nodes = $this->object->getTree()->getSubtree($root_node);
1612  foreach ($nodes as $node)
1613  {
1614  if (in_array($node["type"], array("", "chap", "sco")))
1615  {
1616  if ($node["type"] == "")
1617  {
1618  $item = new ilSCORM2004Item($this->object->getId(), true);
1619  }
1620  else
1621  {
1622  $item = new ilSCORM2004Item($node["child"]);
1623  }
1624  $xml = '<?xml version="1.0"?>'.ilUtil::stripSlashes($_POST["seq"][$node["child"]], false);
1625 
1626  $ob_texts = array();
1627  if ($node["type"] == "sco")
1628  {
1629  $sco = new ilSCORM2004Sco($this->object, $node["child"]);
1630  $objectives = $sco->getObjectives();
1631  foreach ($objectives as $o)
1632  {
1633  $ob_texts[$o->getId()] = $o->getObjectiveId();
1634  }
1635  }
1636 
1637  $item->setSeqXml($xml);
1638  $item->initDom();
1639  $item->update();
1640 
1641  if ($node["type"] == "sco")
1642  {
1643  foreach ($ob_texts as $id => $t)
1644  {
1645  $objective = new ilScorm2004Objective($node["child"], $id);
1646  $objective->setObjectiveId($t);
1647  $objective->updateObjective();
1648  }
1649  }
1650  }
1651  }
1652 
1653  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1654 
1655  $ilCtrl->redirect($this, "showSequencing");
1656  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilSCORM2004Condition.
Class ilSCORM2004Sco.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjSCORM2004LearningModuleGUI::saveStyleSettings ( )

Save style settings.

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

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

1054  {
1055  global $ilSetting;
1056 
1057  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1058  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1059  || $this->object->getStyleSheetId() == 0))
1060  {
1061  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1062  $this->object->update();
1063  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1064  }
1065  $this->ctrl->redirect($this, "editStyleProperties");
1066  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
_lookupStandard($a_id)
Lookup standard flag.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ selectExport()

ilObjSCORM2004LearningModuleGUI::selectExport ( )

Select the export type of the SCORM 2004 module.

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

References $_POST.

1709  {
1710  switch ($_POST['select_export'])
1711  {
1712  case "exportScorm12":
1713  case "exportScorm2004_3rd":
1714  case "exportScorm2004_4th":
1715  case "exportPDF":
1716  case "exportISO":
1717  case "exportHTML":
1718  case "exportHTMLOne":
1719  $this->ctrl->redirect($this, $_POST['select_export']);
1720  break;
1721  default:
1722  $this->ctrl->redirect($this, 'showExportList');
1723  break;
1724  }
1725  }
$_POST['username']
Definition: cron.php:12

◆ selectGlossary()

ilObjSCORM2004LearningModuleGUI::selectGlossary ( )

Select glossary.

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

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

912  {
913  global $ilCtrl;
914 
915  $this->object->setAssignedGlossary(ilObject::_lookupObjId((int) $_GET["glo_ref_id"]));
916  $this->object->update();
917  $ilCtrl->redirect($this, "properties");
918  }
$_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 1697 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_POST, $_SESSION, and $ilCtrl.

1698  {
1699  global $ilCtrl;
1700 
1701  $_SESSION["sahs_cur_chap"] = (int) $_POST["chapter"];
1702  $ilCtrl->redirect($this, "showLearningObjectivesAlignment");
1703  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ setSubTabs()

ilObjSCORM2004LearningModuleGUI::setSubTabs (   $a_main_tab,
  $a_active 
)

Set sub tabs.

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

References $ilCtrl, and ilObjectGUI\$lng.

1881  {
1882  global $ilTabs, $ilCtrl, $lng;
1883 
1884  if ($a_main_tab == "settings" &&
1885  $this->object->editable == 1)
1886  {
1887 /* // general properties
1888  $ilTabs->addSubTab("general_settings",
1889  $lng->txt("general_settings"),
1890  $ilCtrl->getLinkTarget($this, 'properties'));
1891 
1892  // style properties
1893  $ilTabs->addSubTab("style",
1894  $lng->txt("cont_style"),
1895  $ilCtrl->getLinkTarget($this, 'editStyleProperties'));
1896 */
1897  $ilTabs->activateSubTab($a_active);
1898  }
1899  }
global $ilCtrl
Definition: ilias.php:18

◆ showEditTree()

ilObjSCORM2004LearningModuleGUI::showEditTree ( )

Show tree.

Parameters

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

References ilObjectGUI\$tpl.

Referenced by executeCommand().

128  {
129  global $tpl;
130 
131  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorerGUI.php");
132  $exp = new ilSCORM2004EditorExplorerGUI($this, "showEditTree", $this->object);
133  if (!$exp->handleCommand())
134  {
135  $tpl->setLeftNavContent($exp->getHTML());
136  }
137  }
+ Here is the caller graph for this function:

◆ showExportList()

ilObjSCORM2004LearningModuleGUI::showExportList ( )

Show Export List.

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

References ilObjectGUI\$data, ilObjectGUI\$tpl, ilDatePresentation\formatDate(), IL_CAL_UNIX, and ilUtil\prepareFormOutput().

1731  {
1732  global $tpl;
1733 
1734  $template = new ilTemplate("tpl.scorm2004_export_buttons.html", true, true, 'Modules/Scorm2004');
1735 
1736 /* $buttons = array(
1737  "exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
1738  "exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
1739  "exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
1740  "exportPDF" => $this->lng->txt("scorm_create_export_file_pdf"),
1741  "exportISO" => $this->lng->txt("scorm_create_export_file_iso"),
1742  "exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
1743  "exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
1744  );*/
1745  $buttons = array(
1746  "exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
1747  "exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
1748  "exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
1749  "exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
1750  "exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
1751  );
1752  foreach ($buttons as $value => $text)
1753  {
1754  $template->setCurrentBlock('option');
1755  $template->setVariable('OPTION_VALUE', $value);
1756  $template->setVariable('OPTION_TITLE', ilUtil::prepareFormOutput($text));
1757  $template->parseCurrentBlock();
1758  }
1759  $template->setVariable('EXPORT_TITLE', $this->lng->txt('export'));
1760  $template->setVariable('EXPORT_LABEL', $this->lng->txt('type'));
1761  $template->setVariable('FORMACTION', $this->ctrl->getFormAction($this, 'selectExport'));
1762 
1763  $export_files = $this->object->getExportFiles();
1764 
1765  include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
1766  $table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList');
1767  $data = array();
1768  foreach ($export_files as $exp_file)
1769  {
1770  $filetype = $exp_file['type'];
1771  $public_str = ($exp_file["file"] == $this->object->getPublicExportFile($filetype))
1772  ? " <b>(".$this->lng->txt("public").")<b>"
1773  : "";
1774  $file_arr = explode("__", $exp_file["file"]);
1775  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));
1776  }
1777  $table_gui->setData($data);
1778  $this->tpl->setVariable('ADM_CONTENT', $template->get() . "\n" . $table_gui->getHTML());
1779  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
const IL_CAL_UNIX
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
+ Here is the call graph for this function:

◆ showLearningObjectivesAlignment()

ilObjSCORM2004LearningModuleGUI::showLearningObjectivesAlignment ( )

Show Learning Objectives Alignment.

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

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

1662  {
1663  global $tpl, $lng, $ilCtrl, $ilToolbar;
1664 
1665  $chaps = $this->object->getTree()->getChilds(
1666  $this->object->getTree()->getRootId());
1667  $s_chaps = array();
1668  foreach($chaps as $chap)
1669  {
1670  if ($chap["type"] == "chap")
1671  {
1672  $s_chaps[$chap["child"]] = $chap["title"];
1673  }
1674  }
1675  $cur_chap = $_SESSION["sahs_cur_chap"]
1676  ? $_SESSION["sahs_cur_chap"]
1677  : 0;
1678 
1679  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1680  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1681  $options = array(
1682  "0" => $lng->txt("all")
1683  );
1684  $options = $options + $s_chaps;
1685  $si = new ilSelectInputGUI($lng->txt("chapter"), "chapter");
1686  $si->setOptions($options);
1687  $si->setValue($cur_chap);
1688  $ilToolbar->addInputItem($si, true);
1689  $ilToolbar->addFormButton($lng->txt("change"), "selectLObjChapter");
1690 
1691  include_once("./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
1692  $obj_table = new ilObjectivesAlignmentTableGUI($this, "showLearningObjectivesAlignment",
1693  $this->getEditTree(), $this->object, $cur_chap);
1694  $tpl->setContent($obj_table->getHTML());
1695  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
TableGUI class for learning objectives alignments.
This class represents a selection list property in a property form.
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options
+ 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 1916 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Referenced by executeCommand().

1918  {
1919  global $lng, $ilCtrl, $tpl;
1920 
1921  if ($a_form_action == "")
1922  {
1923  $a_form_action = $ilCtrl->getFormAction($this);
1924  }
1925 
1926  if ($a_icon == "")
1927  {
1928  $a_title = $this->object->getTitle();
1929  $a_icon = ilUtil::getImagePath("icon_lm.png");
1930  }
1931 
1932  $slm_tree = $this->getEditTree();
1933 
1934  if ($a_top_node == 0)
1935  {
1936  $a_top_node = $slm_tree->getRootId();
1937  }
1938 
1939  if (is_null($a_gui_obj))
1940  {
1941  $a_gui_obj = $this;
1942  $a_gui_cmd = "showOrganization";
1943  }
1944 
1945  $ilCtrl->setParameter($this, "backcmd", "showOrganization");
1946  include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
1947  $form_gui = new ilSCORM2004OrganizationHFormGUI();
1948  $form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
1949  $form_gui->setFormAction($a_form_action);
1950 // $form_gui->setTitle($a_title);
1951 // $form_gui->setIcon($a_icon);
1952  $form_gui->setTree($slm_tree);
1953  $form_gui->setCurrentTopNodeId($a_top_node);
1954  $form_gui->addMultiCommand($lng->txt("delete"), "deleteNodes");
1955  $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
1956  $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
1957  $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
1958  $form_gui->addCommand($lng->txt("expand_all"), "expandAll");
1959  $form_gui->addCommand($lng->txt("collapse_all"), "collapseAll");
1960  $form_gui->setTriggeredUpdateCommand("saveAllTitles");
1961 
1962  // highlighted nodes
1963  if ($_GET["highlight"] != "")
1964  {
1965  $hl = explode(":", $_GET["highlight"]);
1966  $form_gui->setHighlightedNodes($hl);
1967  $form_gui->setFocusId($hl[0]);
1968  }
1969 
1970  $ilCtrl->setParameter($this, "active_node", $_GET["obj_id"]);
1971 // $form_gui->setExplorerUpdater("tree", "tree_div",
1972 // $ilCtrl->getLinkTarget($this, "showTree", "", true));
1973  $sc_tpl = new ilTemplate("tpl.scormeditor_orga_screen.html", true, true, "Modules/Scorm2004");
1974  $sc_tpl->setVariable("ORGANIZATION", $form_gui->getHTML());
1975  $sc_tpl->setVariable("NOTES", $this->getNotesHTML());
1976 
1977  $tpl->setContent($sc_tpl->get());
1978  }
$_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 1512 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $t, ilObjectGUI\$tpl, and ilUtil\prepareFormOutput().

1513  {
1514  global $tpl, $lng, $ilTabs, $ilToolbar, $ilCtrl;
1515 
1516  $ilTabs->setTabActive("sahs_sequencing");
1517 
1518  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
1519 
1520  if (!$this->object->getSequencingExpertMode())
1521  {
1522  $ilToolbar->addButton($lng->txt("sahs_activate_expert_mode"),
1523  $ilCtrl->getLinkTarget($this, "confirmExpertMode"));
1524  }
1525  else
1526  {
1527  include_once("./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
1528  $list = new ilNestedList();
1529  $t = $this->object->getTree();
1530  $root_node = $t->getNodeData($t->getRootId());
1531  $nodes = $this->object->getTree()->getSubtree($root_node);
1532  foreach ($nodes as $node)
1533  {
1534  if (in_array($node["type"], array("", "chap", "sco")))
1535  {
1536  $ntpl = new ilTemplate("tpl.seq_node.html", true, true, "Modules/Scorm2004");
1537  $ntpl->setVariable("NODE_ID", $node["child"]);
1538  if ($node["type"] == "")
1539  {
1540  $ntpl->setVariable("TITLE", $this->object->getTitle());
1541  $item = new ilSCORM2004Item($this->object->getId(), true);
1542  }
1543  else
1544  {
1545  $ntpl->setVariable("TITLE", $node["title"]);
1546  $item = new ilSCORM2004Item($node["child"]);
1547  }
1548  $ntpl->setVariable("SEQ_INFO",
1549  ilUtil::prepareFormOutput($item->exportAsXML(false)));
1550  $list->addListNode($ntpl->get(), $node["child"], $node["parent"]);
1551  }
1552  }
1553 
1554  $tb = new ilToolbarGUI();
1555  $tb->addFormButton($lng->txt("save"), "saveSequencing");
1556  $ftpl = new ilTemplate("tpl.sequencing.html", true, true, "Modules/Scorm2004");
1557  $ftpl->setVariable("CONTENT", $list->getHTML());
1558  $ftpl->setVariable("FORM_ACTION", $ilCtrl->getFormAction($this));
1559  $ftpl->setVariable("TB", $tb->getHTML());
1560  $tpl->setContent($ftpl->get());
1561  }
1562  }
Class ilSCORM2004Condition.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
Nested List.
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
+ Here is the call graph for this function:

◆ showTrackingItem()

ilObjSCORM2004LearningModuleGUI::showTrackingItem ( )

show tracking data of item

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

References $_GET, ilObjectGUI\$data, and ilUtil\switchColor().

1244 {
1245 
1246  include_once "./Services/Table/classes/class.ilTableGUI.php";
1247 
1248  // load template for table
1249  $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
1250  // load template for table content data
1251  $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scorm2004_track_item.html", "Modules/Scorm2004");
1252 
1253  $num = 2;
1254 
1255  $this->tpl->setVariable("FORMACTION", "adm_object.php?ref_id=".$this->ref_id."$obj_str&cmd=gateway");
1256 
1257  // create table
1258  $tbl = new ilTableGUI();
1259 
1260  include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
1261  $sc_item =& new ilSCORMItem($_GET["obj_id"]);
1262 
1263  // title & header columns
1264  $user = new ilObjUser( $_GET["user_id"]);
1265  $tbl->setTitle($user->getLastname().", ".$user->getFirstname());
1266 
1267  $tbl->setHeaderNames(array($this->lng->txt("title"),
1268  $this->lng->txt("cont_status"), $this->lng->txt("cont_time"),
1269  $this->lng->txt("cont_score")));
1270 
1271  $header_params = array("ref_id" => $this->ref_id, "cmd" => $_GET["cmd"],
1272  "cmdClass" => get_class($this), "obj_id" => $_GET["obj_id"], "baseClass"=>"ilSAHSEditGUI", 'user_id'=>$_GET["user_id"]);
1273 
1274  $cols = array("title", "status", "time", "score");
1275  $tbl->setHeaderVars($cols, $header_params);
1276  //$tbl->setColumnWidth(array("25%",));
1277 
1278  // control
1279  $tbl->setOrderColumn($_GET["sort_by"]);
1280  $tbl->setOrderDirection($_GET["sort_order"]);
1281  $tbl->setLimit($_GET["limit"]);
1282  $tbl->setOffset($_GET["offset"]);
1283  $tbl->setMaxCount($this->maxcount);
1284 
1285  //$this->tpl->setVariable("COLUMN_COUNTS",count($this->data["cols"]));
1286  //$this->showActions(true);
1287 
1288  // footer
1289  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1290  #$tbl->disable("footer");
1291 
1292  $tr_data = $this->object->getTrackingDataAgg($_GET["user_id"]);
1293 
1294  //$objs = ilUtil::sortArray($objs, $_GET["sort_by"], $_GET["sort_order"]);
1295  $tbl->setMaxCount(count($tr_data));
1296  $tr_data = array_slice($tr_data, $_GET["offset"], $_GET["limit"]);
1297 
1298  $tbl->render();
1299 
1300  if (count($tr_data) > 0)
1301  {
1302  foreach ($tr_data as $data)
1303  {
1304  $this->tpl->setCurrentBlock("tbl_content");
1305  $this->tpl->setVariable("VAL_TITLE", $data["title"]);
1306  $this->ctrl->setParameter($this, "user_id", $_GET["user_id"]);
1307  $this->ctrl->setParameter($this, "obj_id", $data["sco_id"]);
1308 
1309  $this->tpl->setVariable("LINK_SCO",
1310  $this->ctrl->getLinkTarget($this, "showTrackingItemPerUser"));
1311  $this->tpl->setVariable("VAL_TIME", $data["time"]);
1312  $this->tpl->setVariable("VAL_STATUS", $data["status"]);
1313  $this->tpl->setVariable("VAL_SCORE", $data["score"]);
1314 
1315  $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
1316  $this->tpl->setVariable("CSS_ROW", $css_row);
1317  $this->tpl->parseCurrentBlock();
1318 
1319  }
1320  } //if is_array
1321  else
1322  {
1323  $this->tpl->setCurrentBlock("notfound");
1324  $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
1325  $this->tpl->setVariable("NUM_COLS", $num);
1326  $this->tpl->parseCurrentBlock();
1327  }
1328 }
$_GET["client_id"]
Class ilTableGUI.
SCORM Item.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
+ Here is the call graph for this function:

◆ showTrackingItems()

ilObjSCORM2004LearningModuleGUI::showTrackingItems ( )

show tracking data

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

References $_GET, $_POST, $_SESSION, ilObject\_exists(), ilPrivacySettings\_getInstance(), ilDatePresentation\formatDate(), ilUtil\getImagePath(), IL_CAL_DATETIME, ilUtil\sortArray(), and ilUtil\switchColor().

Referenced by deleteTrackingData().

1072 {
1073  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1074  $privacy = ilPrivacySettings::_getInstance();
1075  if (!$privacy->enabledSahsProtocolData())
1076  {
1077  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
1078  }
1079 
1080  include_once "./Services/Table/classes/class.ilTableGUI.php";
1081 
1082  //set search
1083 
1084  if ($_POST["search_string"] != "")
1085  {
1086  $_SESSION["scorm_search_string"] = trim($_POST["search_string"]);
1087  } else if (isset($_POST["search_string"]) && $_POST["search_string"] == "") {
1088  unset($_SESSION["scorm_search_string"]);
1089  }
1090 
1091  // load template for search additions
1092  $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl_scorm_track_items_search.html","Modules/ScormAicc");
1093  // load template for table
1094  $this->tpl->addBlockfile("USR_TABLE", "usr_table", "tpl.table.html");
1095  // load template for table content data
1096  $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scorm_track_items.html", "Modules/ScormAicc");
1097 
1098  $num = 5;
1099 
1100  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1101 
1102  // create table
1103  $tbl = new ilTableGUI();
1104 
1105  // title & header columns
1106  if (isset($_SESSION["scorm_search_string"])) {
1107  $tbl->setTitle($this->lng->txt("cont_tracking_items").' - Aktive Suche: "'.$_SESSION["scorm_search_string"].'"');
1108  } else {
1109  $tbl->setTitle($this->lng->txt("cont_tracking_items"));
1110  }
1111 
1112  $tbl->setHeaderNames(array("",$this->lng->txt("name"), $this->lng->txt("last_access"), $this->lng->txt("attempts"), $this->lng->txt("version") ));
1113 
1114 
1115  $header_params = $this->ctrl->getParameterArray($this, "showTrackingItems");
1116 
1117  $tbl->setColumnWidth(array("1%", "50%", "29%", "10%","10%"));
1118 
1119  $cols = array("user_id","username","last_access","attempts","version");
1120  $tbl->setHeaderVars($cols, $header_params);
1121 
1122  //set defaults
1123  $_GET["sort_order"] = $_GET["sort_order"] ? $_GET["sort_order"] : "asc";
1124  $_GET["sort_by"] = $_GET["sort_by"] ? $_GET["sort_by"] : "username";
1125 
1126  // control
1127  $tbl->setOrderColumn($_GET["sort_by"]);
1128  $tbl->setOrderDirection($_GET["sort_order"]);
1129  $tbl->setLimit($_GET["limit"]);
1130  $tbl->setOffset($_GET["offset"]);
1131  $tbl->setMaxCount($this->maxcount);
1132 
1133  $this->tpl->setVariable("COLUMN_COUNTS", 5);
1134 
1135  // delete button
1136  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
1137  $this->tpl->setCurrentBlock("tbl_action_btn");
1138  $this->tpl->setVariable("BTN_NAME", "deleteTrackingForUser");
1139  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
1140  $this->tpl->parseCurrentBlock();
1141 
1142  // decrease attempts
1143  $this->tpl->setCurrentBlock("tbl_action_btn");
1144  $this->tpl->setVariable("BTN_NAME", "decreaseAttempts");
1145  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("decrease_attempts"));
1146  $this->tpl->parseCurrentBlock();
1147 
1148  // export aggregated data for selected users
1149  $this->tpl->setCurrentBlock("tbl_action_btn");
1150  $this->tpl->setVariable("BTN_NAME", "exportSelected");
1151  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("export"));
1152  $this->tpl->parseCurrentBlock();
1153 
1154  // add search and export all
1155  // export aggregated data for all users
1156  $this->tpl->setVariable("EXPORT_ACTION",$this->ctrl->getFormAction($this));
1157 
1158  $this->tpl->setVariable("EXPORT_ALL_VALUE", $this->lng->txt('cont_export_all'));
1159  $this->tpl->setVariable("EXPORT_ALL_NAME", "exportAll");
1160  $this->tpl->setVariable("IMPORT_VALUE", $this->lng->txt('import'));
1161  $this->tpl->setVariable("IMPORT_NAME", "Import");
1162 
1163  $this->tpl->setVariable("SEARCH_TXT_SEARCH",$this->lng->txt('search'));
1164  $this->tpl->setVariable("SEARCH_ACTION",$this->ctrl->getFormAction($this));
1165  $this->tpl->setVariable("SEARCH_NAME",'showTrackingItems');
1166  if (isset($_SESSION["scorm_search_string"])) {
1167  $this->tpl->setVariable("STYLE",'display:inline;');
1168  } else {
1169  $this->tpl->setVariable("STYLE",'display:none;');
1170  }
1171  $this->tpl->setVariable("SEARCH_VAL", $_SESSION["scorm_search_string"]);
1172  $this->tpl->setVariable("SEARCH_VALUE",$this->lng->txt('search_users'));
1173  $this->tpl->parseCurrentBlock();
1174 
1175  // footer
1176  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1177 
1178  $items = $this->object->getTrackedUsers($_SESSION["scorm_search_string"]);
1179 
1180  $tbl->setMaxCount(count($items));
1181  $items = ilUtil::sortArray($items ,$_GET["sort_by"],$_GET["sort_order"]);
1182  $items = array_slice($items, $_GET["offset"], $_GET["limit"]);
1183 
1184  $tbl->render();
1185 
1186  if (count($items) > 0)
1187  {
1188  foreach ($items as $item)
1189  {
1190  if (ilObject::_exists($item["user_id"]) && ilObject::_lookUpType($item["user_id"])=="usr")
1191  {
1192  $user = new ilObjUser($item["user_id"]);
1193  $this->tpl->setCurrentBlock("tbl_content");
1194  $this->tpl->setVariable("VAL_USERNAME", $item["username"]);
1195  $this->tpl->setVariable("VAL_LAST", ilDatePresentation::formatDate(new ilDateTime($item["last_access"],IL_CAL_DATETIME)));
1196  $this->tpl->setVariable("VAL_ATTEMPT", $item["attempts"]);
1197  $this->tpl->setVariable("VAL_VERSION", $item['version']);
1198  $this->ctrl->setParameter($this, "user_id", $item["user_id"]);
1199  $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
1200  $this->tpl->setVariable("LINK_ITEM",
1201  $this->ctrl->getLinkTarget($this, "showTrackingItem"));
1202  $this->tpl->setVariable("CHECKBOX_ID", $item["user_id"]);
1203  $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
1204  $this->tpl->setVariable("CSS_ROW", $css_row);
1205  $this->tpl->parseCurrentBlock();
1206  }
1207  }
1208  $this->tpl->setCurrentBlock("selectall");
1209  $this->tpl->setVariable("SELECT_ALL", $this->lng->txt("select_all"));
1210  $this->tpl->setVariable("CSS_ROW", $css_row);
1211  $this->tpl->parseCurrentBlock();
1212 
1213  } //if is_array
1214  else
1215  {
1216  $this->tpl->setCurrentBlock("notfound");
1217  $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
1218  $this->tpl->setVariable("NUM_COLS", $num);
1219  $this->tpl->parseCurrentBlock();
1220  }
1221 
1222 }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
const IL_CAL_DATETIME
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
$_GET["client_id"]
Class ilTableGUI.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
redirection script todo: (a better solution should control the processing via a xml file) ...
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
static _getInstance()
Get instance of ilPrivacySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTree()

ilObjSCORM2004LearningModuleGUI::showTree ( )

Show Editing Tree.

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

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

1413  {
1414  global $ilUser, $ilias, $ilCtrl, $lng;
1415 
1416  $mtree = new ilTree($this->object->getId());
1417  $mtree->setTableNames('sahs_sc13_tree','sahs_sc13_tree_node');
1418  $mtree->setTreeTablePK("slm_id");
1419 
1420  if ($_POST["expandAll"] != "")
1421  {
1422  $_GET["scexpand"] = "";
1423  $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
1424  $n_arr = array();
1425  foreach ($stree as $n)
1426  {
1427  $n_arr[] = $n["child"];
1428  }
1429  $_SESSION["scexpand"] = $n_arr;
1430  }
1431 
1432  if ($_POST["collapseAll"] != "")
1433  {
1434  $_GET["scexpand"] = "";
1435  $_SESSION["scexpand"] = array($mtree->readRootId());
1436  }
1437 
1438  $this->tpl = new ilTemplate("tpl.main.html", true, true);
1439  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1440 
1441  $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
1442 
1443  $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
1444  $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
1445 
1446  $this->tpl->setCurrentBlock("exp2_button");
1447  $this->tpl->setVariable("CMD_EXP2_BTN", "expandAll");
1448  $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("expand_all"));
1449  $this->tpl->parseCurrentBlock();
1450 
1451  $this->tpl->setCurrentBlock("exp2_button");
1452  $this->tpl->setVariable("CMD_EXP2_BTN", "collapseAll");
1453  $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("collapse_all"));
1454  $this->tpl->parseCurrentBlock();
1455 
1456  require_once ("./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
1457  $exp = new ilSCORM2004EditorExplorer($this->ctrl->getLinkTarget($this, "edit"),
1458  $this->object);
1459  $exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
1460  $exp->setTargetGet("obj_id");
1461  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "showTree"));
1462 
1463  if ($_GET["scexpand"] == "")
1464  {
1465  $expanded = $mtree->readRootId();
1466  }
1467  else
1468  {
1469  $expanded = $_GET["scexpand"];
1470  }
1471 
1472 //echo "-".$_GET["active_node"]."-";
1473  if ($_GET["active_node"] != "")
1474  {
1475  $path = $mtree->getPathId($_GET["active_node"]);
1476  $exp->setForceOpenPath($path);
1477 
1478  $exp->highlightNode($_GET["active_node"]);
1479  }
1480  $exp->setExpand($expanded);
1481 
1482  // build html-output
1483  $exp->setOutput(0);
1484  $output = $exp->getOutput();
1485 
1486  // asynchronous output
1487  if ($ilCtrl->isAsynch())
1488  {
1489  echo $output; exit;
1490  }
1491 
1492  $this->tpl->setCurrentBlock("content");
1493  $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
1494  $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
1495  $this->tpl->setVariable("EXPLORER",$output);
1496  $this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
1497  $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
1498  $this->tpl->parseCurrentBlock();
1499 
1500  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
1501  iljQueryUtil::initjQuery($this->tpl);
1502 
1503  $this->tpl->show(false);
1504 
1505 
1506  exit;
1507  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
exit
Definition: login.php:54
$_POST['username']
Definition: cron.php:12
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be &#39;obj_id&#39; You may use...
$n
Definition: RandomTest.php:80
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
global $ilUser
Definition: imgupload.php:15
$path
Definition: index.php:22
static initjQuery($a_tpl=null)
Init jQuery.
+ Here is the call graph for this function:

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