ILIAS  eassessment Revision 61809
 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.
 saveSequencing ()
 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.
 insertPage ($a_redirect=true)
 Insert (multiple) pages at node.
 insertScenarioGUI ()
 Insert sequencing scenario at node.
 insertScenario ()
 Insert sequencing scenario at node.
 insertTemplateGUI ($a_redirect=true)
 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.
 insertChapterClip ()
 Insert chapter from clipboard.
 exportScorm2004_4th ()
 exportScorm2004_3rd ()
 exportScorm12 ()
 exportHTML ()
 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 ()
 showTrackingItemsBySco ()
 show tracking data
 confirmedDelete ()
 cancel ()
 overwrite..jump back to trackingdata not parent
 import ()
 gui functions for GUI export
 importForm ()
 export ($a_export_all=0)
 exportOptions ($a_export_all=0, $a_users)
 showTrackingItemSco ()
 show tracking data of item
 showTrackingItemPerUser ()
 show tracking data of item per user
 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
 createObject ()
 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
 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 ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
- Protected Member Functions inherited from ilObjectGUI
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 afterUpdate ()
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showClipboardTable ($a_result_set, $a_from="")
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Detailed Description

Member Function Documentation

ilObjSCORM2004LearningModuleGUI::assignGlossary ( )

Assign glossary.

Definition at line 493 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 547 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 2196 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET.

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

cancel deletion of export files

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

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

cancel deletion of export files

Definition at line 1041 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 2091 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET, $_SESSION, 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 2446 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 2204 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 1053 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::copyItems (   $a_return = "showOrganization")

