ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjSAHSLearningModuleGUI Class Reference

SCORM/AICC/HACP Learning Modules. More...

+ Inheritance diagram for ilObjSAHSLearningModuleGUI:
+ Collaboration diagram for ilObjSAHSLearningModuleGUI:

Public Member Functions

 ilObjSAHSLearningModuleGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor.
executeCommand ()
 execute command
 viewObject ()
 list childs of current object
 properties ()
 module properties
 saveProperties ()
 save properties
 createObject ()
 no manual SCORM creation, only import at the time
 importObject ()
 display dialogue for importing SCORM package
 uploadObject ()
 display status information or report errors messages in case of error
 upload ()
 saveObject ()
 save new learning module to db
 info ()
 permission form
 owner ()
 show owner of learning module
 getTemplate ()
 output main header (title and locator)
 frameset ()
 output main frameset of media pool left frame: explorer tree of folders right frame: media pool content
 setTabs ()
 output tabs
 getTabs (&$tabs_gui)
 adds tabs to tab gui object
 _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
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 showMountWebfolderIcon ()
 setAdminTabs ()
 set admin tabs public
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 setActions ($a_actions="")
 set possible actions for objects in list.
 setSubObjects ($a_sub_objects="")
 set possible subobjects for this object.
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 undeleteObject ()
 get object back from trash
 insertSavedNodes ($a_source_id, $a_dest_id, $a_tree_id, &$a_affected_ids)
 recursive method to insert all saved nodes of the clipboard (maybe this function could be moved to a rbac class ?)
 confirmedDeleteObject ()
 confirmed deletion if object -> objects are moved to trash
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 removeDeletedNodes ($a_node_id, $a_checked, $a_delete_objects, &$a_affected_ids)
 remove already deleted objects within the objects in trash recursive function
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 editObject ()
 edit object
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 updateObject ()
 updates object entry in object_data
 afterUpdate ()
 permObject ()
 show permissions of current node
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 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
 permSaveObject ()
 save permissions
 isVisible ($a_ref_id, $a_type)
 displayList ()
 display object list
 deleteObject ($a_error=false)
 display deletion confirmation screen only for referenced objects.
 trashObject ()
 show trash content of object
 addRoleObject ()
 adds a local role This method is only called when choose the option 'you may add local roles'.
 showActions ($with_subobjects=false)
 show possible action (form buttons)
 getActions ()
 Get Actions.
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 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="")
 infoObject ()
 __buildRoleFilterSelect ()
 __filterRoles ($a_roles, $a_filter)
 ownerObject ()
 changeOwnerObject ()
 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.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 Add an object search in case the number of existing objects is too big to offer a selection list.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

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
 searchCloneSourceObject ()
 Search clone source by title.
 buildCloneSelect ($existing_objs)
 Build a select box for clonable objects (permission write)

Detailed Description

Member Function Documentation

ilObjSAHSLearningModuleGUI::_goto (   $a_target)

goto target course

Definition at line 512 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET, $ilErr, ilObjectGUI\$lng, ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendInfo().

{
global $ilAccess, $ilErr, $lng;
// to do: force flat view
if ($ilAccess->checkAccess("visible", "", $a_target))
{
$_GET["cmd"] = "infoScreen";
$_GET["baseClass"] = "ilSAHSPresentationGUI";
$_GET["ref_id"] = $a_target;
include("ilias.php");
}
else
{
if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
$_GET["cmd"] = "frameset";
$_GET["target"] = "";
$_GET["ref_id"] = ROOT_FOLDER_ID;
ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"),
include("repository.php");
}
}
$ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::addLocatorItems ( )

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 542 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET.

{
global $ilLocator;
if (is_object($this->object))
{
$ilLocator->addItem($this->object->getTitle(),
$this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", $_GET["ref_id"]);
}
}
ilObjSAHSLearningModuleGUI::createObject ( )

no manual SCORM creation, only import at the time

Reimplemented from ilObjectGUI.

Definition at line 186 of file class.ilObjSAHSLearningModuleGUI.php.

References importObject().

{
$this->importObject();
}

+ Here is the call graph for this function:

& ilObjSAHSLearningModuleGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 59 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET, $cmd, $ret, ilMDEditorGUI\addObserver(), ilObjectGUI\getCreationMode(), getTemplate(), LP_MODE_REPOSITORY, ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), and setTabs().

