ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups 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.
 executeCommand ()
 execute command
 frameset ()
 output main frameset of media pool left frame: explorer tree of folders right frame: media pool content
 jumpToNode ($a_anchor_node="", $a_highlight_ids="")
 properties ()
 Scorm 2004 module properties.
 initPropertiesEditableForm ()
 Init properties (editable) form.
 getPropertiesEditableValues ()
 Get current values for properties (editable) from.
 saveProperties ()
 save scorm 2004 module properties
 detachGlossary ()
 Detach glossary.
 createGlossary ()
 Create glossary.
 initGlossaryCreationForm ()
 Init glossary creation form.
 saveGlossary ()
 Save glossary form.
 assignGlossary ()
 Assign glossary.
 selectGlossary ()
 Select glossary.
 assignObject ()
 assign scorm object to scorm gui object
 editStyleProperties ()
 Edit Stlye Properties.
 initStylePropertiesForm ()
 Init style properties form.
 createStyle ()
 Create Style.
 editStyle ()
 Edit Style.
 deleteStyle ()
 Delete Style.
 saveStyleSettings ()
 Save style settings.
 showTrackingItems ()
 show tracking data
 exportAll ()
 exportSelected ()
 showTrackingItem ()
 show tracking data of item
 deleteTrackingForUser ()
 display deletion confirmation screen
 resetSearch ()
 cancelDeleteTracking ()
 cancel deletion of export files
 confirmedDeleteTracking ()
 Confirmed tracking deletion.
 decreaseAttempts ()
 deleteTrackingData ()
 showTree ()
 Show Editing Tree.
 showSequencing ()
 Show Sequencing.
 confirmExpertMode ()
 Confirm activation of expert mode.
 activateExpertMode ()
 Activate expert mode.
 saveSequencing ()
 Save sequencing.
 showLearningObjectivesAlignment ()
 Show Learning Objectives Alignment.
 selectLObjChapter ()
 selectExport ()
 Select the export type of the SCORM 2004 module.
 showExportList ()
 Show Export List.
 getTabs (&$tabs_gui)
 Adds tabs to tab gui object.
 setSubTabs ($a_main_tab, $a_active)
 Set sub tabs.
 getEditTree ()
 Get editing tree object.
 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.
 getNotesHTML ($a_mode="")
 Get notes HTML.
 insertChapter ($a_redirect=true)
 Insert (multiple) chapters at node.
 insertSco ($a_redirect=true)
 Insert (multiple) scos at node.
 insertAsset ($a_redirect=true)
 Insert (multiple) assets at node.
 insertPage ($a_redirect=true)
 Insert (multiple) pages at node.
 insertScenarioGUI ()
 Insert sequencing scenario at node.
 insertScenario ()
 Insert sequencing scenario at node.
 insertSpecialPage ($a_redirect=true)
 Insert special page.
 insertTemplateGUI ($a_redirect=true, $a_special_page=false)
 Displays GUI to select template for page.
 insertTemplate ($a_redirect=true)
 Insert (multiple) pages at node.
 expandAll ($a_redirect=true)
 Expand all.
 collapseAll ($a_redirect=true)
 Collapse all.
 saveAllTitles ($a_redirect=true)
 Save all titles of chapters/scos/pages.
 deleteNodes ($a_form_action="")
 confirm deletion screen of chapters/scos/pages
 cancelDelete ()
 cancel delete
 confirmedDelete ($a_redirect=true)
 Delete chapters/scos/pages.
 proceedDragDrop ()
 Perform drag and drop action.
 copyItems ($a_return="showOrganization")
 Copy items to clipboard.
 cutItems ($a_return="showOrganization")
 Copy items to clipboard, then cut them from the current tree.
 insertPageClip ()
 Insert pages from clipboard.
 insertScoClip ()
 Insert scos from clipboard.
 insertAssetClip ()
 Insert assets from clipboard.
 insertChapterClip ()
 Insert chapter from clipboard.
 exportScorm2004_4th ()
 exportScorm2004_3rd ()
 exportScorm12 ()
 exportHTML ()
 exportHTMLOne ()
 exportISO ()
 exportPDF ()
 downloadExportFile ()
 confirmDeleteExportFile ()
 confirmation screen for export file deletion
 cancelDeleteExportFile ()
 cancel deletion of export files
 deleteExportFile ()
 delete export files
 publishExportFile ()
 preview ()
- Public Member Functions inherited from ilObjSCORMLearningModuleGUI
 ilObjSCORMLearningModuleGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor.
 newModuleVersion ()
 upload new version of module
 getMaxFileSize ()
 newModuleVersionUpload ()
 confirmedDelete ()
 cancel ()
 overwrite..jump back to trackingdata not parent
 setSubTabs ()
- Public Member Functions inherited from ilObjSAHSLearningModuleGUI
 ilObjSAHSLearningModuleGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor.
 viewObject ()
 list childs of current object
 initCreationForms ($a_new_type)
 no manual SCORM creation, only import at the time
 initCreationForm ()
 Init form.
 initUploadForm ()
 Init upload form.
 cancelObject ($in_rep=false)
 Cancel action and go back to previous page.
 uploadObject ()
 display dialogue for importing SCORM package
 upload ()
 saveObject ()
 save new learning module to db
 info ()
 permission form
 owner ()
 show owner of learning module
 getTemplate ()
 output main header (title and locator)
 setTabs ()
 output tabs
 certificate ()
 Shows the certificate editor.
 _goto ($a_target)
 goto target course
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 undeleteObject ()
 Get objects back from trash.
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.

Additional Inherited Members

- 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
- Protected Member Functions inherited from ilObjSCORMLearningModuleGUI
 showTrackingItemsBySco ()
 show tracking data
 applyUserTableFilter ()
 Apply table filter.
 resetUserTableFilter ()
 Reset table filter.
 import ()
 gui functions for GUI export
 importForm ()
 Show import form.
 initImportForm ()
 Init import form.
 exportSelectionAll ()
 Show export section for all users.
 exportSelectionUsers ()
 Export selection for selected users.
 exportSelection ($a_type)
 Show export selection.
 initExportForm ($a_type)
 Init export form.
 export ()
 Do export.
 showTrackingItemSco ()
 show tracking data of item
 showTrackingItemPerUser ()
 show tracking data of item per user

Detailed Description

Member Function Documentation

ilObjSCORM2004LearningModuleGUI::activateExpertMode ( )

Activate expert mode.

Parameters
@return

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

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

{
global $ilCtrl, $lng;
$this->object->setSequencingExpertMode(true);
$this->object->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "showSequencing");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::assignGlossary ( )

Assign glossary.

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

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

{
global $tpl, $ilCtrl, $tree;
include_once("./Modules/Scorm2004/classes/class.ilGlossarySelectorGUI.php");
$ilCtrl->getLinkTarget($this, "selectGlossary"), "ilobjscorm2004learningmodulegui");
$exp->setSelectableTypes(array("glo"));
if ($_GET["expand"] == "")
{
$expanded = $tree->readRootId();
}
else
{
$expanded = $_GET["expand"];
}
$exp->setExpand($expanded);
$exp->setTargetGet("glo_id");
//$this->ctrl->setParameter($this, "target_type", $a_type);
//$ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
$exp->setParamsGet($this->ctrl->getParameterArray($this, "assignGlossary"));
// filter
$exp->setFiltered(true);
$exp->setFilterMode(IL_FM_POSITIVE);
$exp->addFilter("root");
$exp->addFilter("cat");
$exp->addFilter("grp");
$exp->addFilter("fold");
$exp->addFilter("crs");
$exp->addFilter("glo");
$exp->setOutput(0);
$tpl->setContent($exp->getOutput());
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::assignObject ( )

assign scorm object to scorm gui object

Reimplemented from ilObjSCORMLearningModuleGUI.

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

{
if ($this->id != 0)
{
if ($this->call_by_reference)
{
$this->object =& new ilObjSCORM2004LearningModule($this->id, true);
}
else
{
$this->object =& new ilObjSCORM2004LearningModule($this->id, false);
}
}
}
ilObjSCORM2004LearningModuleGUI::cancelDelete ( )

cancel delete

Reimplemented from ilObjSCORMLearningModuleGUI.

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

References $_GET.

{
$this->ctrl->redirect($this, $_GET["backcmd"]);
}
ilObjSCORM2004LearningModuleGUI::cancelDeleteExportFile ( )

cancel deletion of export files

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