Copy items to clipboard.

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

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilSCORM2004Node\clipboardCopy(), 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::sendInfo($lng->txt("sahs_choose_pages_or_chapters_or_scos_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 415 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 647 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 2302 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilSCORM2004Node\clipboardCut(), 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::sendInfo($lng->txt("sahs_choose_pages_or_chapters_or_scos_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 1095 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 2491 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 2149 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 667 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $ilCtrl.

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

Definition at line 1165 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 952 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_POST, $_SESSION, $name, 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 403 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 2427 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 657 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $ilCtrl.

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

Edit Stlye Properties.

Definition at line 565 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\$tpl, getEditTree(), ilObjSAHSLearningModuleGUI\getTemplate(), ilObjectGUI\setLocator(), ilObjSAHSLearningModuleGUI\setTabs(), and showOrganization().

{
global $ilAccess, $ilCtrl, $tpl, $ilTabs;
$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);
break;
// 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);
break;
// 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);
break;
// pages
case "ilscorm2004pagenodegui":
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageNodeGUI.php");
$page_gui = new ilSCORM2004PageNodeGUI($this->object, $_GET["obj_id"]);
$page_gui->setParentGUI($this);
$html = $ilCtrl->forwardCommand($page_gui);
break;
default:
break;
}
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::expandAll (   $a_redirect = true)

Expand all.

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

References $_GET, $_SESSION, 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 ( )

Reimplemented from ilObjSCORMLearningModuleGUI.

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

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

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

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

Definition at line 2409 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 2420 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Definition at line 2395 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 2388 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 2381 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 847 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 116 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET, $type, 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");
}
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 1563 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 1641 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 350 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();
$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 1444 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));
*/
/*
// sequencing
$tabs_gui->addTarget("sahs_sequencing",
$this->ctrl->getLinkTarget($this, "showSequencing"), "showSequencing",
get_class($this));
*/
// objective alignment
$tabs_gui->addTarget("sahs_objectives_alignment",
$this->ctrl->getLinkTarget($this, "showLearningObjectivesAlignment"), "showLearningObjectivesAlignment",
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 426 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 310 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tree, ilObject\_lookupType(), and ilNumberInputGUI\setMaxLength().

Referenced by properties(), and saveProperties().

{
global $lng, $ilCtrl, $tree, $rbacsystem;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// glossary
$ne = new ilNonEditableValueGUI($lng->txt("obj_glo"), "glossary");
$this->form->addItem($ne);
// 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"));
$parent_ref_id = $tree->getParentId((int) $_GET["ref_id"]);
if (ilObject::_lookupType($this->object->getAssignedGlossary()) != "glo")
{
if ($rbacsystem->checkAccess("create", $parent_ref_id, "glo"))
{
$this->form->addCommandButton("createGlossary", $lng->txt("cont_glo_create"));
}
$this->form->addCommandButton("assignGlossary", $lng->txt("cont_glo_assign"));
}
else
{
$this->form->addCommandButton("detachGlossary", $lng->txt("cont_glo_detach"));
}
$this->form->setTitle($lng->txt("cont_lm_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 576 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::insertChapter (   $a_redirect = true)

Insert (multiple) chapters at node.

Definition at line 1678 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 2369 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 1779 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 2341 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 1902 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 1830 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 1728 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 2355 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::insertTemplate (   $a_redirect = true)

Insert (multiple) pages at node.

Definition at line 2012 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)

Displays GUI to select template for page.

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

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

{
global $ilCtrl,$lng, $tpl;
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004OrganizationHFormGUI.php");
$arr_templates = ilPageLayout::activeLayouts();
$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("insert"));
$this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
$this->tpl->setVariable("TXT_TITLE", "Choose Page Layout");
}

+ Here is the call graph for this function:

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

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

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

Referenced by insertTemplate().

{
global $ilCtrl;
$anchor = ($a_anchor_node != "")
? "node_".$a_anchor_node
: "";
include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
$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 "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 2541 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 2253 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 186 of file class.ilObjSCORM2004LearningModuleGUI.php.

References ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, formSelect(), getPropertiesEditableValues(), initPropertiesEditableForm(), and ilObjSCORMLearningModuleGUI\setSubTabs().

{
global $rbacsystem, $tree, $tpl, $lng, $ilToolbar;;
$this->setSubTabs("settings", "general_settings");
$lng->loadLanguageModule("style");
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
{
// preview
/* $ilToolbar->addButton($this->lng->txt("cont_sc_preview"),
$this->ctrl->getLinkTarget($this, "preview"),
"_blank");*/
}
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());
$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");
}
// 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");
}
$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 2511 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_POST, $file, and $type.

{
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 ( )

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 1033 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 2115 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 452 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 370 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

{
global $ilSetting;
if ($this->object->editable!=1) {
$this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
$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->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->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 ( )

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

References ilObjectGUI\$lng, ilObjectGUI\$tpl, ilUtil\sendInfo(), and showSequencing().

{
global $tpl,$lng;
ilUtil::sendInfo($lng->txt("saved_successfully"),false);
$this->object->updateSequencingSettings();
$this->showSequencing();
}

+ Here is the call graph for this function:

ilObjSCORM2004LearningModuleGUI::saveStyleSettings ( )

Save style settings.

Definition at line 677 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 1375 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":
$this->ctrl->redirect($this, $_POST['select_export']);
break;
default:
$this->ctrl->redirect($this, 'showExportList');
break;
}
}
ilObjSCORM2004LearningModuleGUI::selectGlossary ( )

Select glossary.

Definition at line 535 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 1364 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_POST, $_SESSION, and $ilCtrl.

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

Set sub tabs.

Definition at line 1538 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 1396 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")
);
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 1322 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_SESSION, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilUtil\formSelect(), getEditTree(), and ilUtil\sendInfo().

{
global $tpl, $lng, $ilCtrl;
$oa_tpl = new ilTemplate("tpl.objectives_alignment.html", true, true, "Modules/Scorm2004");
$chaps = $this->object->getTree()->getChilds(
$this->object->getTree()->getRootId());
$s_chaps = array();
foreach($chaps as $chap)
{
$s_chaps[$chap["child"]] = $chap["title"];
}
reset($s_chaps);
if (count($s_chaps) > 0)
{
$cur_chap = $_SESSION["sahs_cur_chap"]
? $_SESSION["sahs_cur_chap"]
: key($s_chaps);
$oa_tpl->setCurrentBlock("chapter_selection");
$oa_tpl->setVariable("CHAPTER_SELECTION",
ilUtil::formSelect($cur_chap, "chapter", $s_chaps, false, true));
$oa_tpl->setVariable("TXT_SELECT_CHAPTER",
$lng->txt("chapter"));
$oa_tpl->setVariable("TXT_CHANGE", $lng->txt("change"));
$oa_tpl->setVariable("FORMACTION", $ilCtrl->getFormAction($this));
$oa_tpl->setVariable("CMD_CHAP_SEL", "selectLObjChapter");
$oa_tpl->parseCurrentBlock();
include_once("./Modules/Scorm2004/classes/class.ilObjectivesAlignmentTableGUI.php");
$obj_table = new ilObjectivesAlignmentTableGUI($this, "showLearningObjectivesAlignment",
$this->getEditTree(), $this->object, $cur_chap);
$oa_tpl->setVariable("LOBJ_TABLE", $obj_table->getHTML());
$tpl->setContent($oa_tpl->get());
}
else
{
ilUtil::sendInfo($lng->txt("sahs_oa_no_chapters"));
}
}

+ 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 1574 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 1271 of file class.ilObjSCORM2004LearningModuleGUI.php.

References ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilUtil\tf2yn().

Referenced by saveSequencing().

{
global $tpl,$lng,$ilTabs;
//navigation options
$nav_settings = $this->object->getSequencingSettings();
$tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.scormeditor_course_sequencing.html", "Modules/Scorm2004");
$tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$tpl->setVariable("TXT_TITLE", "Sequencing Navigation Options for Module");
$tpl->setVariable("BTN_NAME", "saveSequencing");
$tpl->setVariable("TXT_SAVE", $lng->txt('save'));
$tpl->setVariable("VAL_CHOICE", ilUtil::tf2yn($nav_settings->getChoice()));
$tpl->setVariable("VAL_FLOW", ilUtil::tf2yn($nav_settings->getFlow()));
$tpl->setVariable("VAL_FORWARDONLY", ilUtil::tf2yn($nav_settings->getForwardOnly()));
$tpl->setVariable("VAL_CHOICE", "y");
$tpl->setVariable("VAL_FLOW", "y");
$tpl->setVariable("VAL_FORWARDONLY", "y");
if ($nav_settings->getChoice())
{
$tpl->setVariable("CHK_CHOICE", "checked");
}
if ($nav_settings->getFlow())
{
$tpl->setVariable("CHK_FLOW", "checked");
}
if ($nav_settings->getForwardOnly())
{
$tpl->setVariable("CHK_FORWARDONLY", "checked");
}
$tpl->parseCurrentBlock();
$ilTabs->setTabActive("sahs_sequencing");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORM2004LearningModuleGUI::showTrackingItem ( )

show tracking data of item

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 861 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 695 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET, $_POST, $_SESSION, ilObject\_exists(), ilUtil\getImagePath(), ilUtil\sortArray(), and ilUtil\switchColor().

Referenced by deleteTrackingData().

{
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", $item["last_access"]);
$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 1177 of file class.ilObjSCORM2004LearningModuleGUI.php.

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$ilias, ilObjectGUI\$lng, 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: