Inheritance diagram for ilObjiLincCourseGUI:
Collaboration diagram for ilObjiLincCourseGUI:Public Member Functions | |
| ilObjiLincCourseGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true) | |
| Constructor public. | |
| createObject () | |
| create new object form | |
| saveObject () | |
| save object public | |
| getTabs (&$tabs_gui) | |
| get tabs public | |
Definition at line 39 of file class.ilObjiLincCourseGUI.php.
| ilObjiLincCourseGUI::createObject | ( | ) |
create new object form
public
Reimplemented from ilObjectGUI.
Definition at line 58 of file class.ilObjiLincCourseGUI.php.
References $_GET, $_POST, $_SESSION, ilObjectGUI::$data, $rbacsystem, ilObjectGUI::getFormAction(), ilObjectGUI::getTargetFrame(), ilUtil::prepareFormOutput(), and ilUtil::stripSlashes().
{
global $rbacsystem;
$new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
/*if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $new_type))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
else*/
{
// fill in saved values in case of error
$data = array();
$data["fields"] = array();
$data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
$data["fields"]["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
$data["fields"]["homepage"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["homepage"],true);
$data["fields"]["download"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["download"],true);
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.icrs_edit.html","ilinc");
$this->tpl->setVariable("TXT_TITLE", $this->lng->txt("title"));
$this->tpl->setVariable("TITLE", $data["fields"]["title"]);
$this->tpl->setVariable("TXT_DESC", $this->lng->txt("desc"));
$this->tpl->setVariable("DESC", $data["fields"]["desc"]);
$this->tpl->setVariable("TXT_HOMEPAGE_URL", $this->lng->txt("homepage_url"));
$this->tpl->setVariable("HOMEPAGE_URL", $data["fields"]["homepage"]);
$this->tpl->setVariable("TXT_DOWNLOAD_RESOURCES_URL", $this->lng->txt("download_resources_url"));
$this->tpl->setVariable("DOWNLOAD_RESOURCES_URL", $data["fields"]["download"]);
$this->tpl->setVariable("TXT_NOT_YET", $this->lng->txt("not_implemented_yet"));
$this->tpl->setVariable("FORMACTION", $this->getFormAction("save","adm_object.php?cmd=gateway&ref_id=".
$_GET["ref_id"]."&new_type=".$new_type));
$this->tpl->setVariable("TXT_HEADER", $this->lng->txt($new_type."_new"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($new_type."_add"));
$this->tpl->setVariable("CMD_SUBMIT", "save");
$this->tpl->setVariable("TARGET", $this->getTargetFrame("save"));
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
}
}
Here is the call graph for this function:| ilObjiLincCourseGUI::getTabs | ( | &$ | tabs_gui | ) |
get tabs public
| object | tabs gui object |
Reimplemented from ilObjectGUI.
Definition at line 135 of file class.ilObjiLincCourseGUI.php.
{
// tabs are defined manually here. The autogeneration via objects.xml will be deprecated in future
// for usage examples see ilObjGroupGUI or ilObjSystemFolderGUI
}
| ilObjiLincCourseGUI::ilObjiLincCourseGUI | ( | $ | a_data, | |
| $ | a_id, | |||
| $ | a_call_by_reference, | |||
| $ | a_prepare_output = true | |||
| ) |
Constructor public.
Definition at line 45 of file class.ilObjiLincCourseGUI.php.
References ilObjectGUI::ilObjectGUI().
{
$this->type = "icrs";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
$this->ctrl->saveParameter($this,'ref_id');
}
Here is the call graph for this function:| ilObjiLincCourseGUI::saveObject | ( | ) |
save object public
Reimplemented from ilObjectGUI.
Definition at line 105 of file class.ilObjiLincCourseGUI.php.
References $_POST, $rbacadmin, ilObjectGUI::getReturnLocation(), ilUtil::redirect(), and sendInfo().
{
global $rbacadmin;
include_once "class.ilnetucateXMLAPI.php";
$ilinc = new ilnetucateXMLAPI();
$ilinc->addCourse($_POST["Fobject"]);
$response = $ilinc->sendRequest();
if ($response->isError())
{
$this->ilErr->raiseError($response->getErrorMsg(),$this->ilErr->MESSAGE);
}
// create and insert forum in objecttree
$iCrsObj = parent::saveObject();
$iCrsObj->saveID($response->getFirstID());
// always send a message
sendInfo($response->getResultMsg(),true);
ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"")));
}
Here is the call graph for this function:
1.7.1