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 () | |
| output main header (title and locator) | |
| 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 39 of file class.ilObjSAHSLearningModuleGUI.php.
| ilObjSAHSLearningModuleGUI::addRole | ( | ) |
add role
Definition at line 363 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 169 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 60 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, $cmd, ilObjectGUI::getCreationMode(), getTemplate(), ilObjectGUI::prepareOutput(), ilObjectGUI::setLocator(), and setTabs().
{
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;
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 397 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 510 of file class.ilObjSAHSLearningModuleGUI.php.
References $rbacsystem, and ilObjUserTracking::_enabledLearningProgress().
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
// 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.ilObjUserTracking.php");
if(ilObjUserTracking::_enabledLearningProgress())
{
$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 381 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 46 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 179 of file class.ilObjSAHSLearningModuleGUI.php.
References ilFrameTargetInfo::_getFrame().
Referenced by createObject().
{
// display import form
// print_r($this->lng);
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.slm_import.html");
$this->ctrl->setParameter($this, "new_type", "sahs");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
//$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("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_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 345 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 373 of file class.ilObjSAHSLearningModuleGUI.php.
References ilObjectGUI::ownerObject().
{
$this->ownerObject();
}
Here is the call graph for this function:| ilObjSAHSLearningModuleGUI::perm | ( | ) |
permission form
Definition at line 333 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 353 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 154 of file class.ilObjSAHSLearningModuleGUI.php.
{
}
| ilObjSAHSLearningModuleGUI::saveObject | ( | ) |
save new learning module to db
Reimplemented from ilObjectGUI.
Definition at line 323 of file class.ilObjSAHSLearningModuleGUI.php.
References $rbacadmin, and uploadObject().
{
global $rbacadmin;
$this->uploadObject();
}
Here is the call graph for this function:| ilObjSAHSLearningModuleGUI::saveProperties | ( | ) |
save properties
Reimplemented in ilObjSCORMLearningModuleGUI.
Definition at line 161 of file class.ilObjSAHSLearningModuleGUI.php.
{
}
| ilObjSAHSLearningModuleGUI::setLocator | ( | $ | a_tree = "", |
|
| $ | a_id = "", |
|||
| $ | scriptname = "adm_object.php" | |||
| ) |
set locator
Definition at line 407 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, $ilias_locator, $key, $path, $row, $t_frame, ilObjectGUI::$tree, ilFrameTargetInfo::_getFrame(), and ilObjectGUI::setLocator().
{
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:| ilObjSAHSLearningModuleGUI::setTabs | ( | ) |
output tabs
Reimplemented from ilObjectGUI.
Definition at line 494 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 315 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 221 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET, $_POST, $file, $rbacsystem, ilUtil::moveUploadedFile(), ilUtil::redirect(), ilUtil::renameExecutables(), sendInfo(), 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();
sendInfo( $this->lng->txt($newObj->getType()."_added"), true);
ilUtil::redirect("content/sahs_edit.php?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 123 of file class.ilObjSAHSLearningModuleGUI.php.
References $_GET.
{
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
parent::viewObject();
}
else
{
//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