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 | |
| perm () | |
| permission form | |
| info () | |
| permission form | |
| permSave () | |
| save permissions | |
| addRole () | |
| add role | |
| owner () | |
| show owner of learning module | |
| getTemplate () | |
| choose meta data section (called by administration) | |
| frameset () | |
| output main frameset of media pool left frame: explorer tree of folders right frame: media pool content | |
| setLocator ($a_tree="", $a_id="", $scriptname="adm_object.php") | |
| set locator | |
| setTabs () | |
| output tabs | |
| getTabs (&$tabs_gui) | |
| adds tabs to tab gui object | |
Definition at line 37 of file class.ilObjSAHSLearningModuleGUI.php.
| ilObjSAHSLearningModuleGUI::addRole | ( | ) |
add role
Definition at line 324 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, ilObjectGUI::addRoleObject(), and ilObjectGUI::setReturnLocation().
{
$this->setReturnLocation("addRole",
"sahs_edit.php?ref_id=".$_GET["ref_id"]."&obj_id=".$_GET["obj_id"]."&cmd=perm");
$this->addRoleObject();
}
Here is the call graph for this function:| ilObjSAHSLearningModuleGUI::createObject | ( | ) |
no manual SCORM creation, only import at the time
Reimplemented from ilObjectGUI.
Definition at line 132 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 58 of file class.ilObjSAHSLearningModuleGUI.php.
References $cmd, getTemplate(), setLocator(), and setTabs().
{
$this->fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
$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 "ilfilesystemgui":
//$ret =& $this->fs_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($this->fs_gui);
break;
default:
$cmd = $this->ctrl->getCmd("frameset");
$ret =& $this->$cmd();
break;
}
$this->tpl->show();
}
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 527 of file class.ilObjSAHSLearningModuleGUI.php.
{
$this->tpl = new ilTemplate("tpl.sahs_edit_frameset.html", false, false, "content");
$this->tpl->setVariable("REF_ID",$this->ref_id);
$this->tpl->show();
}
| ilObjSAHSLearningModuleGUI::getTabs | ( | &$ | tabs_gui | ) |
adds tabs to tab gui object
| object | $tabs_gui ilTabsGUI object |
Reimplemented from ilObjectGUI.
Definition at line 636 of file class.ilObjSAHSLearningModuleGUI.php.
References $rbacsystem.
Referenced by setTabs().
{
global $rbacsystem;
if ($this->ctrl->getCmd() == "delete")
{
return;
}
// properties
$tabs_gui->addTarget("properties",
$this->ctrl->getLinkTarget($this, "properties"), "properties",
get_class($this));
// file system gui tabs
if (is_object($this->fs_gui))
{
$this->fs_gui->getTabs($tabs_gui);
}
// 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',''),
"meta_data", get_class($this));
// perm
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTarget($this, "perm"), array("perm", "info"),
get_class($this));
}
// owner
/*
$tabs_gui->addTarget("owner",
$this->ctrl->getLinkTarget($this, "owner"), "owner",
get_class($this));
*/
}
Here is the caller graph for this function:| ilObjSAHSLearningModuleGUI::getTemplate | ( | ) |
choose meta data section (called by administration)
choose meta data section (called by module) add meta data object (called by administration) add meta data object (called by module) delete meta data object (called by administration) delete meta data object (called by module) edit meta data (called by administration) edit meta data (called by module) save meta data (called by administration) save meta data (called by module) output main header (title and locator)
Definition at line 511 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 44 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,$a_prepare_output);
$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 142 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, and ilObjectGUI::getFormAction().
Referenced by createObject().
{
// display import form
// print_r($this->lng);
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.slm_import.html");
$this->tpl->setVariable("FORMACTION", $this->getFormAction("save","adm_object.php?cmd=gateway&ref_id=".
$_GET["ref_id"]."&new_type=sahs"));
$this->tpl->setVariable("BTN_NAME", "save");
$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_UPLOAD", $this->lng->txt("upload"));
$this->tpl->setVariable("TXT_IMPORT_LM", $this->lng->txt("import_lm"));
$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");
// use the smaller one as limit
$max_filesize=min($umf, $pms);
if (!$max_filesize) $max_filesize=max($umf, $pms);
// gives out the limit as a littel 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 306 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 334 of file class.ilObjSAHSLearningModuleGUI.php.
{
$this->ownerObject();
}
| ilObjSAHSLearningModuleGUI::perm | ( | ) |
permission form
Definition at line 294 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, ilObjectGUI::permObject(), and ilObjectGUI::setFormAction().
{
$this->setFormAction("permSave", "sahs_edit.php?cmd=permSave&ref_id=".$_GET["ref_id"].
"&obj_id=".$_GET["obj_id"]);
$this->setFormAction("addRole", "sahs_edit.php?ref_id=".$_GET["ref_id"].
"&obj_id=".$_GET["obj_id"]."&cmd=addRole");
$this->permObject();
}
Here is the call graph for this function:| ilObjSAHSLearningModuleGUI::permSave | ( | ) |
save permissions
Definition at line 314 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, ilObjectGUI::permSaveObject(), and ilObjectGUI::setReturnLocation().
{
$this->setReturnLocation("permSave",
"sahs_edit.php?ref_id=".$_GET["ref_id"]."&obj_id=".$_GET["obj_id"]."&cmd=perm");
$this->permSaveObject();
}
Here is the call graph for this function:| ilObjSAHSLearningModuleGUI::properties | ( | ) |
module properties
Reimplemented in ilObjSCORMLearningModuleGUI.
Definition at line 117 of file class.ilObjSAHSLearningModuleGUI.php.
{
}
| ilObjSAHSLearningModuleGUI::saveObject | ( | ) |
save new learning module to db
Reimplemented from ilObjectGUI.
Definition at line 280 of file class.ilObjSAHSLearningModuleGUI.php.
References $rbacadmin, ilObjectGUI::getReturnLocation(), ilUtil::redirect(), sendInfo(), and uploadObject().
{
global $rbacadmin;
$this->uploadObject();
sendInfo( $this->lng->txt("lm_added"), true);
ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
}
Here is the call graph for this function:| ilObjSAHSLearningModuleGUI::saveProperties | ( | ) |
save properties
Reimplemented in ilObjSCORMLearningModuleGUI.
Definition at line 124 of file class.ilObjSAHSLearningModuleGUI.php.
{
}
| ilObjSAHSLearningModuleGUI::setLocator | ( | $ | a_tree = "", |
|
| $ | a_id = "", |
|||
| $ | scriptname = "adm_object.php" | |||
| ) |
set locator
Definition at line 537 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, $ilias_locator, $path, $row, $t_frame, ilObjectGUI::$tree, and ilFrameTargetInfo::_getFrame().
Referenced by executeCommand().
{
global $ilias_locator, $tree;
if (!defined("ILIAS_MODULE"))
{
parent::setLocator();
}
else
{
$a_tree =& $tree;
$a_id = $_GET["ref_id"];
$this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
$path = $a_tree->getPathFull($a_id);
// this is a stupid workaround for a bug in PEAR:IT
$modifier = 1;
if (!empty($_GET["obj_id"]))
{
$modifier = 0;
}
// ### AA 03.11.10 added new locator GUI class ###
$i = 1;
if ($this->object->getType() != "grp" && ($_GET["cmd"] == "delete" || $_GET["cmd"] == "edit"))
{
unset($path[count($path) - 1]);
}
foreach ($path as $key => $row)
{
if ($key < count($path) - $modifier)
{
$this->tpl->touchBlock("locator_separator");
}
$this->tpl->setCurrentBlock("locator_item");
if ($row["child"] != $a_tree->getRootId())
{
$this->tpl->setVariable("ITEM", $row["title"]);
}
else
{
$this->tpl->setVariable("ITEM", $this->lng->txt("repository"));
}
if($row["type"] == "sahs")
{
$this->tpl->setVariable("LINK_ITEM", "sahs_edit.php?ref_id=".$row["child"]."&type=".$row["type"]);
}
else
{
$this->tpl->setVariable("LINK_ITEM", "../repository.php?cmd=frameset&ref_id=".$row["child"]);
$t_frame = ilFrameTargetInfo::_getFrame("MainContent");
$this->tpl->setVariable("LINK_TARGET", " target=\"$t_frame\" ");
}
//$this->tpl->setVariable("LINK_TARGET", " target=\"bottom\" ");
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("locator");
// ### AA 03.11.10 added new locator GUI class ###
// navigate locator
if ($row["child"] != $a_tree->getRootId())
{
$ilias_locator->navigate($i++,$row["title"],"../repository.php?ref_id=".$row["child"],"bottom");
}
else
{
$ilias_locator->navigate($i++,$this->lng->txt("repository"),"../repository.php?ref_id=".$row["child"],"bottom");
}
}
$this->tpl->setVariable("TXT_LOCATOR",$debug.$this->lng->txt("locator"));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjSAHSLearningModuleGUI::setTabs | ( | ) |
output tabs
Definition at line 624 of file class.ilObjSAHSLearningModuleGUI.php.
References getTabs().
Referenced by executeCommand().
{
$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 272 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 180 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, $_POST, $file, $rbacsystem, ilUtil::moveUploadedFile(), ilUtil::renameExecutables(), and ilUtil::unzip().
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 "scorm":
include_once("content/classes/class.ilObjSCORMLearningModule.php");
$newObj = new ilObjSCORMLearningModule();
break;
case "aicc":
include_once("content/classes/class.ilObjAICCLearningModule.php");
$newObj = new ilObjAICCLearningModule();
break;
case "hacp":
include_once("content/classes/class.ilObjHACPLearningModule.php");
$newObj = new ilObjHACPLearningModule();
break;
}
//$newObj->setType("slm");
//$dummy_meta =& new ilMetaData();
//$dummy_meta->setObject($newObj);
//$newObj->assignMetaData($dummy_meta);
$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());
$newObj->readObject();
}
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 94 of file class.ilObjSAHSLearningModuleGUI.php.
{
//add template for view button
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
// view button
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK","content/sahs_presentation.php?ref_id=".$this->object->getRefID());
$this->tpl->setVariable("BTN_TARGET"," target=\"ilContObj".$this->object->getID()."\" ");
$this->tpl->setVariable("BTN_TXT",$this->lng->txt("view"));
$this->tpl->parseCurrentBlock();
// view button
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK","content/sahs_edit.php?ref_id=".$this->object->getRefID());
$this->tpl->setVariable("BTN_TARGET"," target=\"bottom\" ");
$this->tpl->setVariable("BTN_TXT",$this->lng->txt("edit"));
$this->tpl->parseCurrentBlock();
}
1.7.1