{
global $ilAccess;
if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
$this->getCreationMode() == true)
{
$this->prepareOutput();
}
else
{
$this->getTemplate();
$this->setLocator();
$this->setTabs();
}
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case 'ilmdeditorgui':
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
break;
case 'ilpermissiongui':
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case "ilfilesystemgui":
$this->fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
$ret =& $this->ctrl->forwardCommand($this->fs_gui);
break;
case "illearningprogressgui":
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(LP_MODE_REPOSITORY,$this->object->getRefId());
$this->ctrl->forwardCommand($new_gui);
break;
case "ilinfoscreengui":
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->enableLearningProgress();
// add read / back button
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$info->addButton($this->lng->txt("view"),
"ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->object->getRefID(),
' target="ilContObj'.$this->object->getId().'" ');
}
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
$info->enableNewsEditing();
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
if ($enable_internal_rss)
{
$info->setBlockProperty("news", "settings", true);
}
}
// show standard meta data section
$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
// forward the command
$this->ctrl->forwardCommand($info);
break;
default:
$cmd = $this->ctrl->getCmd("frameset");
if ((strtolower($_GET["baseClass"]) == "iladministrationgui" ||
$this->getCreationMode() == true) &&
$cmd != "frameset")
{
$cmd.= "Object";
}
$ret =& $this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::frameset ( )

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

Definition at line 413 of file class.ilObjSAHSLearningModuleGUI.php.

References exit.

{
$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);
}
ilObjSAHSLearningModuleGUI::getTabs ( $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjectGUI.

Definition at line 441 of file class.ilObjSAHSLearningModuleGUI.php.

References ilLearningProgressAccess\checkAccess().

Referenced by setTabs().

{
global $rbacsystem,$ilUser;
if ($this->ctrl->getCmd() == "delete")
{
return;
}
// info screen
$force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui")
? true
: false;
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
"ilinfoscreengui", "", $force_active);
// properties
$tabs_gui->addTarget("properties",
$this->ctrl->getLinkTarget($this, "properties"), "properties",
get_class($this));
// file system gui tabs
// properties
$tabs_gui->addTarget("cont_list_files",
$this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"), "",
"ilfilesystemgui");
// tracking data
$tabs_gui->addTarget("cont_tracking_data",
$this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems",
get_class($this));
// edit meta
/*
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTarget($this, "editMeta"), "editMeta",
get_class($this));
*/
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
"", "ilmdeditorgui");
// learning progress
include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
if(ilLearningProgressAccess::checkAccess($this->object->getRefId()))
{
$tabs_gui->addTarget('learning_progress',
$this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''),
'',
array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
}
// perm
if ($rbacsystem->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');
}
// owner
/*
$tabs_gui->addTarget("owner",
$this->ctrl->getLinkTarget($this, "owner"), "owner",
get_class($this));
*/
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::getTemplate ( )

output main header (title and locator)

Definition at line 397 of file class.ilObjSAHSLearningModuleGUI.php.

References ilObjectGUI\$lng.

Referenced by executeCommand().

{
global $lng;
$this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
//$this->tpl->setVariable("HEADER", $a_header_title);
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
//$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
}

+ Here is the caller graph for this function:

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

Constructor.

public

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

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

{
global $lng;
$lng->loadLanguageModule("content");
$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:

ilObjSAHSLearningModuleGUI::importObject ( )

display dialogue for importing SCORM package

public

Reimplemented from ilObjectGUI.

Definition at line 196 of file class.ilObjSAHSLearningModuleGUI.php.

References ilFrameTargetInfo\_getFrame(), and ilUtil\getImagePath().

Referenced by createObject().

{
// display import form
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.slm_import.html", "Modules/ScormAicc");
$this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_slm.gif'));
$this->tpl->setVariable("ALT_IMG", $this->lng->txt("obj_sahs"));
$this->ctrl->setParameter($this, "new_type", "sahs");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("BTN_NAME", "save");
$this->tpl->setVariable("TARGET", ' target="'.
ilFrameTargetInfo::_getFrame("MainContent").'" ');
$this->tpl->setVariable("TXT_SELECT_LMTYPE", $this->lng->txt("type"));
$this->tpl->setVariable("TXT_TYPE_AICC", $this->lng->txt("lm_type_aicc"));
$this->tpl->setVariable("TXT_TYPE_HACP", $this->lng->txt("lm_type_hacp"));
$this->tpl->setVariable("TXT_TYPE_SCORM", $this->lng->txt("lm_type_scorm"));
$this->tpl->setVariable("TXT_TYPE_SCORM2004", $this->lng->txt("lm_type_scorm2004"));
$this->tpl->setVariable("TXT_UPLOAD", $this->lng->txt("upload"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_IMPORT_LM", $this->lng->txt("import_sahs"));
$this->tpl->setVariable("TXT_SELECT_FILE", $this->lng->txt("select_file"));
$this->tpl->setVariable("TXT_VALIDATE_FILE", $this->lng->txt("cont_validate_file"));
// get the value for the maximal uploadable filesize from the php.ini (if available)
$umf=get_cfg_var("upload_max_filesize");
// get the value for the maximal post data from the php.ini (if available)
$pms=get_cfg_var("post_max_size");
//convert from short-string representation to "real" bytes
$multiplier_a=array("K"=>1024, "M"=>1024*1024, "G"=>1024*1024*1024);
$umf_parts=preg_split("/(\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
$pms_parts=preg_split("/(\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
if (count($umf_parts) == 2) { $umf = $umf_parts[0]*$multiplier_a[$umf_parts[1]]; }
if (count($pms_parts) == 2) { $pms = $pms_parts[0]*$multiplier_a[$pms_parts[1]]; }
// use the smaller one as limit
$max_filesize=min($umf, $pms);
if (!$max_filesize) $max_filesize=max($umf, $pms);
//format for display in mega-bytes
$max_filesize=sprintf("%.1f MB",$max_filesize/1024/1024);
// gives out the limit as a little notice
$this->tpl->setVariable("TXT_FILE_INFO", $this->lng->txt("file_notice")." $max_filesize");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::info ( )

permission form

Definition at line 381 of file class.ilObjSAHSLearningModuleGUI.php.

References ilObjectGUI\infoObject().

{
$this->infoObject();
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::owner ( )

show owner of learning module

Definition at line 389 of file class.ilObjSAHSLearningModuleGUI.php.

References ilObjectGUI\ownerObject().

{
$this->ownerObject();
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::properties ( )

module properties

Reimplemented in ilObjSCORMLearningModuleGUI, and ilObjSCORM2004LearningModuleGUI.

Definition at line 171 of file class.ilObjSAHSLearningModuleGUI.php.

{
}
ilObjSAHSLearningModuleGUI::saveObject ( )

save new learning module to db

Reimplemented from ilObjectGUI.

Definition at line 370 of file class.ilObjSAHSLearningModuleGUI.php.

References uploadObject().

{
global $rbacadmin;
$this->uploadObject();
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::saveProperties ( )

save properties

Reimplemented in ilObjSCORMLearningModuleGUI, and ilObjSCORM2004LearningModuleGUI.

Definition at line 178 of file class.ilObjSAHSLearningModuleGUI.php.

{
}
ilObjSAHSLearningModuleGUI::setTabs ( )

output tabs

Reimplemented from ilObjectGUI.

Definition at line 425 of file class.ilObjSAHSLearningModuleGUI.php.

References ilUtil\getImagePath(), and getTabs().

Referenced by executeCommand().

{
$this->tpl->setCurrentBlock("header_image");
$this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_lm_b.gif"));
$this->tpl->parseCurrentBlock();
$this->getTabs($this->tabs_gui);
#$this->tpl->setVariable("TABS", $this->tabs_gui->getHTML());
$this->tpl->setVariable("HEADER", $this->object->getTitle());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::upload ( )

Definition at line 362 of file class.ilObjSAHSLearningModuleGUI.php.

References uploadObject().

{
$this->uploadObject();
}

+ Here is the call graph for this function:

ilObjSAHSLearningModuleGUI::uploadObject ( )

display status information or report errors messages in case of error

public

Definition at line 256 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET, $file, $title, ilObject\_writeTitle(), ilUtil\moveUploadedFile(), ilUtil\redirect(), ilUtil\renameExecutables(), ilUtil\sendInfo(), ilUtil\unzip(), and ilMDBase\update().

Referenced by saveObject(), and upload().

{
global $_FILES, $rbacsystem;
// check if file was uploaded
$source = $_FILES["scormfile"]["tmp_name"];
if (($source == 'none') || (!$source))
{
$this->ilias->raiseError("No file selected!",$this->ilias->error_obj->MESSAGE);
}
// check create permission
if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], "sahs"))
{
$this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->WARNING);
}
// get_cfg_var("upload_max_filesize"); // get the may filesize form t he php.ini
switch ($__FILES["scormfile"]["error"])
{
case UPLOAD_ERR_INI_SIZE:
$this->ilias->raiseError($this->lng->txt("err_max_file_size_exceeds"),$this->ilias->error_obj->MESSAGE);
break;
case UPLOAD_ERR_FORM_SIZE:
$this->ilias->raiseError($this->lng->txt("err_max_file_size_exceeds"),$this->ilias->error_obj->MESSAGE);
break;
case UPLOAD_ERR_PARTIAL:
$this->ilias->raiseError($this->lng->txt("err_partial_file_upload"),$this->ilias->error_obj->MESSAGE);
break;
case UPLOAD_ERR_NO_FILE:
$this->ilias->raiseError($this->lng->txt("err_no_file_uploaded"),$this->ilias->error_obj->MESSAGE);
break;
}
$file = pathinfo($_FILES["scormfile"]["name"]);
$name = substr($file["basename"], 0, strlen($file["basename"]) - strlen($file["extension"]) - 1);
if ($name == "")
{
$name = $this->lng->txt("no_title");
}
// create and insert object in objecttree
switch ($_POST["sub_type"])
{
case "scorm2004":
include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
break;
case "scorm":
include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
$newObj = new ilObjSCORMLearningModule();
break;
case "aicc":
include_once("./Modules/ScormAicc/classes/class.ilObjAICCLearningModule.php");
$newObj = new ilObjAICCLearningModule();
break;
case "hacp":
include_once("./Modules/ScormAicc/classes/class.ilObjHACPLearningModule.php");
$newObj = new ilObjHACPLearningModule();
break;
}
$newObj->setTitle($name);
$newObj->setSubType($_POST["sub_type"]);
$newObj->setDescription("");
$newObj->create();
$newObj->createReference();
$newObj->putInTree($_GET["ref_id"]);
$newObj->setPermissions($_GET["ref_id"]);
$newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
// create data directory, copy file to directory
$newObj->createDataDirectory();
// copy uploaded file to data directory
$file_path = $newObj->getDataDirectory()."/".$_FILES["scormfile"]["name"];
ilUtil::moveUploadedFile($_FILES["scormfile"]["tmp_name"],
$_FILES["scormfile"]["name"], $file_path);
//move_uploaded_file($_FILES["scormfile"]["tmp_name"], $file_path);
ilUtil::unzip($file_path);
ilUtil::renameExecutables($newObj->getDataDirectory());
$title = $newObj->readObject();
if ($title != "")
{
ilObject::_writeTitle($newObj->getId(), $title);
$md = new ilMD($newObj->getId(),0, $newObj->getType());
if(is_object($md_gen = $md->getGeneral()))
{
$md_gen->setTitle($title);
$md_gen->update();
}
}
ilUtil::sendInfo( $this->lng->txt($newObj->getType()."_added"), true);
ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$newObj->getRefId());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSAHSLearningModuleGUI::viewObject ( )

list childs of current object

public

Reimplemented from ilObjectGUI.

Definition at line 157 of file class.ilObjSAHSLearningModuleGUI.php.

References $_GET.

{
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
}
else
{
}
}

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