{
session_unregister("ilExportFiles");
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::cancelDeleteTracking ( )

cancel deletion of export files

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

References ilUtil\sendInfo().

{
session_unregister("scorm_user_delete");
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "showTrackingItems");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::collapseAll (   $a_redirect = true)

Collapse all.

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

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

{
$_GET["scexpand"] = "";
$mtree = $this->object->getTree();
$n_id = ($_GET["obj_id"] > 0)
? $_GET["obj_id"]
: $mtree->readRootId();
$stree = $mtree->getSubTree($mtree->getNodeData($n_id));
$old = $_SESSION["scexpand"];
foreach ($stree as $n)
{
if (in_array($n["child"], $old) && $n["child"] != $n_id)
{
$k = array_search($n["child"], $old);
unset($old[$k]);
}
}
$_SESSION["scexpand"] = $old;
$this->saveAllTitles($a_redirect);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::confirmDeleteExportFile ( )

confirmation screen for export file deletion

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

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

{
if(!isset($_POST["file"]))
{
ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
$this->ctrl->redirect($this, "showExportList");
}
ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
$export_files = $this->object->getExportFiles();
include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
$table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList', true);
$data = array();
foreach ($export_files as $exp_file)
{
foreach ($_POST['file'] as $delete_file)
{
if (strcmp($delete_file, $exp_file['file']) == 0)
{
$public_str = ($exp_file["file"] == $this->object->getPublicExportFile($exp_file["type"]))
? " <b>(".$this->lng->txt("public").")<b>"
: "";
$file_arr = explode("__", $exp_file["file"]);
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));
}
}
}
$table_gui->setData($data);
$this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::confirmedDelete (   $a_redirect = true)

Delete chapters/scos/pages.

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

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

{
global $ilCtrl;
$tree = new ilTree($this->object->getId());
$tree->setTableNames('sahs_sc13_tree','sahs_sc13_tree_node');
$tree->setTreeTablePK("slm_id");
// delete all selected objects
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
foreach ($_POST["id"] as $id)
{
if ($id != IL_FIRST_NODE)
{
$obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
$node_data = $tree->getNodeData($id);
if (is_object($obj))
{
$obj->setSLMId($this->object->getId());
/*include_once("classes/class.ilHistory.php");
ilHistory::_createEntry($this->object->getId(), "delete_".$obj->getType(),
array(ilLMObject::_lookupTitle($id), $id),
$this->object->getType());*/
$obj->delete();
}
if($tree->isInTree($id))
{
$tree->deleteTree($node_data);
}
}
}
// check the tree
// $this->object->checkTree();
// feedback
ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
if ($a_redirect)
{
$ilCtrl->redirect($this, "showOrganization");
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::confirmedDeleteTracking ( )

Confirmed tracking deletion.

Todo:
alex, 14 Apr.: This does not confirm to our guidelines, please move DB access to application class

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

References $_SESSION, $ilDB, $ret, and ilLPStatusWrapper\_updateStatus().

{
global $ilDB, $ilUser;
$scos = array();
//get all SCO's of this object
$val_set = $ilDB->queryF('
SELECT cp_node_id FROM cp_node
WHERE nodename = %s
AND cp_node.slm_id = %s',
array('text', 'integer'),
array('item',$this->object->getId()));
while ($val_rec = $ilDB->fetchAssoc($val_set))
{
array_push($scos,$val_rec['cp_node_id']);
}
foreach ($_SESSION["scorm_user_delete"] as $user)
{
foreach ($scos as $sco)
{
$ret = $ilDB->manipulateF('
DELETE FROM cmi_node
WHERE user_id = %s
AND cp_node_id = %s',
array('integer','integer'),
array($user,$sco));
}
include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
ilLPStatusWrapper::_updateStatus($this->object->getId(), $user);
}
$this->ctrl->redirect($this, "showTrackingItems");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::confirmExpertMode ( )

Confirm activation of expert mode.

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

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

{
global $ilCtrl, $tpl, $lng, $ilTabs;
$ilTabs->setTabActive("sahs_sequencing");
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("sahs_activate_expert_mode_info"));
$cgui->setCancel($lng->txt("cancel"), "showSequencing");
$cgui->setConfirm($lng->txt("sahs_activate_expert_mode"), "activateExpertMode");
$tpl->setContent($cgui->getHTML());
}
ilObjSCORM2004LearningModuleGUI::copyItems (   $a_return = "showOrganization")

Copy items to clipboard.

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

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

{
global $ilCtrl, $lng;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$todel = array(); // delete IDs < 0 (needed for non-js editing)
foreach($items as $k => $item)
{
if ($item < 0)
{
$todel[] = $k;
}
}
foreach($todel as $k)
{
unset($items[$k]);
}
{
ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
$ilCtrl->redirect($this, $a_return);
}
ilSCORM2004Node::clipboardCopy($this->object->getId(), $items);
// @todo: move this to a service since it can be used here, too
include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
$ilCtrl->redirect($this, $a_return);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::createGlossary ( )

Create glossary.

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

References ilObjectGUI\$tpl, and initGlossaryCreationForm().

{
global $tpl;
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::createStyle ( )

Create Style.

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

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
}
ilObjSCORM2004LearningModuleGUI::cutItems (   $a_return = "showOrganization")

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

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

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

{
global $ilCtrl, $lng;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$todel = array(); // delete IDs < 0 (needed for non-js editing)
foreach($items as $k => $item)
{
if ($item < 0)
{
$todel[] = $k;
}
}
foreach($todel as $k)
{
unset($items[$k]);
}
{
ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
$ilCtrl->redirect($this, $a_return);
}
ilSCORM2004Node::clipboardCut($this->object->getId(), $items);
include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
$ilCtrl->redirect($this, $a_return);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::decreaseAttempts ( )

Reimplemented from ilObjSCORMLearningModuleGUI.

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

References $_POST, $ilDB, $res, and ilUtil\sendInfo().

{
global $ilDB, $ilUser;
if (!isset($_POST["user"]) || !is_array($_POST["user"]))
{
ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
}
foreach ($_POST["user"] as $user)
{
//first check if there is a package_attempts entry
//get existing account - sco id is always 0
$val_set = $ilDB->queryF('
SELECT * FROM cmi_custom
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s',
array('integer','integer','text','integer'),
array($user,0,'package_attempts',$this->object->getID()));
$val_rec = $ilDB->fetchAssoc($val_set);
$val_rec["rvalue"] = str_replace("\r\n", "\n", $val_rec["rvalue"]);
if ($val_rec["rvalue"] != null && $val_rec["rvalue"] != 0)
{
$new_rec = $val_rec["rvalue"]-1;
//decrease attempt by 1
$res = $ilDB->queryF('
SELECT * FROM cmi_custom
WHERE user_id = %s
AND lvalue = %s
AND obj_id = %s
AND sco_id = %s',
array('integer','text','integer','integer'),
array($user, 'package_attempts',$this->object->getID(),0));
if($ilDB->numRows($res) > 0)
{
$val_set = $ilDB->manipulateF('
UPDATE cmi_custom
SET rvalue = %s,
c_timestamp = %s
WHERE user_id = %s
AND sco_id = %s
AND obj_id = %s
AND lvalue = %s',
array('text','timestamp','integer','integer','integer','text'),
array($new_rec, date("Y-m-d H:i:s") ,$user,0,$this->object->getID(),'package_attempts'));
}
else
{
$val_set = $ilDB->manipulateF('
INSERT INTO cmi_custom
(rvalue,user_id,sco_id,obj_id,lvalue,c_timestamp)
VALUES(%s,%s,%s,%s,%s,%s)',
array('text','integer','integer','integer','text','timestamp'),
array($new_rec,$user,0,$this->object->getID(),'package_attempts',date("Y-m-d H:i:s")));
}
}
}
//$this->ctrl->saveParameter($this, "cdir");
$this->ctrl->redirect($this, "showTrackingItems");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::deleteExportFile ( )

delete export files

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

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

{
include_once "./Services/Utilities/classes/class.ilUtil.php";
$export = new ilSCORM2004Export($this->object);
foreach($_POST['file'] as $idx => $file)
{
$export_dir = $export->getExportDirectoryForType($_POST['type'][$idx]);
$exp_file = $export_dir."/".$file;
if (@is_file($exp_file))
{
unlink($exp_file);
}
}
ilUtil::sendSuccess($this->lng->txt('msg_deleted_export_files'), true);
$this->ctrl->redirect($this, "showExportList");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::deleteNodes (   $a_form_action = "")

confirm deletion screen of chapters/scos/pages

Parameters
stringform action

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

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

{
global $lng, $tpl;
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// SAVE POST VALUES
$_SESSION["saved_post"] = $_POST["id"];
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$confirmation_gui = new ilConfirmationGUI();
if ($a_form_action == "")
{
$cmd = ($_GET["backcmd"] == "")
? "showOrganization"
: $_GET["backcmd"];
$this->ctrl->setParameter($this, "backcmd", $cmd);
$a_form_action = $this->ctrl->getFormAction($this);
}
$confirmation_gui->setFormAction($a_form_action);
$confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
// Add items to delete
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
foreach($_POST["id"] as $id)
{
if ($id != IL_FIRST_NODE)
{
$node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
$confirmation_gui->addItem("id[]", $node_obj->getId(),
$node_obj->getTitle(), ilUtil::getImagePath("icon_".$node_obj->getType().".gif"));
}
}
$confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
$confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
$tpl->setContent($confirmation_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::deleteStyle ( )

Delete Style.

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

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
}
ilObjSCORM2004LearningModuleGUI::deleteTrackingData ( )

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

References $_POST, and showTrackingItems().

{
if (is_array($_POST["id"]))
{
$this->object->deleteTrackingDataOfUsers($_POST["id"]);
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::deleteTrackingForUser ( )

display deletion confirmation screen

Reimplemented from ilObjSCORMLearningModuleGUI.

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

References $_POST, $_SESSION, ilObject\_exists(), ilUtil\getImageTagByType(), ilObjectGUI\getTemplateFile(), ilUtil\sendInfo(), and ilUtil\switchColor().

{
if(!isset($_POST["user"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// SAVE POST VALUES
$_SESSION["scorm_user_delete"] = $_POST["user"];
unset($this->data);
$this->data["cols"] = array("type","title", "description");
foreach($_POST["user"] as $id)
{
if (ilObject::_exists($id) && ilObject::_lookUpType($id)=="usr" ) {
$user = new ilObjUser($id);
$this->data["data"]["$id"] = array(
"type" => "sahs",
"title" => $user->getLastname().", ".$user->getFirstname(),
"desc" => $this->lng->txt("cont_tracking_data")
);
}
}
$this->data["buttons"] = array( "cancelDeleteTracking" => $this->lng->txt("cancel"),
"confirmedDeleteTracking" => $this->lng->txt("confirm"));
$this->getTemplateFile("confirm");
ilUtil::sendInfo($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
// BEGIN TABLE HEADER
foreach ($this->data["cols"] as $key)
{
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT",$this->lng->txt($key));
$this->tpl->parseCurrentBlock();
}
// END TABLE HEADER
// BEGIN TABLE DATA
$counter = 0;
foreach($this->data["data"] as $key => $value)
{
// BEGIN TABLE CELL
foreach($value as $key => $cell_data)
{
$this->tpl->setCurrentBlock("table_cell");
// CREATE TEXT STRING
if($key == "type")
{
$this->tpl->setVariable("TEXT_CONTENT",ilUtil::getImageTagByType($cell_data,$this->tpl->tplPath));
}
else
{
$this->tpl->setVariable("TEXT_CONTENT",$cell_data);
}
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->parseCurrentBlock();
// END TABLE CELL
}
// END TABLE DATA
// BEGIN OPERATION_BTN
foreach($this->data["buttons"] as $name => $value)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("BTN_NAME",$name);
$this->tpl->setVariable("BTN_VALUE",$value);
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::detachGlossary ( )

Detach glossary.

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

References $ilCtrl.

{
global $ilCtrl;
$this->object->setAssignedGlossary(0);
$this->object->update();
$ilCtrl->redirect($this, "properties");
}
ilObjSCORM2004LearningModuleGUI::downloadExportFile ( )

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

References $_POST, and ilUtil\deliverFile().

{
if(!isset($_POST["file"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if (count($_POST["file"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
$export = new ilSCORM2004Export($this->object);
$export_dir = $export->getExportDirectoryForType($_POST['type'][$_POST['file'][0]]);
ilUtil::deliverFile($export_dir."/".$_POST['file'][0], $_POST['file'][0]);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::editStyle ( )

Edit Style.

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

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
}
ilObjSCORM2004LearningModuleGUI::editStyleProperties ( )

Edit Stlye Properties.

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

References ilObjectGUI\$tpl, and initStylePropertiesForm().

{
global $tpl;
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::executeCommand ( )

execute command

Reimplemented from ilObjSAHSLearningModuleGUI.

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

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

{
global $ilAccess, $ilCtrl, $tpl, $ilTabs, $lng;
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
// update expander
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$form_gui->setTree($this->getEditTree());
$form_gui->updateExpanded();
switch($next_class)
{
// notes
case "ilnotegui":
$this->getTemplate();
$this->setLocator();
$this->setTabs();
switch($_GET["notes_mode"])
{
default:
$ilTabs->setTabActive("sahs_organization");
return $this->showOrganization();
}
break;
// chapters
case "ilscorm2004chaptergui":
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004ChapterGUI.php");
$chap_gui = new ilSCORM2004ChapterGUI($this->object, $_GET["obj_id"]);
$chap_gui->setParentGUI($this);
return $ilCtrl->forwardCommand($chap_gui);
// sequencing chapters
case "ilscorm2004seqchaptergui":
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004SeqChapterGUI.php");
$chap_gui = new ilSCORM2004SeqChapterGUI($this->object, $_GET["obj_id"]);
$chap_gui->setParentGUI($this);
return $ilCtrl->forwardCommand($chap_gui);
// scos
case "ilscorm2004scogui":
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
$sco_gui = new ilSCORM2004ScoGUI($this->object, $_GET["obj_id"]);
$sco_gui->setParentGUI($this);
return $ilCtrl->forwardCommand($sco_gui);
// assets
case "ilscorm2004assetgui":
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004AssetGUI.php");
$ass_gui = new ilSCORM2004AssetGUI($this->object, $_GET["obj_id"]);
$ass_gui->setParentGUI($this);
return $ilCtrl->forwardCommand($ass_gui);
// pages
case "ilscorm2004pagenodegui":
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNodeGUI.php");
$page_gui = new ilSCORM2004PageNodeGUI($this->object, $_GET["obj_id"]);
$page_gui->setParentGUI($this);
$ilCtrl->forwardCommand($page_gui);
break;
default:
$this->addHeaderAction();
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::expandAll (   $a_redirect = true)

Expand all.

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

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

{
$_GET["scexpand"] = "";
$mtree = $this->object->getTree();
$n_id = ($_GET["obj_id"] > 0)
? $_GET["obj_id"]
: $mtree->readRootId();
$stree = $mtree->getSubTree($mtree->getNodeData($n_id));
$n_arr = array();
foreach ($stree as $n)
{
$n_arr[] = $n["child"];
$_SESSION["scexpand"] = $n_arr;
}
$this->saveAllTitles($a_redirect);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::exportAll ( )

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

{
$this->object->exportSelected(1);
}
ilObjSCORM2004LearningModuleGUI::exportHTML ( )

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

{
$export = new ilScorm2004Export($this->object,'HTML');
$export->buildExportFile();
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::exportHTMLOne ( )

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

{
$export = new ilScorm2004Export($this->object,'HTMLOne');
$export->buildExportFile();
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::exportISO ( )

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

{
$export = new ilScorm2004Export($this->object,'ISO');
if(!$export->buildExportFile())
{
if(!PATH_TO_MKISOFS)
$this->ilias->raiseError($this->lng->txt("no_mkisofs_configured"),$this->ilias->error_obj->MESSAGE);
}
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::exportPDF ( )

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

{
$export = new ilScorm2004Export($this->object,'PDF');
$export->buildExportFile();
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::exportScorm12 ( )

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

{
$export = new ilScorm2004Export($this->object,'SCORM 1.2');
$export->buildExportFile();
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::exportScorm2004_3rd ( )

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

{
$export = new ilScorm2004Export($this->object,'SCORM 2004 3rd');
$export->buildExportFile();
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::exportScorm2004_4th ( )

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

{
$export = new ilScorm2004Export($this->object,'SCORM 2004 4th');
$export->buildExportFile();
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::exportSelected ( )

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

References $_POST, and ilUtil\sendInfo().

{
if (!isset($_POST["user"]))
{
ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
$this->ctrl->redirect($this, "showTrackingItems");
} else {
$this->object->exportSelected(0,$_POST["user"]);
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::frameset ( )

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

Reimplemented from ilObjSAHSLearningModuleGUI.

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

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

{
if ($this->object->getEditable()) // show editing frameset
{
include_once("./Services/Frameset/classes/class.ilFramesetGUI.php");
$fs_gui = new ilFramesetGUI();
$fs_gui->setFramesetTitle($this->lng->txt("editor"));
$fs_gui->setMainFrameName("content");
$fs_gui->setSideFrameName("tree");
$this->ctrl->setParameter($this, "active_node", $_GET["obj_id"]);
$fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this, "showTree"));
$this->ctrl->setParameter($this, "activeNode", "");
if ($_GET["obj_id"] > 0)
{
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$type = ilSCORM2004Node::_lookupType($_GET["obj_id"]);
}
if (in_array($type, array("sco", "chap", "seqc", "page")))
{
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, "jumpToNode"));
}
else
{
$fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, "properties"));
}
$fs_gui->show();
}
else // otherwise show standard frameset
{
$this->tpl = new ilTemplate("tpl.sahs_edit_frameset.html", false, false, "Modules/ScormAicc");
$this->tpl->setVariable("SRC",
$this->ctrl->getLinkTarget($this, "properties"));
$this->tpl->show("DEFAULT", false);
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::getEditTree ( )

Get editing tree object.

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

References ilTree\setTreeTablePK().

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::getNotesHTML (   $a_mode = "")

Get notes HTML.

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

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

Referenced by showOrganization().

{
global $ilCtrl;
// notes
$ilCtrl->setParameter($this, "nodes_mode", $a_mode);
include_once("Services/Notes/classes/class.ilNoteGUI.php");
$node_id = $_GET["obj_id"];
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$node_type = ($node_id > 0)
: "sahs";
$notes_gui = new ilNoteGUI($this->object->getId(),
(int) $node_id, $node_type);
// if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
// {
// $notes_gui->enablePublicNotesDeletion(true);
// }
$notes_gui->enablePrivateNotes();
$notes_gui->enablePublicNotes();
$next_class = $ilCtrl->getNextClass($this);
if ($next_class == "ilnotegui")
{
$html = $this->ctrl->forwardCommand($notes_gui);
}
else
{
$html = $notes_gui->getNotesHTML();
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::getPropertiesEditableValues ( )

Get current values for properties (editable) from.

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

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

Referenced by properties().

{
$values = array();
if (ilObject::_lookupType($this->object->getAssignedGlossary()) == "glo")
{
$values["glossary"] = ilObject::_lookupTitle($this->object->getAssignedGlossary());
}
else
{
$values["glossary"] = $this->lng->txt("cont_no_glossary");
}
$values["q_tries"] = $this->object->getTries();
$values["localization"] = $this->object->getLocalization();
$values["style_id"] = $this->object->getStyleSheetId();
$this->form->setValuesByArray($values);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::getTabs ( $tabs_gui)

Adds tabs to tab gui object.

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjSAHSLearningModuleGUI.

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

{
global $ilAccess;
if ($this->ctrl->getCmd() == "delete")
{
return;
}
if (!$this->object->getEditable())
{
return parent::getTabs($tabs_gui);
}
// organization
$tabs_gui->addTarget("sahs_organization",
$this->ctrl->getLinkTarget($this, "showOrganization"), "showOrganization",
get_class($this));
// info screen
$force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui")
? true
: false;
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
"ilinfoscreengui", "", $force_active);
// settings
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "properties"), "properties",
get_class($this));
// tracking data
/* Later, only if tracking data exists
$tabs_gui->addTarget("cont_tracking_data",
$this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems",
get_class($this));
*/
// objective alignment
$tabs_gui->addTarget("sahs_objectives_alignment",
$this->ctrl->getLinkTarget($this, "showLearningObjectivesAlignment"), "showLearningObjectivesAlignment",
get_class($this));
// sequencing
$tabs_gui->addTarget("sahs_sequencing",
$this->ctrl->getLinkTarget($this, "showSequencing"), "showSequencing",
get_class($this));
// learning progress
/* Later, only if tracking data exists
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
if(ilObjUserTracking::_enabledLearningProgress())
{
$tabs_gui->addTarget('learning_progress',
$this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''),
'',
array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
}
*/
// edit meta
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
"", "ilmdeditorgui");
// export
$tabs_gui->addTarget("export",
$this->ctrl->getLinkTarget($this, "showExportList"), array("showExportList", 'confirmDeleteExportFile'),
get_class($this));
// perm
if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
if ($this->object->editable==1)
{
// preview
$tabs_gui->addNonTabbedLink("preview",
$this->lng->txt("cont_sc_preview"),
$this->ctrl->getLinkTarget($this, "preview"),
"_blank");
}
}
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().

{
global $lng;
$lng->loadLanguageModule("content");
$lng->loadLanguageModule("sahs");
$lng->loadLanguageModule("search");
$this->type = "sahs";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
#$this->tabs_gui =& new ilTabsGUI();
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::initGlossaryCreationForm ( )

Init glossary creation form.

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

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

Referenced by createGlossary(), and saveGlossary().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$ti->setRequired(true);
$this->form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
$this->form->addItem($ta);
$this->form->addCommandButton("saveGlossary", $lng->txt("save"));
$this->form->addCommandButton("properties", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("cont_glo_create"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::initPropertiesEditableForm ( )

Init properties (editable) form.

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

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

Referenced by properties(), and saveProperties().

{
global $lng, $ilCtrl, $tree, $rbacsystem, $ilSetting;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// localization
$options = array(
"" => $lng->txt("please_select"),
);
$langs = $lng->getInstalledLanguages();
$lng->loadLanguageModule("meta");
foreach ($langs as $l)
{
$options[$l] = $lng->txt("meta_l_".$l);
}
$loc = new ilSelectInputGUI($this->lng->txt("cont_localization"), "localization");
$loc->setOptions($options);
$loc->setInfo($this->lng->txt("cont_localization_info"));
$this->form->addItem($loc);
// glossary
$ne = new ilNonEditableValueGUI($lng->txt("obj_glo"), "glossary");
$this->form->addItem($ne);
// style
$lng->loadLanguageModule("style");
$fixed_style = $ilSetting->get("fixed_content_style_id");
$style_id = $this->object->getStyleSheetId();
if ($fixed_style > 0)
{
$st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
$st->setValue(ilObject::_lookupTitle($fixed_style)." (".
$this->lng->txt("global_fixed").")");
$this->form->addItem($st);
}
else
{
$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
$_GET["ref_id"]);
$st_styles[0] = $this->lng->txt("default");
ksort($st_styles);
if ($style_id > 0)
{
// individual style
{
$st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
$st->setValue(ilObject::_lookupTitle($style_id));
$this->form->addItem($st);
}
}
if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
{
$style_sel = ilUtil::formSelect ($style_id, "style_id",
$st_styles, false, true);
$style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
$style_sel->setOptions($st_styles);
$style_sel->setValue($style_id);
$this->form->addItem($style_sel);
}
}
// number of tries
$ni = new ilNumberInputGUI($lng->txt("cont_qtries"), "q_tries");
$ni->setMaxLength(3);
$ni->setSize(3);
$this->form->addItem($ni);
$this->form->addCommandButton("saveProperties", $lng->txt("save"));
$this->form->setTitle($lng->txt("cont_scorm_ed_properties"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::initStylePropertiesForm ( )

Init style properties form.

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

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

Referenced by editStyleProperties().

{
global $ilCtrl, $lng, $ilTabs, $ilSetting;
$lng->loadLanguageModule("style");
$this->setSubTabs("settings", "style");
$ilTabs->setTabActive("settings");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$fixed_style = $ilSetting->get("fixed_content_style_id");
$style_id = $this->object->getStyleSheetId();
if ($fixed_style > 0)
{
$st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
$st->setValue(ilObject::_lookupTitle($fixed_style)." (".
$this->lng->txt("global_fixed").")");
$this->form->addItem($st);
}
else
{
$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
$_GET["ref_id"]);
$st_styles[0] = $this->lng->txt("default");
ksort($st_styles);
if ($style_id > 0)
{
// individual style
{
$st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
$st->setValue(ilObject::_lookupTitle($style_id));
$this->form->addItem($st);
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
// delete command
$this->form->addCommandButton("editStyle",
$lng->txt("cont_edit_style"));
$this->form->addCommandButton("deleteStyle",
$lng->txt("cont_delete_style"));
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
}
}
if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
{
$style_sel = ilUtil::formSelect ($style_id, "style_id",
$st_styles, false, true);
$style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
$style_sel->setOptions($st_styles);
$style_sel->setValue($style_id);
$this->form->addItem($style_sel);
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
$this->form->addCommandButton("saveStyleSettings",
$lng->txt("save"));
$this->form->addCommandButton("createStyle",
$lng->txt("sty_create_ind_style"));
}
}
$this->form->setTitle($lng->txt("cont_style"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::insertAsset (   $a_redirect = true)

Insert (multiple) assets at node.

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

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

{
global $ilCtrl, $lng;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$slm_tree =& new ilTree($this->object->getId());
$slm_tree->setTreeTablePK("slm_id");
$slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
{
$parent_id = $slm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
$ass_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$ass = new ilSCORM2004Asset($this->object);
$ass->setTitle($lng->txt("sahs_new_asset"));
$ass->setSLMId($this->object->getId());
$ass->create();
ilSCORM2004Node::putInTree($ass, $parent_id, $target);
$ass_ids[] = $ass->getId();
}
$ass_ids = array_reverse($ass_ids);
$ass_ids = implode($ass_ids, ":");
if ($a_redirect)
{
$ilCtrl->setParameter($this, "highlight", $ass_ids);
$ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
}
return array("node_id" => $node_id, "items" => $ass_ids);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertAssetClip ( )

Insert assets from clipboard.

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

References $ilCtrl, and ilHierarchyFormGUI\getPostNodeId().

{
global $ilCtrl, $ilUser;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$ilCtrl->redirect($this, "showOrganization",
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertChapter (   $a_redirect = true)

Insert (multiple) chapters at node.

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

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

{
global $ilCtrl, $lng;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$slm_tree =& new ilTree($this->object->getId());
$slm_tree->setTreeTablePK("slm_id");
$slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
{
$parent_id = $slm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$chap_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$chap = new ilSCORM2004Chapter($this->object);
$chap->setTitle($lng->txt("sahs_new_chapter"));
$chap->setSLMId($this->object->getId());
$chap->create();
ilSCORM2004Node::putInTree($chap, $parent_id, $target);
$chap_ids[] = $chap->getId();
}
$chap_ids = array_reverse($chap_ids);
$chap_ids = implode($chap_ids, ":");
if ($a_redirect)
{
$ilCtrl->setParameter($this, "highlight", $chap_ids);
$ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
}
return array("node_id" => $node_id, "items" => $chap_ids);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertChapterClip ( )

Insert chapter from clipboard.

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

References $ilCtrl, and ilHierarchyFormGUI\getPostNodeId().

{
global $ilCtrl, $ilUser;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$ilCtrl->redirect($this, "showOrganization",
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertPage (   $a_redirect = true)

Insert (multiple) pages at node.

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

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

{
global $ilCtrl, $lng;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$slm_tree =& new ilTree($this->object->getId());
$slm_tree->setTreeTablePK("slm_id");
$slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
{
$parent_id = $slm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
$page_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$page = new ilSCORM2004PageNode($this->object);
$page->setTitle($lng->txt("sahs_new_page"));
$page->setSLMId($this->object->getId());
$page->create();
ilSCORM2004Node::putInTree($page, $parent_id, $target);
$page_ids[] = $page->getId();
}
$page_ids = array_reverse($page_ids);
$page_ids = implode($page_ids, ":");
if ($a_redirect)
{
$ilCtrl->setParameter($this, "highlight", $page_ids);
$ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
}
return array("node_id" => $node_id, "items" => $page_ids);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertPageClip ( )

Insert pages from clipboard.

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

References $ilCtrl, and ilHierarchyFormGUI\getPostNodeId().

{
global $ilCtrl, $ilUser;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$ilCtrl->redirect($this, "showOrganization",
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertScenario ( )

Insert sequencing scenario at node.

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

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

{
global $ilCtrl;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$slm_tree =& new ilTree($this->object->getId());
$slm_tree->setTreeTablePK("slm_id");
$slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
$node_id = $_POST["node_id"];
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
if (!$_POST["first_child"]) // insert after node id
{
$parent_id = $slm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
$template = new ilSCORM2004SeqTemplate($_POST["identifier"]);
$id = $template->insertTemplateForObjectAtParent($this->object,$parent_id,$target);
$ilCtrl->setParameter($this, "highlight", $id);
$ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertScenarioGUI ( )

Insert sequencing scenario at node.

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

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

{
global $ilCtrl,$lng, $tpl;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
$templates = array();
$description = null;
$image = null;
$default_identifier = $_POST["identifier"];
//get available templates
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_seq_chooser.html", "Modules/Scorm2004");
$this->tpl->setCurrentBlock("option_item");
$active = null;
foreach ($arr_templates as $templ)
{
$sel= "";
$item_data = $templ->getMetadataProperties();
$item_data['identifier'] = $templ->getIdentifier();
array_push($templates,$item_data);
if ($default_identifier == $item_data['identifier']) {$sel = 'selected'; $active = $item_data;}
$this->tpl->setVariable("VAL_SELECTED",$sel );
$this->tpl->setVariable("VAL_IDENTIFIER",$item_data['identifier'] );
$this->tpl->setVariable("VAL_TITLE",$item_data['title'] );
$this->tpl->parseCurrentBlock();
}
//default
if ($active == null )
{
$this->saveAllTitles(false);
$description = $templates[0]['description'];
$image = $templates[0]['thumbnail'];
} else {
$description = $active['description'];
$image = $active['thumbnail'];
}
$this->tpl->setVariable("VAL_DESCRIPTION",$description);
$this->tpl->setVariable("VAL_IMAGE",ilSCORM2004SeqTemplate::SEQ_TEMPLATE_DIR."/images/".$image);
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("BTN_NAME", "insertScenario");
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
$this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
$this->tpl->setVariable("TXT_TITLE", "Choose Sequencing Template");
$node_id = $_POST["node_id"];
$first_child = $_POST["first_child"];
if (!$node_id) {$node_id = ilSCORM2004OrganizationHFormGUI::getPostNodeId();}
if (!$first_child) {$first_child = ilSCORM2004OrganizationHFormGUI::getPostFirstChild();}
$this->tpl->setVariable("VAL_NODE_ID", $node_id);
$this->tpl->setVariable("VAL_FIRST_CHILD", $first_child);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertSco (   $a_redirect = true)

Insert (multiple) scos at node.

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

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

{
global $ilCtrl, $lng;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$slm_tree =& new ilTree($this->object->getId());
$slm_tree->setTreeTablePK("slm_id");
$slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
{
$parent_id = $slm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
$sco_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$sco = new ilSCORM2004Sco($this->object);
$sco->setTitle($lng->txt("sahs_new_sco"));
$sco->setSLMId($this->object->getId());
$sco->create();
ilSCORM2004Node::putInTree($sco, $parent_id, $target);
$sco_ids[] = $sco->getId();
}
$sco_ids = array_reverse($sco_ids);
$sco_ids = implode($sco_ids, ":");
if ($a_redirect)
{
$ilCtrl->setParameter($this, "highlight", $sco_ids);
$ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
}
return array("node_id" => $node_id, "items" => $sco_ids);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertScoClip ( )

Insert scos from clipboard.

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

References $ilCtrl, and ilHierarchyFormGUI\getPostNodeId().

{
global $ilCtrl, $ilUser;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$ilCtrl->redirect($this, "showOrganization",
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertSpecialPage (   $a_redirect = true)

Insert special page.

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

References insertTemplateGUI().

{
$this->insertTemplateGUI($a_redirect, true);
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::insertTemplate (   $a_redirect = true)

Insert (multiple) pages at node.

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

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

{
global $ilCtrl, $lng;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$slm_tree =& new ilTree($this->object->getId());
$slm_tree->setTreeTablePK("slm_id");
$slm_tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
$num = $_POST["multi"];
$node_id = $_POST["node_id"];
$layout_id = $_POST["layout_id"];
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
if (!$_POST["first_child"]) // insert after node id
{
$parent_id = $slm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
$page_ids = array();
for ($i = 1; $i <= $num; $i++)
{
$page = new ilSCORM2004PageNode($this->object);
$page->setTitle($lng->txt("sahs_new_page"));
$page->setSLMId($this->object->getId());
$page->create(false,$layout_id);
ilSCORM2004Node::putInTree($page, $parent_id, $target);
$page_ids[] = $page->getId();
}
$page_ids = array_reverse($page_ids);
$page_ids = implode($page_ids, ":");
if ($a_redirect)
{
if ($_GET["obj_id"] != "")
{
$this->jumpToNode($node_id, $page_ids);
}
else
{
$ilCtrl->setParameter($this, "highlight", $page_ids);
$ilCtrl->redirect($this, "showOrganization", "node_".$node_id);
}
}
}

+ Here is the call graph for this function:

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

Displays GUI to select template for page.

Definition at line 2306 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().

{
global $ilCtrl,$lng, $tpl;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$arr_templates = ilPageLayout::activeLayouts($a_special_page, ilPageLayout::MODULE_SCORM);
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scormeditor_page_layout_chooser.html", "Modules/Scorm2004");
$this->tpl->setCurrentBlock("option_item");
$count = 0;
foreach ($arr_templates as $templ)
{
$count++;
$sel= "";
$templ->readObject();
$this->tpl->setVariable("VAL_LAYOUT_TITLE",$templ->getTitle());
$this->tpl->setVariable("VAL_LAYOUT_IMAGE",$templ->getPreview());
$this->tpl->setVariable("VAL_LAYOUT_ID",$templ->getId());
$this->tpl->setVariable("VAL_DISPLAY","inline");
if ($count==1) {
$this->tpl->setVariable("VAL_CHECKED","checked");
}
if ($count%4 == 0) {
$this->tpl->setVariable("END_ROW","</tr>");
}
if ($count == 1 || ($count-1)%4 == 0) {
$this->tpl->setVariable("BEGIN_ROW","<tr>");
}
$this->tpl->parseCurrentBlock();
}
//matrix table
if ($count%4!=0) {
$rest = 4-($count%4);
} else {
$rest=0;
}
for ($i=1;$i<=$rest;$i++) {
$this->tpl->setVariable("VAL_DISPLAY","none");
$this->tpl->setVariable("VAL_LAYOUT_ID",$templ->getId());
if ($i == $rest) {
$this->tpl->setVariable("END_ROW","</tr>");
}
$this->tpl->parseCurrentBlock();
}
//empty cells and closing <tr>
$this->tpl->setVariable("VAL_NODE_ID",ilSCORM2004OrganizationHFormGUI::getPostNodeId());
$this->tpl->setVariable("VAL_MULTI", ilSCORM2004OrganizationHFormGUI::getPostMulti());
$this->tpl->setVariable("VAL_FIRST_CHILD", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
$this->tpl->setVariable("VAL_OBJ_ID", ilSCORM2004OrganizationHFormGUI::getPostFirstChild());
$ilCtrl->saveParameter($this,"obj_id");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("BTN_NAME", "insertTemplate");
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_INSERT", $this->lng->txt("create"));
$this->tpl->setVariable("CMD_CANCEL", "showOrganization");
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_INSERT", $this->lng->txt("insert"));
$this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
if ($a_special_page)
{
$this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_special_page"));
}
else
{
$this->tpl->setVariable("TXT_TITLE", $this->lng->txt("sahs_choose_page_template"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

Referenced by insertTemplate().

{
global $ilCtrl;
$anchor = ($a_anchor_node != "")
? "node_".$a_anchor_node
: "";
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$type = ilSCORM2004Node::_lookupType($_GET["obj_id"]);
$ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
switch($type)
{
case "sco":
$ilCtrl->setParameterByClass("ilscorm2004scogui", "highlight", $a_highlight_ids);
$ilCtrl->redirectByClass("ilscorm2004scogui", "showOrganization", $anchor);
case "ass":
$ilCtrl->setParameterByClass("ilscorm2004assetgui", "highlight", $a_highlight_ids);
$ilCtrl->redirectByClass("ilscorm2004assetgui", "showOrganization", $anchor);
case "chap":
$ilCtrl->setParameterByClass("ilscorm2004chaptergui", "highlight", $a_highlight_ids);
$ilCtrl->redirectByClass("ilscorm2004chaptergui", "showOrganization", $anchor);
case "seqc":
$ilCtrl->setParameterByClass("ilscorm2004seqchaptergui", "highlight", $a_highlight_ids);
$ilCtrl->redirectByClass("ilscorm2004seqchaptergui", "showOrganization", $anchor);
case "page":
$ilCtrl->redirectByClass("ilscorm2004pagenodegui", "edit");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::preview ( )

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

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

{
global $ilias;
$export = new ilScorm2004Export($this->object,'SCORM 2004 3rd');
$zipfile = $export->buildExportFile();
$zipPathinfo = pathinfo($zipfile);
$file_path = $this->object->getDataDirectory()."/".($zipPathinfo["basename"]);
copy($zipfile,$file_path);
unlink($zipfile);
ilUtil::unzip($file_path,true);
ilUtil::renameExecutables($this->object->getDataDirectory());
unlink($file_path);
include_once ("./Modules/Scorm2004/classes/ilSCORM13Package.php");
$rte_pkg = new ilSCORM13Package();
$rte_pkg->il_import($this->object->getDataDirectory(),$this->object->getId(),$ilias,false,true);
//increase module version is it necessary?
//$this->object->setModuleVersion($module_version+1);
//$this->object->update();
//redirect to view player
ilUtil::redirect("ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID()."&envEditor=1");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::proceedDragDrop ( )

Perform drag and drop action.

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

References $_POST, and $ilCtrl.

{
global $ilCtrl;
$this->object->executeDragDrop($_POST["il_hform_source_id"], $_POST["il_hform_target_id"],
$_POST["il_hform_fc"], $_POST["il_hform_as_subitem"]);
$ilCtrl->redirect($this, "showOrganization");
}
ilObjSCORM2004LearningModuleGUI::properties ( )

Scorm 2004 module properties.

Reimplemented from ilObjSCORMLearningModuleGUI.

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

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

{
global $rbacsystem, $tree, $tpl, $lng, $ilToolbar, $ilCtrl, $ilSetting;
$this->setSubTabs("settings", "general_settings");
$lng->loadLanguageModule("style");
// not editable
if ($this->object->editable != 1)
{
// view
$ilToolbar->addButton($this->lng->txt("view"),
"ilias.php?baseClass=ilSAHSPresentationGUI&amp;ref_id=".$this->object->getRefID(),
"_blank");
// upload new version
$ilToolbar->addButton($this->lng->txt("cont_sc_new_version"),
$this->ctrl->getLinkTarget($this, "newModuleVersion"));
}
else // editable
{
// glossary buttons to toolbar
$sep = false;
if (ilObject::_lookupType($this->object->getAssignedGlossary()) != "glo")
{
$parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
if ($rbacsystem->checkAccess("create", $parent_ref_id, "glo"))
{
$ilToolbar->addButton($this->lng->txt("cont_glo_create"),
$ilCtrl->getLinkTarget($this, "createGlossary"));
}
$ilToolbar->addButton($this->lng->txt("cont_glo_assign"),
$ilCtrl->getLinkTarget($this, "assignGlossary"));
}
else
{
$ilToolbar->addButton($this->lng->txt("cont_glo_detach"),
$ilCtrl->getLinkTarget($this, "detachGlossary"));
}
// style buttons to toolbar
$fixed_style = $ilSetting->get("fixed_content_style_id");
$style_id = $this->object->getStyleSheetId();
if ($fixed_style == 0)
{
$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
$_GET["ref_id"]);
$st_styles[0] = $this->lng->txt("default");
ksort($st_styles);
if ($style_id > 0)
{
// individual style
{
$ilToolbar->addSeparator();
// delete command
$ilToolbar->addButton($this->lng->txt("cont_edit_style"),
$ilCtrl->getLinkTarget($this, "editStyle"));
$ilToolbar->addButton($this->lng->txt("cont_delete_style"),
$ilCtrl->getLinkTarget($this, "deleteStyle"));
}
}
if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
{
$ilToolbar->addSeparator();
$ilToolbar->addButton($this->lng->txt("sty_create_ind_style"),
$ilCtrl->getLinkTarget($this, "createStyle"));
}
}
}
if ($this->object->editable!=1)
{
// scorm lm properties
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scorm2004_properties.html", "Modules/Scorm2004");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_PROPERTIES", $this->lng->txt("cont_lm_properties"));
// version
$this->tpl->setVariable("TXT_VERSION", $this->lng->txt("cont_sc_version").":");
$this->tpl->setVariable("VAL_VERSION", $this->object->getModuleVersion());
//sequencing
$this->tpl->setVariable("TXT_SEQUENCING", $this->lng->txt("cont_sequencing"));
$this->tpl->setVariable("CBOX_SEQUENCING", "cobj_sequencing");
$this->tpl->setVariable("VAL_SEQUENCING", "y");
if ($this->object->getSequencing())
{
$this->tpl->setVariable("CHK_SEQUENCING", "checked");
}
//interactions
$this->tpl->setVariable("TXT_INTERACTIONS", $this->lng->txt("cont_interactions"));
$this->tpl->setVariable("CBOX_INTERACTIONS", "cobj_interactions");
$this->tpl->setVariable("VAL_INTERACTIONS", "y");
if ($this->object->getInteractions())
{
$this->tpl->setVariable("CHK_INTERACTIONS", "checked");
}
//objectives
$this->tpl->setVariable("TXT_OBJECTIVES", $this->lng->txt("cont_objectives"));
$this->tpl->setVariable("CBOX_OBJECTIVES", "cobj_objectives");
$this->tpl->setVariable("VAL_OBJECTIVES", "y");
if ($this->object->getObjectives())
{
$this->tpl->setVariable("CHK_OBJECTIVES", "checked");
}
//comments
$this->tpl->setVariable("TXT_COMMENTS", $this->lng->txt("cont_comments"));
$this->tpl->setVariable("CBOX_COMMENTS", "cobj_comments");
$this->tpl->setVariable("VAL_COMMENTS", "y");
if ($this->object->getComments())
{
$this->tpl->setVariable("CHK_COMMENTS", "checked");
}
//time_from_lms
$this->tpl->setVariable("TXT_TIME_FROM_LMS", $this->lng->txt("cont_time_from_lms"));
$this->tpl->setVariable("CBOX_TIME_FROM_LMS", "cobj_time_from_lms");
$this->tpl->setVariable("VAL_TIME_FROM_LMS", "y");
if ($this->object->getTime_from_lms())
{
$this->tpl->setVariable("CHK_TIME_FROM_LMS", "checked");
}
$this->tpl->setCurrentBlock("editable");
// online
$this->tpl->setVariable("TXT_ONLINE", $this->lng->txt("cont_online"));
$this->tpl->setVariable("CBOX_ONLINE", "cobj_online");
$this->tpl->setVariable("VAL_ONLINE", "y");
if ($this->object->getOnline())
{
$this->tpl->setVariable("CHK_ONLINE", "checked");
}
//open
$this->tpl->setVariable("TXT_OPEN", $this->lng->txt("cont_open"));
$open_modes = array(
"0" => $this->lng->txt("cont_open_normal"),
"1" => $this->lng->txt("cont_open_iframe_max"),
"2" => $this->lng->txt("cont_open_iframe_defined"),
"5" => $this->lng->txt("cont_open_window_undefined"),
"6" => $this->lng->txt("cont_open_window_defined")
);
$sel_open = ilUtil::formSelect($this->object->getOpenMode(),
"open_mode", $open_modes, false, true);
$this->tpl->setVariable("SEL_OPEN", $sel_open);
//width
$this->tpl->setVariable("TXT_WIDTH", $this->lng->txt("cont_open_width"));
$this->tpl->setVariable("VAL_WIDTH", $this->object->getWidth());
//heigth
$this->tpl->setVariable("TXT_HEIGHT", $this->lng->txt("cont_open_heigth"));
$this->tpl->setVariable("VAL_HEIGHT", $this->object->getHeight());
// default lesson mode
$this->tpl->setVariable("TXT_LESSON_MODE", $this->lng->txt("cont_def_lesson_mode"));
$lesson_modes = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"),
"browse" => $this->lng->txt("cont_sc_less_mode_browse"));
$sel_lesson = ilUtil::formSelect($this->object->getDefaultLessonMode(),
"lesson_mode", $lesson_modes, false, true);
$this->tpl->setVariable("SEL_LESSON_MODE", $sel_lesson);
// credit mode
$this->tpl->setVariable("TXT_CREDIT_MODE", $this->lng->txt("cont_credit_mode"));
$credit_modes = array("credit" => $this->lng->txt("cont_credit_on"),
"no_credit" => $this->lng->txt("cont_credit_off"));
$sel_credit = ilUtil::formSelect($this->object->getCreditMode(),
"credit_mode", $credit_modes, false, true);
$this->tpl->setVariable("SEL_CREDIT_MODE", $sel_credit);
// auto review mode
$this->tpl->setVariable("TXT_AUTO_REVIEW", $this->lng->txt("cont_sc_auto_review"));
$this->tpl->setVariable("CBOX_AUTO_REVIEW", "auto_review");
$this->tpl->setVariable("VAL_AUTO_REVIEW", "y");
if ($this->object->getAutoReview())
{
$this->tpl->setVariable("CHK_AUTO_REVIEW", "checked");
}
// max attempts
$this->tpl->setVariable("MAX_ATTEMPTS", $this->lng->txt("cont_sc_max_attempt"));
$this->tpl->setVariable("VAL_MAX_ATTEMPT", $this->object->getMaxAttempt());
//unlimited session
$this->tpl->setVariable("TXT_SESSION", $this->lng->txt("cont_sc_usession"));
$this->tpl->setVariable("CBOX_SESSION", "cobj_session");
$this->tpl->setVariable("VAL_SESSION", "y");
if ($this->object->getSession())
{
$this->tpl->setVariable("CHK_SESSION", "checked");
}
// disable top menu
$this->tpl->setVariable("TXT_NOMENU", $this->lng->txt("cont_nomenu"));
$this->tpl->setVariable("CBOX_NOMENU", "cobj_nomenu");
$this->tpl->setVariable("VAL_NOMENU", "y");
if ($this->object->getNoMenu())
{
$this->tpl->setVariable("CHK_NOMENU", "checked");
}
//disable left-side navigation
$this->tpl->setVariable("TXT_HIDENAVIG", $this->lng->txt("cont_hidenavig"));
$this->tpl->setVariable("CBOX_HIDENAVIG", "cobj_hidenavig");
$this->tpl->setVariable("VAL_HIDENAVIG", "y");
if ($this->object->getHideNavig())
{
$this->tpl->setVariable("CHK_HIDENAVIG", "checked");
}
//debug
$this->tpl->setVariable("TXT_DEBUG", $this->lng->txt("cont_debug"));
$this->tpl->setVariable("CBOX_DEBUG", "cobj_debug");
$this->tpl->setVariable("VAL_DEBUG", "y");
if ($this->object->getDebug())
{
$this->tpl->setVariable("CHK_DEBUG", "checked");
}
//debugActivated
if ($this->object->getDebugActivated() == false) {
$this->tpl->setVariable("CHK_ACTIVATED", "disabled");
$this->tpl->setVariable("TXT_ACTIVATED", $this->lng->txt("cont_debug_deactivated"));
} else {
$this->tpl->setVariable("TXT_ACTIVATED", $this->lng->txt("cont_debug_deactivate"));
}
$this->tpl->setCurrentBlock("commands");
$this->tpl->setVariable("BTN_NAME", "saveProperties");
$this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
$this->tpl->parseCurrentBlock();
}
if ($this->object->editable == 1)
{
$tpl->setContent($this->form->getHTML());
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::publishExportFile ( )

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

References $_POST, and $file.

{
if(!isset($_POST["file"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if (count($_POST["file"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
$export = new ilSCORM2004Export($this->object);
$file = $_POST['file'][0];
$type = $_POST['type'][$_POST['file'][0]];
if ($this->object->getPublicExportFile($type) == $file)
{
$this->object->setPublicExportFile($type, "");
}
else
{
$this->object->setPublicExportFile($type, $file);
}
$this->object->update();
$this->ctrl->redirect($this, "showExportList");
}
ilObjSCORM2004LearningModuleGUI::resetSearch ( )

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

References $_SESSION.

{
unset($_SESSION["scorm_search_string"]);
$this->ctrl->redirect($this, "showTrackingItems");
}
ilObjSCORM2004LearningModuleGUI::saveAllTitles (   $a_redirect = true)

Save all titles of chapters/scos/pages.

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

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

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

{
global $ilCtrl;
if (is_array($_POST["title"]))
{
include_once("./Services/MetaData/classes/class.ilMD.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php");
foreach($_POST["title"] as $id => $title)
{
$node_obj = ilSCORM2004NodeFactory::getInstance($this->object, $id, false);
if (is_object($node_obj))
{
// Update Title and description
$md = new ilMD($this->object->getId(), $id, $node_obj->getType());
$md_gen = $md->getGeneral();
$md_gen->setTitle(ilUtil::stripSlashes($title));
$md_gen->update();
$md->update();
}
}
}
if ($a_redirect)
{
$ilCtrl->redirect($this, "showOrganization");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::saveGlossary ( )

Save glossary form.

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

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

{
global $tpl, $lng, $ilCtrl, $rbacsystem, $tree;
$parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
if (!$rbacsystem->checkAccess("create", $parent_ref_id, "glo"))
{
ilUtil::sendFailure($lng->txt("no_permission"), true);
$ilCtrl->redirect($this, "properties");
}
if ($this->form->checkInput())
{
include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
$newObj = new ilObjGlossary();
$newObj->setType("glo");
$newObj->setTitle($_POST["title"]);
$newObj->setDescription($_POST["description"]);
$newObj->setVirtualMode("none");
$newObj->create();
$newObj->createReference();
$newObj->putInTree($parent_ref_id);
$newObj->setPermissions($parent_ref_id);
$newObj->notify("new",$parent_ref_id,$_GET["parent_non_rbac_id"],$parent_ref_id,$newObj->getRefId());
// perform save
$this->object->setAssignedGlossary($newObj->getId());
$this->object->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "properties");
}
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::saveProperties ( )

save scorm 2004 module properties

Reimplemented from ilObjSCORMLearningModuleGUI.

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

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

{
global $ilSetting;
if ($this->object->editable != 1)
{
$this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
$this->object->setOpenMode($_POST["open_mode"]);
$this->object->setWidth($_POST["width"]);
$this->object->setHeight($_POST["height"]);
$this->object->setCreditMode($_POST["credit_mode"]);
$this->object->setMaxAttempt($_POST["max_attempt"]);
$this->object->setAutoReview(ilUtil::yn2tf($_POST["auto_review"]));
$this->object->setDefaultLessonMode($_POST["lesson_mode"]);
$this->object->setSession(ilUtil::yn2tf($_POST["cobj_session"]));
$this->object->setNoMenu(ilUtil::yn2tf($_POST["cobj_nomenu"]));
$this->object->setHideNavig(ilUtil::yn2tf($_POST["cobj_hidenavig"]));
$this->object->setSequencing(ilUtil::yn2tf($_POST["cobj_sequencing"]));
$this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
$this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
$this->object->setComments(ilUtil::yn2tf($_POST["cobj_comments"]));
$this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
$this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
//$this->object->setDebugPw($_POST["debug_pw"]);
}
else
{
if ($this->form->checkInput())
{
$this->object->setTries($_POST["q_tries"]);
$this->object->setLocalization($_POST["localization"]);
if ($ilSetting->get("fixed_content_style_id") <= 0 &&
(ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
|| $this->object->getStyleSheetId() == 0))
{
$this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
}
}
}
$this->object->update();
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "properties");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::saveSequencing ( )

Save sequencing.

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

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

{
global $tpl,$lng, $ilCtrl;
include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Sco.php");
$t = $this->object->getTree();
$root_node = $t->getNodeData($t->getRootId());
$nodes = $this->object->getTree()->getSubtree($root_node);
foreach ($nodes as $node)
{
if (in_array($node["type"], array("", "chap", "sco")))
{
if ($node["type"] == "")
{
$item = new ilSCORM2004Item($this->object->getId(), true);
}
else
{
$item = new ilSCORM2004Item($node["child"]);
}
$xml = '<?xml version="1.0"?>'.ilUtil::stripSlashes($_POST["seq"][$node["child"]], false);
$ob_texts = array();
if ($node["type"] == "sco")
{
$sco = new ilSCORM2004Sco($this->object, $node["child"]);
$objectives = $sco->getObjectives();
foreach ($objectives as $o)
{
$ob_texts[$o->getId()] = $o->getObjectiveId();
}
}
$item->setSeqXml($xml);
$item->initDom();
$item->update();
if ($node["type"] == "sco")
{
foreach ($ob_texts as $id => $t)
{
$objective = new ilScorm2004Objective($node["child"], $id);
$objective->setObjectiveId($t);
$objective->updateObjective();
}
}
}
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "showSequencing");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::saveStyleSettings ( )

Save style settings.

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

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

{
global $ilSetting;
if ($ilSetting->get("fixed_content_style_id") <= 0 &&
(ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
|| $this->object->getStyleSheetId() == 0))
{
$this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
$this->object->update();
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
}
$this->ctrl->redirect($this, "editStyleProperties");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::selectExport ( )

Select the export type of the SCORM 2004 module.

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

References $_POST.

{
switch ($_POST['select_export'])
{
case "exportScorm12":
case "exportScorm2004_3rd":
case "exportScorm2004_4th":
case "exportPDF":
case "exportISO":
case "exportHTML":
case "exportHTMLOne":
$this->ctrl->redirect($this, $_POST['select_export']);
break;
default:
$this->ctrl->redirect($this, 'showExportList');
break;
}
}
ilObjSCORM2004LearningModuleGUI::selectGlossary ( )

Select glossary.

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

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

{
global $ilCtrl;
$this->object->setAssignedGlossary(ilObject::_lookupObjId((int) $_GET["glo_ref_id"]));
$this->object->update();
$ilCtrl->redirect($this, "properties");
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::selectLObjChapter ( )

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

References $_POST, $_SESSION, and $ilCtrl.

{
global $ilCtrl;
$_SESSION["sahs_cur_chap"] = (int) $_POST["chapter"];
$ilCtrl->redirect($this, "showLearningObjectivesAlignment");
}
ilObjSCORM2004LearningModuleGUI::setSubTabs (   $a_main_tab,
  $a_active 
)

Set sub tabs.

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

References $ilCtrl, and ilObjectGUI\$lng.

{
global $ilTabs, $ilCtrl, $lng;
if ($a_main_tab == "settings" &&
$this->object->editable == 1)
{
/* // general properties
$ilTabs->addSubTab("general_settings",
$lng->txt("general_settings"),
$ilCtrl->getLinkTarget($this, 'properties'));
// style properties
$ilTabs->addSubTab("style",
$lng->txt("cont_style"),
$ilCtrl->getLinkTarget($this, 'editStyleProperties'));
*/
$ilTabs->activateSubTab($a_active);
}
}
ilObjSCORM2004LearningModuleGUI::showExportList ( )

Show Export List.

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

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

{
global $tpl;
$template = new ilTemplate("tpl.scorm2004_export_buttons.html", true, true, 'Modules/Scorm2004');
/* $buttons = array(
"exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
"exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
"exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
"exportPDF" => $this->lng->txt("scorm_create_export_file_pdf"),
"exportISO" => $this->lng->txt("scorm_create_export_file_iso"),
"exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
"exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
);*/
$buttons = array(
"exportScorm2004_3rd" => $this->lng->txt("scorm_create_export_file_scrom2004"),
"exportScorm2004_4th" => $this->lng->txt("scorm_create_export_file_scrom2004_4th"),
"exportScorm12" => $this->lng->txt("scorm_create_export_file_scrom12"),
"exportHTML" => $this->lng->txt("scorm_create_export_file_html"),
"exportHTMLOne" => $this->lng->txt("scorm_create_export_file_html_one")
);
foreach ($buttons as $value => $text)
{
$template->setCurrentBlock('option');
$template->setVariable('OPTION_VALUE', $value);
$template->setVariable('OPTION_TITLE', ilUtil::prepareFormOutput($text));
$template->parseCurrentBlock();
}
$template->setVariable('EXPORT_TITLE', $this->lng->txt('export'));
$template->setVariable('EXPORT_LABEL', $this->lng->txt('type'));
$template->setVariable('FORMACTION', $this->ctrl->getFormAction($this, 'selectExport'));
$export_files = $this->object->getExportFiles();
include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
$table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList');
$data = array();
foreach ($export_files as $exp_file)
{
$filetype = $exp_file['type'];
$public_str = ($exp_file["file"] == $this->object->getPublicExportFile($filetype))
? " <b>(".$this->lng->txt("public").")<b>"
: "";
$file_arr = explode("__", $exp_file["file"]);
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));
}
$table_gui->setData($data);
$this->tpl->setVariable('ADM_CONTENT', $template->get() . "\n" . $table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::showLearningObjectivesAlignment ( )

Show Learning Objectives Alignment.

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

References $_SESSION, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, getEditTree(), and ilSelectInputGUI\setOptions().

{
global $tpl, $lng, $ilCtrl, $ilToolbar;
$chaps = $this->object->getTree()->getChilds(
$this->object->getTree()->getRootId());
$s_chaps = array();
foreach($chaps as $chap)
{
if ($chap["type"] == "chap")
{
$s_chaps[$chap["child"]] = $chap["title"];
}
}
$cur_chap = $_SESSION["sahs_cur_chap"]
? $_SESSION["sahs_cur_chap"]
: 0;
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$options = array(
"0" => $lng->txt("all")
);
$options = $options + $s_chaps;
$si = new ilSelectInputGUI($lng->txt("chapter"), "chapter");
$si->setOptions($options);
$si->setValue($cur_chap);
$ilToolbar->addInputItem($si, true);
$ilToolbar->addFormButton($lng->txt("change"), "selectLObjChapter");
include_once("./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
$obj_table = new ilObjectivesAlignmentTableGUI($this, "showLearningObjectivesAlignment",
$this->getEditTree(), $this->object, $cur_chap);
$tpl->setContent($obj_table->getHTML());
}

+ Here is the call graph for this function:

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

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

Referenced by executeCommand().

{
global $lng, $ilCtrl, $tpl;
if ($a_form_action == "")
{
$a_form_action = $ilCtrl->getFormAction($this);
}
if ($a_icon == "")
{
$a_title = $this->object->getTitle();
$a_icon = ilUtil::getImagePath("icon_lm.gif");
}
$slm_tree = $this->getEditTree();
if ($a_top_node == 0)
{
$a_top_node = $slm_tree->getRootId();
}
if (is_null($a_gui_obj))
{
$a_gui_obj = $this;
$a_gui_cmd = "showOrganization";
}
$ilCtrl->setParameter($this, "backcmd", "showOrganization");
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$form_gui->setParentCommand($a_gui_obj, $a_gui_cmd);
$form_gui->setFormAction($a_form_action);
// $form_gui->setTitle($a_title);
// $form_gui->setIcon($a_icon);
$form_gui->setTree($slm_tree);
$form_gui->setCurrentTopNodeId($a_top_node);
$form_gui->addMultiCommand($lng->txt("delete"), "deleteNodes");
$form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
$form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
$form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
$form_gui->addCommand($lng->txt("expand_all"), "expandAll");
$form_gui->addCommand($lng->txt("collapse_all"), "collapseAll");
$form_gui->setTriggeredUpdateCommand("saveAllTitles");
// highlighted nodes
if ($_GET["highlight"] != "")
{
$hl = explode(":", $_GET["highlight"]);
$form_gui->setHighlightedNodes($hl);
$form_gui->setFocusId($hl[0]);
}
$ilCtrl->setParameter($this, "active_node", $_GET["obj_id"]);
$form_gui->setExplorerUpdater("tree", "tree_div",
$ilCtrl->getLinkTarget($this, "showTree", "", true));
$sc_tpl = new ilTemplate("tpl.scormeditor_orga_screen.html", true, true, "Modules/Scorm2004");
$sc_tpl->setVariable("ORGANIZATION", $form_gui->getHTML());
$sc_tpl->setVariable("NOTES", $this->getNotesHTML());
$tpl->setContent($sc_tpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::showSequencing ( )

Show Sequencing.

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

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

{
global $tpl, $lng, $ilTabs, $ilToolbar, $ilCtrl;
$ilTabs->setTabActive("sahs_sequencing");
include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
if (!$this->object->getSequencingExpertMode())
{
$ilToolbar->addButton($lng->txt("sahs_activate_expert_mode"),
$ilCtrl->getLinkTarget($this, "confirmExpertMode"));
}
else
{
include_once("./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
$list = new ilNestedList();
$t = $this->object->getTree();
$root_node = $t->getNodeData($t->getRootId());
$nodes = $this->object->getTree()->getSubtree($root_node);
foreach ($nodes as $node)
{
if (in_array($node["type"], array("", "chap", "sco")))
{
$ntpl = new ilTemplate("tpl.seq_node.html", true, true, "Modules/Scorm2004");
$ntpl->setVariable("NODE_ID", $node["child"]);
if ($node["type"] == "")
{
$ntpl->setVariable("TITLE", $this->object->getTitle());
$item = new ilSCORM2004Item($this->object->getId(), true);
}
else
{
$ntpl->setVariable("TITLE", $node["title"]);
$item = new ilSCORM2004Item($node["child"]);
}
$ntpl->setVariable("SEQ_INFO",
ilUtil::prepareFormOutput($item->exportAsXML(false)));
$list->addListNode($ntpl->get(), $node["child"], $node["parent"]);
}
}
$tb = new ilToolbarGUI();
$tb->addFormButton($lng->txt("save"), "saveSequencing");
$ftpl = new ilTemplate("tpl.sequencing.html", true, true, "Modules/Scorm2004");
$ftpl->setVariable("CONTENT", $list->getHTML());
$ftpl->setVariable("FORM_ACTION", $ilCtrl->getFormAction($this));
$ftpl->setVariable("TB", $tb->getHTML());
$tpl->setContent($ftpl->get());
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::showTrackingItem ( )

show tracking data of item

Reimplemented from ilObjSCORMLearningModuleGUI.

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

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

{
include_once "./Services/Table/classes/class.ilTableGUI.php";
// load template for table
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
// load template for table content data
$this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scorm2004_track_item.html", "Modules/Scorm2004");
$num = 2;
$this->tpl->setVariable("FORMACTION", "adm_object.php?ref_id=".$this->ref_id."$obj_str&cmd=gateway");
// create table
$tbl = new ilTableGUI();
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
$sc_item =& new ilSCORMItem($_GET["obj_id"]);
// title & header columns
$user = new ilObjUser( $_GET["user_id"]);
$tbl->setTitle($user->getLastname().", ".$user->getFirstname());
$tbl->setHeaderNames(array($this->lng->txt("title"),
$this->lng->txt("cont_status"), $this->lng->txt("cont_time"),
$this->lng->txt("cont_score")));
$header_params = array("ref_id" => $this->ref_id, "cmd" => $_GET["cmd"],
"cmdClass" => get_class($this), "obj_id" => $_GET["obj_id"], "baseClass"=>"ilSAHSEditGUI", 'user_id'=>$_GET["user_id"]);
$cols = array("title", "status", "time", "score");
$tbl->setHeaderVars($cols, $header_params);
//$tbl->setColumnWidth(array("25%",));
// control
$tbl->setOrderColumn($_GET["sort_by"]);
$tbl->setOrderDirection($_GET["sort_order"]);
$tbl->setLimit($_GET["limit"]);
$tbl->setOffset($_GET["offset"]);
$tbl->setMaxCount($this->maxcount);
//$this->tpl->setVariable("COLUMN_COUNTS",count($this->data["cols"]));
//$this->showActions(true);
// footer
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
#$tbl->disable("footer");
$tr_data = $this->object->getTrackingDataAgg($_GET["user_id"]);
//$objs = ilUtil::sortArray($objs, $_GET["sort_by"], $_GET["sort_order"]);
$tbl->setMaxCount(count($tr_data));
$tr_data = array_slice($tr_data, $_GET["offset"], $_GET["limit"]);
$tbl->render();
if (count($tr_data) > 0)
{
foreach ($tr_data as $data)
{
$this->tpl->setCurrentBlock("tbl_content");
$this->tpl->setVariable("VAL_TITLE", $data["title"]);
$this->ctrl->setParameter($this, "user_id", $_GET["user_id"]);
$this->ctrl->setParameter($this, "obj_id", $data["sco_id"]);
$this->tpl->setVariable("LINK_SCO",
$this->ctrl->getLinkTarget($this, "showTrackingItemPerUser"));
$this->tpl->setVariable("VAL_TIME", $data["time"]);
$this->tpl->setVariable("VAL_STATUS", $data["status"]);
$this->tpl->setVariable("VAL_SCORE", $data["score"]);
$css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
$this->tpl->setVariable("CSS_ROW", $css_row);
$this->tpl->parseCurrentBlock();
}
} //if is_array
else
{
$this->tpl->setCurrentBlock("notfound");
$this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
$this->tpl->setVariable("NUM_COLS", $num);
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::showTrackingItems ( )

show tracking data

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 897 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().

{
include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
if (!$privacy->enabledSahsProtocolData())
{
$this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
}
include_once "./Services/Table/classes/class.ilTableGUI.php";
//set search
if ($_POST["search_string"] != "")
{
$_SESSION["scorm_search_string"] = trim($_POST["search_string"]);
} else if (isset($_POST["search_string"]) && $_POST["search_string"] == "") {
unset($_SESSION["scorm_search_string"]);
}
// load template for search additions
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl_scorm_track_items_search.html","Modules/ScormAicc");
// load template for table
$this->tpl->addBlockfile("USR_TABLE", "usr_table", "tpl.table.html");
// load template for table content data
$this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scorm_track_items.html", "Modules/ScormAicc");
$num = 5;
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// create table
$tbl = new ilTableGUI();
// title & header columns
if (isset($_SESSION["scorm_search_string"])) {
$tbl->setTitle($this->lng->txt("cont_tracking_items").' - Aktive Suche: "'.$_SESSION["scorm_search_string"].'"');
} else {
$tbl->setTitle($this->lng->txt("cont_tracking_items"));
}
$tbl->setHeaderNames(array("",$this->lng->txt("name"), $this->lng->txt("last_access"), $this->lng->txt("attempts"), $this->lng->txt("version") ));
$header_params = $this->ctrl->getParameterArray($this, "showTrackingItems");
$tbl->setColumnWidth(array("1%", "50%", "29%", "10%","10%"));
$cols = array("user_id","username","last_access","attempts","version");
$tbl->setHeaderVars($cols, $header_params);
//set defaults
$_GET["sort_order"] = $_GET["sort_order"] ? $_GET["sort_order"] : "asc";
$_GET["sort_by"] = $_GET["sort_by"] ? $_GET["sort_by"] : "username";
// control
$tbl->setOrderColumn($_GET["sort_by"]);
$tbl->setOrderDirection($_GET["sort_order"]);
$tbl->setLimit($_GET["limit"]);
$tbl->setOffset($_GET["offset"]);
$tbl->setMaxCount($this->maxcount);
$this->tpl->setVariable("COLUMN_COUNTS", 5);
// delete button
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "deleteTrackingForUser");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();
// decrease attempts
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "decreaseAttempts");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("decrease_attempts"));
$this->tpl->parseCurrentBlock();
// export aggregated data for selected users
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "exportSelected");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("export"));
$this->tpl->parseCurrentBlock();
// add search and export all
// export aggregated data for all users
$this->tpl->setVariable("EXPORT_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("EXPORT_ALL_VALUE", $this->lng->txt('cont_export_all'));
$this->tpl->setVariable("EXPORT_ALL_NAME", "exportAll");
$this->tpl->setVariable("IMPORT_VALUE", $this->lng->txt('import'));
$this->tpl->setVariable("IMPORT_NAME", "Import");
$this->tpl->setVariable("SEARCH_TXT_SEARCH",$this->lng->txt('search'));
$this->tpl->setVariable("SEARCH_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("SEARCH_NAME",'showTrackingItems');
if (isset($_SESSION["scorm_search_string"])) {
$this->tpl->setVariable("STYLE",'display:inline;');
} else {
$this->tpl->setVariable("STYLE",'display:none;');
}
$this->tpl->setVariable("SEARCH_VAL", $_SESSION["scorm_search_string"]);
$this->tpl->setVariable("SEARCH_VALUE",$this->lng->txt('search_users'));
$this->tpl->parseCurrentBlock();
// footer
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
$items = $this->object->getTrackedUsers($_SESSION["scorm_search_string"]);
$tbl->setMaxCount(count($items));
$items = ilUtil::sortArray($items ,$_GET["sort_by"],$_GET["sort_order"]);
$items = array_slice($items, $_GET["offset"], $_GET["limit"]);
$tbl->render();
if (count($items) > 0)
{
foreach ($items as $item)
{
if (ilObject::_exists($item["user_id"]) && ilObject::_lookUpType($item["user_id"])=="usr")
{
$user = new ilObjUser($item["user_id"]);
$this->tpl->setCurrentBlock("tbl_content");
$this->tpl->setVariable("VAL_USERNAME", $item["username"]);
$this->tpl->setVariable("VAL_LAST", ilDatePresentation::formatDate(new ilDateTime($item["last_access"],IL_CAL_DATETIME)));
$this->tpl->setVariable("VAL_ATTEMPT", $item["attempts"]);
$this->tpl->setVariable("VAL_VERSION", $item['version']);
$this->ctrl->setParameter($this, "user_id", $item["user_id"]);
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$this->tpl->setVariable("LINK_ITEM",
$this->ctrl->getLinkTarget($this, "showTrackingItem"));
$this->tpl->setVariable("CHECKBOX_ID", $item["user_id"]);
$css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
$this->tpl->setVariable("CSS_ROW", $css_row);
$this->tpl->parseCurrentBlock();
}
}
$this->tpl->setCurrentBlock("selectall");
$this->tpl->setVariable("SELECT_ALL", $this->lng->txt("select_all"));
$this->tpl->setVariable("CSS_ROW", $css_row);
$this->tpl->parseCurrentBlock();
} //if is_array
else
{
$this->tpl->setCurrentBlock("notfound");
$this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
$this->tpl->setVariable("NUM_COLS", $num);
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::showTree ( )

Show Editing Tree.

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

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

{
global $ilUser, $ilias, $ilCtrl, $lng;
$mtree = new ilTree($this->object->getId());
$mtree->setTableNames('sahs_sc13_tree','sahs_sc13_tree_node');
$mtree->setTreeTablePK("slm_id");
if ($_POST["expandAll"] != "")
{
$_GET["scexpand"] = "";
$stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
$n_arr = array();
foreach ($stree as $n)
{
$n_arr[] = $n["child"];
}
$_SESSION["scexpand"] = $n_arr;
}
if ($_POST["collapseAll"] != "")
{
$_GET["scexpand"] = "";
$_SESSION["scexpand"] = array($mtree->readRootId());
}
$this->tpl = new ilTemplate("tpl.main.html", true, true);
$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
$this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
$this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.gif", false));
$this->tpl->setCurrentBlock("exp2_button");
$this->tpl->setVariable("CMD_EXP2_BTN", "expandAll");
$this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("expand_all"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("exp2_button");
$this->tpl->setVariable("CMD_EXP2_BTN", "collapseAll");
$this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("collapse_all"));
$this->tpl->parseCurrentBlock();
require_once ("./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php");
$exp = new ilSCORM2004EditorExplorer($this->ctrl->getLinkTarget($this, "edit"),
$exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
$exp->setTargetGet("obj_id");
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, "showTree"));
if ($_GET["scexpand"] == "")
{
$expanded = $mtree->readRootId();
}
else
{
$expanded = $_GET["scexpand"];
}
//echo "-".$_GET["active_node"]."-";
if ($_GET["active_node"] != "")
{
$path = $mtree->getPathId($_GET["active_node"]);
$exp->setForceOpenPath($path);
$exp->highlightNode($_GET["active_node"]);
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
// asynchronous output
if ($ilCtrl->isAsynch())
{
echo $output; exit;
}
$this->tpl->setCurrentBlock("content");
$this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
$this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
$this->tpl->setVariable("EXPLORER",$output);
$this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
$this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
$this->tpl->parseCurrentBlock();
$this->tpl->show(false);
}

+ Here is the call graph for this function:


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