Inheritance diagram for ilObjGlossaryGUI:
Collaboration diagram for ilObjGlossaryGUI:Public Member Functions | |
| ilObjGlossaryGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true) | |
| Constructor public. | |
| & | executeCommand () |
| execute command | |
| assignObject () | |
| createObject () | |
| form for new content object creation | |
| importObject () | |
| import new object form | |
| saveObject () | |
| save new content object to db | |
| importFileObject () | |
| display status information or report errors messages in case of error | |
| chooseMetaSectionObject ($a_target="") | |
| choose meta data section (called by administration) | |
| chooseMetaSection () | |
| choose meta data section (called by module) | |
| addMetaObject ($a_target="") | |
| add meta data object (called by administration) | |
| addMeta () | |
| add meta data object (called by module) | |
| deleteMetaObject ($a_target="") | |
| delete meta data object (called by administration) | |
| deleteMeta () | |
| delete meta data object (called by module) | |
| editMetaObject ($a_target="") | |
| edit meta data (called by administration) | |
| editMeta () | |
| edit meta data (called by module) | |
| saveMetaObject ($a_target="") | |
| save meta data (called by administration) | |
| saveMeta () | |
| save meta data (called by module) | |
| viewObject () | |
| list childs of current object | |
| properties () | |
| edit properties of object (admin form) | |
| saveProperties () | |
| save properties | |
| listTerms () | |
| list terms | |
| addTerm () | |
| add term | |
| moveDefinitionUp () | |
| move a definiton up | |
| moveDefinitionDown () | |
| move a definiton down | |
| confirmDefinitionDeletion () | |
| deletion confirmation screen | |
| cancelDefinitionDeletion () | |
| deleteDefinition () | |
| editTerm () | |
| edit term | |
| updateTerm () | |
| update term | |
| exportList () | |
| export () | |
| export content object | |
| downloadExportFile () | |
| download export file | |
| viewExportLog () | |
| confirmDeleteExportFile () | |
| confirmation screen for export file deletion | |
| cancelDeleteExportFile () | |
| cancel deletion of export files | |
| deleteExportFile () | |
| delete export files | |
| confirmTermDeletion () | |
| confirm term deletion | |
| cancelTermDeletion () | |
| cancel deletion of object | |
| deleteTerms () | |
| delete selected terms | |
| setLocator ($a_tree="", $a_id="") | |
| set Locator | |
| perm () | |
| edit permissions | |
| permSave () | |
| save permissions | |
| addRole () | |
| add a local role | |
| owner () | |
| show owner | |
| view () | |
| view content | |
| create () | |
| create new (subobject) in glossary | |
| saveTerm () | |
| addDefinition () | |
| add definition | |
| getTemplate () | |
| setTabs () | |
| output tabs | |
| getTabs (&$tabs_gui) | |
| get tabs | |
Data Fields | |
| $admin_tabs | |
| $mode | |
| $term | |
Definition at line 44 of file class.ilObjGlossaryGUI.php.
| ilObjGlossaryGUI::addDefinition | ( | ) |
add definition
Definition at line 1382 of file class.ilObjGlossaryGUI.php.
References $_POST, $term, and ilUtil::stripSlashes().
{
if (count($_POST["id"]) < 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_term"),$this->ilias->error_obj->MESSAGE);
}
if (count($_POST["id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_term"),$this->ilias->error_obj->MESSAGE);
}
// add term
include_once ("content/classes/class.ilGlossaryTerm.php");
$term =& new ilGlossaryTerm($_POST["id"][0]);
// add first definition
$def =& new ilGlossaryDefinition();
$def->setTermId($term->getId());
$def->setTitle(ilUtil::stripSlashes($term->getTerm()));
$def->create();
$this->ctrl->setParameterByClass("ilpageobjectgui", "term_id", $term->getId());
$this->ctrl->setParameterByClass("ilpageobjectgui", "def", $def->getId());
$this->ctrl->redirectByClass(array("ilglossarytermgui",
"iltermdefinitioneditorgui", "ilpageobjectgui"), "view");
}
Here is the call graph for this function:| ilObjGlossaryGUI::addMeta | ( | ) |
add meta data object (called by module)
Definition at line 369 of file class.ilObjGlossaryGUI.php.
References addMetaObject().
{
//$this->prepareOutput();
$this->addMetaObject($this->ctrl->getLinkTarget($this));
}
Here is the call graph for this function:| ilObjGlossaryGUI::addMetaObject | ( | $ | a_target = "" |
) |
add meta data object (called by administration)
Definition at line 338 of file class.ilObjGlossaryGUI.php.
References $_GET, $_POST, and sendInfo().
Referenced by addMeta().
{
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=".$this->object->getRefId();
}
include_once "classes/class.ilMetaDataGUI.php";
$meta_gui =& new ilMetaDataGUI();
$meta_gui->setObject($this->object);
$meta_name = $_POST["meta_name"] ? $_POST["meta_name"] : $_GET["meta_name"];
$meta_index = $_POST["meta_index"] ? $_POST["meta_index"] : $_GET["meta_index"];
if ($meta_index == "")
$meta_index = 0;
$meta_path = $_POST["meta_path"] ? $_POST["meta_path"] : $_GET["meta_path"];
$meta_section = $_POST["meta_section"] ? $_POST["meta_section"] : $_GET["meta_section"];
if ($meta_name != "")
{
$meta_gui->meta_obj->add($meta_name, $meta_path, $meta_index);
}
else
{
sendInfo($this->lng->txt("meta_choose_element"), true);
}
$meta_gui->edit("ADM_CONTENT", "adm_content", $a_target, $meta_section);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGlossaryGUI::addRole | ( | ) |
add a local role
Definition at line 1329 of file class.ilObjGlossaryGUI.php.
References ilObjectGUI::addRoleObject(), and ilObjectGUI::setReturnLocation().
{
$this->setReturnLocation("addRole", "glossary_edit.php?ref_id=".$this->object->getRefId()."&cmd=perm");
$this->addRoleObject();
}
Here is the call graph for this function:| ilObjGlossaryGUI::addTerm | ( | ) |
add term
Definition at line 737 of file class.ilObjGlossaryGUI.php.
References $_POST, $_SESSION, $term, and ilUtil::stripSlashes().
{
// add term
include_once ("content/classes/class.ilGlossaryTerm.php");
$term =& new ilGlossaryTerm();
$term->setGlossary($this->object);
$term->setTerm(ilUtil::stripSlashes($_POST["new_term"]));
$term->setLanguage($_POST["term_language"]);
$_SESSION["il_text_lang_".$_GET["ref_id"]] = $_POST["term_language"];
$term->create();
// add first definition
$def =& new ilGlossaryDefinition();
$def->setTermId($term->getId());
$def->setTitle(ilUtil::stripSlashes($_POST["new_term"]));
$def->create();
$this->ctrl->setParameterByClass("ilpageobjectgui", "term_id", $term->getId());
$this->ctrl->setParameterByClass("ilpageobjectgui", "def", $def->getId());
$this->ctrl->redirectByClass(array("ilglossarytermgui",
"iltermdefinitioneditorgui", "ilpageobjectgui"), "view");
}
Here is the call graph for this function:| ilObjGlossaryGUI::assignObject | ( | ) |
Reimplemented from ilObjectGUI.
Definition at line 114 of file class.ilObjGlossaryGUI.php.
{
include_once("content/classes/class.ilObjGlossary.php");
$this->object =& new ilObjGlossary($this->id, true);
}
| ilObjGlossaryGUI::cancelDefinitionDeletion | ( | ) |
Definition at line 837 of file class.ilObjGlossaryGUI.php.
{
$this->ctrl->redirect($this, "listTerms");
}
| ilObjGlossaryGUI::cancelDeleteExportFile | ( | ) |
cancel deletion of export files
Definition at line 1118 of file class.ilObjGlossaryGUI.php.
{
session_unregister("ilExportFiles");
$this->ctrl->redirect($this, "exportList");
}
| ilObjGlossaryGUI::cancelTermDeletion | ( | ) |
cancel deletion of object
public
Definition at line 1208 of file class.ilObjGlossaryGUI.php.
References sendInfo().
{
session_unregister("term_delete");
sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "listTerms");
}
Here is the call graph for this function:| ilObjGlossaryGUI::chooseMetaSection | ( | ) |
choose meta data section (called by module)
Definition at line 328 of file class.ilObjGlossaryGUI.php.
References chooseMetaSectionObject().
{
//$this->prepareOutput();
$this->chooseMetaSectionObject($this->ctrl->getLinkTarget($this));
}
Here is the call graph for this function:| ilObjGlossaryGUI::chooseMetaSectionObject | ( | $ | a_target = "" |
) |
choose meta data section (called by administration)
Definition at line 310 of file class.ilObjGlossaryGUI.php.
References $_REQUEST.
Referenced by chooseMetaSection().
{
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=".$this->object->getRefId();
}
include_once "classes/class.ilMetaDataGUI.php";
$meta_gui =& new ilMetaDataGUI();
$meta_gui->setObject($this->object);
$meta_gui->edit("ADM_CONTENT", "adm_content",
$a_target, $_REQUEST["meta_section"]);
}
Here is the caller graph for this function:| ilObjGlossaryGUI::confirmDefinitionDeletion | ( | ) |
deletion confirmation screen
Definition at line 789 of file class.ilObjGlossaryGUI.php.
References $_GET, $output, $term, ilObjStyleSheet::getContentStylePath(), ilObjStyleSheet::getSyntaxStylePath(), and sendInfo().
{
//$this->getTemplate();
//$this->displayLocator();
//$this->setTabs();
$term = new ilGlossaryTerm($_GET["term_id"]);
// content style
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath(0));
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
ilObjStyleSheet::getSyntaxStylePath());
$this->tpl->parseCurrentBlock();
//$this->tpl->setVariable("HEADER",
// $this->lng->txt("cont_term").": ".$term->getTerm());
$this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_delete.html", true);
sendInfo($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("TXT_TERM", $term->getTerm());
$definition =& new ilGlossaryDefinition($_GET["def"]);
$page =& new ilPageObject("gdf", $definition->getId());
$page_gui =& new ilPageObjectGUI($page);
$page_gui->setTemplateOutput(false);
$page_gui->setSourcecodeDownloadScript("glossary_presentation.php?ref_id=".$_GET["ref_id"]);
$output = $page_gui->preview();
$this->tpl->setCurrentBlock("definition");
$this->tpl->setVariable("PAGE_CONTENT", $output);
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("LINK_CANCEL",
$this->ctrl->getLinkTarget($this, "cancelDefinitionDeletion"));
$this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("confirm"));
$this->ctrl->setParameter($this, "def", $definition->getId());
$this->tpl->setVariable("LINK_CONFIRM",
$this->ctrl->getLinkTarget($this, "deleteDefinition"));
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilObjGlossaryGUI::confirmDeleteExportFile | ( | ) |
confirmation screen for export file deletion
Definition at line 1069 of file class.ilObjGlossaryGUI.php.
References $_POST, $_SESSION, $counter, $file, ilUtil::getImagePath(), sendInfo(), setTabs(), and ilUtil::switchColor().
{
if(!isset($_POST["file"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
$this->setTabs();
// SAVE POST VALUES
$_SESSION["ilExportFiles"] = $_POST["file"];
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.confirm_deletion.html", true);
sendInfo($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// BEGIN TABLE HEADER
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT",$this->lng->txt("objects"));
$this->tpl->parseCurrentBlock();
// BEGIN TABLE DATA
$counter = 0;
foreach($_POST["file"] as $file)
{
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->setVariable("TEXT_CONTENT", $file);
$this->tpl->parseCurrentBlock();
}
// cancel/confirm button
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$buttons = array( "cancelDeleteExportFile" => $this->lng->txt("cancel"),
"deleteExportFile" => $this->lng->txt("confirm"));
foreach ($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:| ilObjGlossaryGUI::confirmTermDeletion | ( | ) |
confirm term deletion
Definition at line 1149 of file class.ilObjGlossaryGUI.php.
References $_POST, $_SESSION, $counter, $id, $term, ilUtil::getImagePath(), sendInfo(), and ilUtil::switchColor().
{
//$this->prepareOutput();
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// save values to
$_SESSION["term_delete"] = $_POST["id"];
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.obj_confirm.html");
sendInfo($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// output table header
$cols = array("cont_term");
foreach ($cols as $key)
{
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT",$this->lng->txt($key));
$this->tpl->parseCurrentBlock();
}
foreach($_POST["id"] as $id)
{
$term = new ilGlossaryTerm($id);
// output title
$this->tpl->setCurrentBlock("table_cell");
$this->tpl->setVariable("TEXT_CONTENT", $term->getTerm());
$this->tpl->parseCurrentBlock();
// output table row
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->parseCurrentBlock();
}
// cancel and confirm button
$buttons = array( "cancelTermDeletion" => $this->lng->txt("cancel"),
"deleteTerms" => $this->lng->txt("confirm"));
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
foreach($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:| ilObjGlossaryGUI::create | ( | ) |
create new (subobject) in glossary
Definition at line 1356 of file class.ilObjGlossaryGUI.php.
References $_POST.
{
switch($_POST["new_type"])
{
case "term":
$term_gui =& new ilGlossaryTermGUI();
$term_gui->create();
break;
}
}
| ilObjGlossaryGUI::createObject | ( | ) |
form for new content object creation
Reimplemented from ilObjectGUI.
Definition at line 125 of file class.ilObjGlossaryGUI.php.
References $_GET, $_POST, $_SESSION, ilObjectGUI::$data, $rbacsystem, ilObjectGUI::getFormAction(), ilObjectGUI::getTargetFrame(), ilObjectGUI::getTemplateFile(), ilUtil::prepareFormOutput(), and ilUtil::stripSlashes().
Referenced by importObject().
{
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"]);
$this->getTemplateFile("create", $new_type);
foreach ($data["fields"] as $key => $val)
{
$this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
$this->tpl->setVariable(strtoupper($key), $val);
if ($this->prepare_output)
{
$this->tpl->parseCurrentBlock();
}
}
$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"));
$this->tpl->setVariable("TXT_IMPORT_GLO", $this->lng->txt("import_glossary"));
$this->tpl->setVariable("TXT_GLO_FILE", $this->lng->txt("glo_upload_file"));
$this->tpl->setVariable("TXT_IMPORT", $this->lng->txt("import"));
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGlossaryGUI::deleteDefinition | ( | ) |
Definition at line 843 of file class.ilObjGlossaryGUI.php.
References $_GET.
{
$definition =& new ilGlossaryDefinition($_GET["def"]);
$definition->delete();
$this->ctrl->redirect($this, "listTerms");
}
| ilObjGlossaryGUI::deleteExportFile | ( | ) |
delete export files
Definition at line 1127 of file class.ilObjGlossaryGUI.php.
References $_SESSION, $file, and ilUtil::delDir().
{
$export_dir = $this->object->getExportDirectory();
foreach($_SESSION["ilExportFiles"] as $file)
{
$exp_file = $export_dir."/".$file;
$exp_dir = $export_dir."/".substr($file, 0, strlen($file) - 4);
if (@is_file($exp_file))
{
unlink($exp_file);
}
if (@is_dir($exp_dir))
{
ilUtil::delDir($exp_dir);
}
}
$this->ctrl->redirect($this, "exportList");
}
Here is the call graph for this function:| ilObjGlossaryGUI::deleteMeta | ( | ) |
delete meta data object (called by module)
Definition at line 399 of file class.ilObjGlossaryGUI.php.
References deleteMetaObject().
{
//$this->prepareOutput();
$this->deleteMetaObject($this->ctrl->getLinkTarget($this));
}
Here is the call graph for this function:| ilObjGlossaryGUI::deleteMetaObject | ( | $ | a_target = "" |
) |
delete meta data object (called by administration)
Definition at line 380 of file class.ilObjGlossaryGUI.php.
Referenced by deleteMeta().
{
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=".$this->object->getRefId();
}
include_once "classes/class.ilMetaDataGUI.php";
$meta_gui =& new ilMetaDataGUI();
$meta_gui->setObject($this->object);
$meta_index = $_POST["meta_index"] ? $_POST["meta_index"] : $_GET["meta_index"];
$meta_gui->meta_obj->delete($_GET["meta_name"], $_GET["meta_path"], $meta_index);
$meta_gui->edit("ADM_CONTENT", "adm_content", $a_target, $_GET["meta_section"]);
}
Here is the caller graph for this function:| ilObjGlossaryGUI::deleteTerms | ( | ) |
delete selected terms
Definition at line 1218 of file class.ilObjGlossaryGUI.php.
References $_SESSION, $id, and $term.
{
foreach($_SESSION["term_delete"] as $id)
{
$term = new ilGlossaryTerm($id);
$term->delete();
}
session_unregister("term_delete");
$this->ctrl->redirect($this, "listTerms");
}
| ilObjGlossaryGUI::downloadExportFile | ( | ) |
download export file
Definition at line 1023 of file class.ilObjGlossaryGUI.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_dir = $this->object->getExportDirectory();
ilUtil::deliverFile($export_dir."/".$_POST["file"][0],
$_POST["file"][0]);
}
Here is the call graph for this function:| ilObjGlossaryGUI::editMeta | ( | ) |
edit meta data (called by module)
Definition at line 425 of file class.ilObjGlossaryGUI.php.
References editMetaObject().
{
//$this->prepareOutput();
$this->editMetaObject($this->ctrl->getLinkTarget($this));
}
Here is the call graph for this function:| ilObjGlossaryGUI::editMetaObject | ( | $ | a_target = "" |
) |
edit meta data (called by administration)
Definition at line 409 of file class.ilObjGlossaryGUI.php.
References $_GET.
Referenced by editMeta().
{
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=".$this->object->getRefId();
}
include_once "classes/class.ilMetaDataGUI.php";
$meta_gui =& new ilMetaDataGUI();
$meta_gui->setObject($this->object);
$meta_gui->edit("ADM_CONTENT", "adm_content", $a_target, $_GET["meta_section"]);
}
Here is the caller graph for this function:| ilObjGlossaryGUI::editTerm | ( | ) |
edit term
Definition at line 853 of file class.ilObjGlossaryGUI.php.
References $_GET, $lang, $term, formSelect(), and ilMetaData::getLanguages().
{
$term = new ilGlossaryTerm($_GET["term_id"]);
//$this->tpl->setVariable("HEADER", $this->lng->txt("cont_term").": ".$term->getTerm());
// load template for table
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.glossary_term_edit.html", true);
$this->ctrl->setParameter($this, "term_id", $_GET["term_id"]);
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_edit_term"));
$this->tpl->setVariable("TXT_TERM", $this->lng->txt("cont_term"));
$this->tpl->setVariable("INPUT_TERM", "term");
$this->tpl->setVariable("VALUE_TERM", htmlspecialchars($term->getTerm()));
$this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("language"));
$lang = ilMetaData::getLanguages();
$select_language = ilUtil::formSelect ($term->getLanguage(),"term_language",$lang,false,true);
$this->tpl->setVariable("SELECT_LANGUAGE", $select_language);
$this->tpl->setVariable("BTN_NAME", "updateTerm");
$this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
}
Here is the call graph for this function:| & ilObjGlossaryGUI::executeCommand | ( | ) |
execute command
Reimplemented from ilObjectGUI.
Definition at line 76 of file class.ilObjGlossaryGUI.php.
References $_GET, $_POST, $cmd, getTemplate(), setLocator(), and setTabs().
{
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class)
{
case "ilglossarytermgui":
$this->ctrl->setReturn($this, "listTerms");
$term_gui =& new ilGlossaryTermGUI($_GET["term_id"]);
$term_gui->setGlossary($this->object);
//$ret =& $term_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($term_gui);
break;
default:
$cmd = $this->ctrl->getCmd("ListTerms");
if (($cmd == "create") && ($_POST["new_type"] == "term"))
{
$this->ctrl->setCmd("create");
$this->ctrl->setCmdClass("ilGlossaryTermGUI");
$ret =& $this->executeCommand();
return;
}
else
{
$this->getTemplate();
$this->setTabs();
$this->setLocator();
$ret =& $this->$cmd();
}
break;
}
$this->tpl->show();
}
Here is the call graph for this function:| ilObjGlossaryGUI::export | ( | ) |
export content object
Definition at line 1012 of file class.ilObjGlossaryGUI.php.
References exportList().
{
require_once("content/classes/class.ilGlossaryExport.php");
$glo_exp = new ilGlossaryExport($this->object);
$glo_exp->buildExportFile();
$this->exportList();
}
Here is the call graph for this function:| ilObjGlossaryGUI::exportList | ( | ) |
Definition at line 893 of file class.ilObjGlossaryGUI.php.
References $_GET, $num, $tbl, ilObjectGUI::$tree, ilUtil::getImagePath(), setTabs(), and ilUtil::switchColor().
Referenced by export().
{
global $tree;
$this->setTabs();
//add template for view button
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
// create export file button
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK", $this->ctrl->getLinkTarget($this, "export"));
$this->tpl->setVariable("BTN_TXT", $this->lng->txt("cont_create_export_file"));
$this->tpl->parseCurrentBlock();
// view last export log button
if (is_file($this->object->getExportDirectory()."/export.log"))
{
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK", $this->ctrl->getLinkTarget($this, "viewExportLog"));
$this->tpl->setVariable("BTN_TXT", $this->lng->txt("cont_view_last_export_log"));
$this->tpl->parseCurrentBlock();
}
$export_dir = $this->object->getExportDirectory();
$export_files = $this->object->getExportFiles($export_dir);
// create table
require_once("classes/class.ilTableGUI.php");
$tbl = new ilTableGUI();
// load files templates
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
// load template for table content data
$this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.glo_export_file_row.html", true);
$num = 0;
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$tbl->setTitle($this->lng->txt("cont_export_files"));
$tbl->setHeaderNames(array("", $this->lng->txt("cont_file"),
$this->lng->txt("cont_size"), $this->lng->txt("date") ));
$cols = array("", "file", "size", "date");
$header_params = array("ref_id" => $_GET["ref_id"],
"cmd" => "exportList", "cmdClass" => get_class($this));
$tbl->setHeaderVars($cols, $header_params);
$tbl->setColumnWidth(array("1%", "49%", "25%", "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", 4);
// delete button
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "confirmDeleteExportFile");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "downloadExportFile");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("download"));
$this->tpl->parseCurrentBlock();
// footer
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
//$tbl->disable("footer");
$tbl->setMaxCount(count($export_files));
$export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
$tbl->render();
if(count($export_files) > 0)
{
$i=0;
foreach($export_files as $exp_file)
{
$this->tpl->setCurrentBlock("tbl_content");
$this->tpl->setVariable("TXT_FILENAME", $exp_file);
$css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
$this->tpl->setVariable("CSS_ROW", $css_row);
$this->tpl->setVariable("TXT_SIZE", filesize($export_dir."/".$exp_file));
$this->tpl->setVariable("CHECKBOX_ID", $exp_file);
$file_arr = explode("__", $exp_file);
$this->tpl->setVariable("TXT_DATE", date("Y-m-d H:i:s",$file_arr[0]));
$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", 3);
$this->tpl->parseCurrentBlock();
}
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGlossaryGUI::getTabs | ( | &$ | tabs_gui | ) |
get tabs
Reimplemented from ilObjectGUI.
Definition at line 1446 of file class.ilObjGlossaryGUI.php.
Referenced by setTabs().
{
// list definitions
$tabs_gui->addTarget("cont_terms",
$this->ctrl->getLinkTarget($this, "listTerms"), "listTerms",
get_class($this));
// properties
$tabs_gui->addTarget("properties",
$this->ctrl->getLinkTarget($this, "properties"), "properties",
get_class($this));
// meta data
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTarget($this, "editMeta"), "editMeta",
get_class($this));
// permissions
$tabs_gui->addTarget("permission_settings",
$this->ctrl->getLinkTarget($this, "perm"), "perm",
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:| ilObjGlossaryGUI::getTemplate | ( | ) |
Definition at line 1411 of file class.ilObjGlossaryGUI.php.
References sendInfo().
Referenced by executeCommand().
{
$this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
$title = $this->object->getTitle();
// catch feedback message
sendInfo();
$this->tpl->setVariable("HEADER", $this->lng->txt("glo").": ".$title);
//$this->setAdminTabs($_POST["new_type"]);
//$this->setLocator();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGlossaryGUI::ilObjGlossaryGUI | ( | $ | a_data, | |
| $ | a_id = 0, |
|||
| $ | a_call_by_reference = true, |
|||
| $ | a_prepare_output = true | |||
| ) |
Constructor public.
Definition at line 54 of file class.ilObjGlossaryGUI.php.
References $ilCtrl, ilObjectGUI::ilObjectGUI(), ilObjectGUI::prepareOutput(), and ilObjectGUI::setTabTargetScript().
{
global $ilCtrl;
$this->ctrl =& $ilCtrl;
$this->ctrl->saveParameter($this, array("ref_id", "offset"));
$this->type = "glo";
parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
if (defined("ILIAS_MODULE"))
{
$this->setTabTargetScript("glossary_edit.php");
}
if ($a_prepare_output)
{
$this->prepareOutput();
}
}
Here is the call graph for this function:| ilObjGlossaryGUI::importFileObject | ( | ) |
display status information or report errors messages in case of error
public
Definition at line 228 of file class.ilObjGlossaryGUI.php.
References $_GET, $file, $rbacsystem, ilObject::_writeDescription(), ilObject::_writeTitle(), ilObjectGUI::getReturnLocation(), ilUtil::moveUploadedFile(), ilUtil::redirect(), sendInfo(), and ilUtil::unzip().
{
global $_FILES, $rbacsystem;
// check if file was uploaded
$source = $_FILES["xmldoc"]["tmp_name"];
if (($source == 'none') || (!$source))
{
$this->ilias->raiseError($this->lng->txt("msg_no_file"),$this->ilias->error_obj->MESSAGE);
}
// check create permission
/*
if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $_GET["new_type"]))
{
$this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->WARNING);
}*/
// check correct file type
if ($_FILES["xmldoc"]["type"] != "application/zip" && $_FILES["xmldoc"]["type"] != "application/x-zip-compressed"
&& $_FILES["xmldoc"]["type"] != "application/x-zip")
{
$this->ilias->raiseError($this->lng->txt("msg_invalid_filetype"),$this->ilias->error_obj->MESSAGE);
}
// create and insert object in objecttree
include_once("content/classes/class.ilObjGlossary.php");
$newObj = new ilObjGlossary();
$newObj->setType($_GET["new_type"]);
$newObj->setTitle("dummy");
//$newObj->setDescription("dummy");
$newObj->create(true);
$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 import directory
$newObj->createImportDirectory();
// copy uploaded file to import directory
$file = pathinfo($_FILES["xmldoc"]["name"]);
$full_path = $newObj->getImportDirectory()."/".$_FILES["xmldoc"]["name"];
ilUtil::moveUploadedFile($_FILES["xmldoc"]["tmp_name"],
$_FILES["xmldoc"]["name"], $full_path);
//move_uploaded_file($_FILES["xmldoc"]["tmp_name"], $full_path);
// unzip file
ilUtil::unzip($full_path);
// determine filename of xml file
$subdir = basename($file["basename"],".".$file["extension"]);
$xml_file = $newObj->getImportDirectory()."/".$subdir."/".$subdir.".xml";
//echo "xmlfile:".$xml_file;
include_once ("content/classes/class.ilContObjParser.php");
$contParser = new ilContObjParser($newObj, $xml_file, $subdir);
$contParser->startParsing();
/* update title and description in object data */
// not allowed here: move to glossary class!
if (is_object($newObj->meta_data))
{
//$newObj->meta_data->read();
//$newObj->setTitle($newObj->meta_data->getTitle());
//$newObj->setDescription($newObj->meta_data->getDescription());
ilObject::_writeTitle($newObj->getID(), $newObj->getTitle());
ilObject::_writeDescription($newObj->getID(), $newObj->getDescription());
//$q = "UPDATE object_data SET title = '" . $newObj->getTitle() . "', description = '" . $newObj->getDescription() . "' WHERE obj_id = '" . $newObj->getID() . "'";
//$this->ilias->db->query($q);
}
sendInfo($this->lng->txt("glo_added"),true);
ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
}
Here is the call graph for this function:| ilObjGlossaryGUI::importObject | ( | ) |
import new object form
public
Reimplemented from ilObjectGUI.
Definition at line 171 of file class.ilObjGlossaryGUI.php.
References createObject().
{
$this->createObject();
}
Here is the call graph for this function:| ilObjGlossaryGUI::listTerms | ( | ) |
list terms
Definition at line 536 of file class.ilObjGlossaryGUI.php.
References $_GET, $_SESSION, $ilUser, $lang, $num, $tbl, $term, formSelect(), ilGlossaryDefinition::getDefinitionList(), ilMetaData::getLanguages(), ilObjectGUI::setActions(), ilObjectGUI::showActions(), ilUtil::switchColor(), and ilPCParagraph::xml2output().
{
global $ilUser;
//$this->getTemplate();
//$this->setTabs();
//$this->setLocator();
$this->lng->loadLanguageModule("meta");
include_once "./classes/class.ilTableGUI.php";
// view button
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK", "glossary_presentation.php?cmd=listTerms&ref_id=".$this->object->getRefID());
$this->tpl->setVariable("BTN_TARGET"," target=\"bottom\" ");
$this->tpl->setVariable("BTN_TXT",$this->lng->txt("view"));
$this->tpl->parseCurrentBlock();
// export button
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK", $this->ctrl->getLinkTarget($this, "exportList"));
//$this->tpl->setVariable("BTN_TARGET"," target=\"_top\" ");
$this->tpl->setVariable("BTN_TXT", $this->lng->txt("export"));
$this->tpl->parseCurrentBlock();
// glossary term list template
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.glossary_term_list.html", true);
$this->tpl->setVariable("FORMACTION1", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_TERM", $this->lng->txt("cont_term"));
$this->tpl->setVariable("TXT_ADD2", $this->lng->txt("add"));
$this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("language"));
$lang = ilMetaData::getLanguages();
if ($_SESSION["il_text_lang_".$_GET["ref_id"]] != "")
{
$s_lang = $_SESSION["il_text_lang_".$_GET["ref_id"]];
}
else
{
$s_lang = $ilUser->getLanguage();
}
$select_language = ilUtil::formSelect ($s_lang, "term_language",$lang,false,true);
$this->tpl->setVariable("SELECT_LANGUAGE", $select_language);
// load template for table
$this->tpl->addBlockfile("TERM_TABLE", "term_table", "tpl.table.html");
// load template for table content data
$this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.term_tbl_row.html", true);
$num = 0;
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// create table
$tbl = new ilTableGUI();
// title & header columns
$tbl->setTitle($this->lng->txt("cont_terms"));
//$tbl->setHelp("tbl_help.php","icon_help.gif",$this->lng->txt("help"));
$tbl->setHeaderNames(array("", $this->lng->txt("cont_term"),
$this->lng->txt("language"), $this->lng->txt("cont_definitions")));
$cols = array("", "term", "language", "definitions", "id");
$header_params = array("ref_id" => $this->ref_id, "cmd" => "listTerms");
$tbl->setHeaderVars($cols, $header_params);
$tbl->setColumnWidth(array("1%","24%","15%","60%"));
// 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", 4);
$this->setActions(array("confirmTermDeletion" => "delete", "addDefinition" => "cont_add_definition"));
//$this->setSubObjects(array("term" => array()));
$this->showActions(true);
// footer
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
//$tbl->disable("footer");
$term_list = $this->object->getTermList();
$tbl->setMaxCount(count($term_list));
// sorting array
//$term_list = ilUtil::sortArray($term_list, $_GET["sort_by"], $_GET["sort_order"]);
$term_list = array_slice($term_list, $_GET["offset"], $_GET["limit"]);
// render table
$tbl->render();
if (count($term_list) > 0)
{
$i=1;
foreach($term_list as $key => $term)
{
$css_row = ilUtil::switchColor($i++,"tblrow1","tblrow2");
$defs = ilGlossaryDefinition::getDefinitionList($term["id"]);
for($j=0; $j<count($defs); $j++)
{
$def = $defs[$j];
// up
if ($j > 0)
{
$this->tpl->setCurrentBlock("move_up");
$this->tpl->setVariable("TXT_UP", $this->lng->txt("up"));
$this->ctrl->setParameter($this, "term_id", $term["id"]);
$this->ctrl->setParameter($this, "def", $def["id"]);
$this->tpl->setVariable("LINK_UP",
$this->ctrl->getLinkTarget($this, "moveDefinitionUp"));
$this->tpl->parseCurrentBlock();
}
// down
if ($j+1 < count($defs))
{
$this->tpl->setCurrentBlock("move_down");
$this->tpl->setVariable("TXT_DOWN", $this->lng->txt("down"));
$this->ctrl->setParameter($this, "term_id", $term["id"]);
$this->ctrl->setParameter($this, "def", $def["id"]);
$this->tpl->setVariable("LINK_DOWN",
$this->ctrl->getLinkTarget($this, "moveDefinitionDown"));
$this->tpl->parseCurrentBlock();
}
// delete
$this->tpl->setCurrentBlock("delete");
$this->ctrl->setParameter($this, "term_id", $term["id"]);
$this->ctrl->setParameter($this, "def", $def["id"]);
$this->tpl->setVariable("LINK_DELETE",
$this->ctrl->getLinkTarget($this, "confirmDefinitionDeletion"));
$this->tpl->setVariable("TXT_DELETE", $this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();
// edit
$this->tpl->setCurrentBlock("edit");
$this->ctrl->setParameterByClass("ilpageobjectgui", "term_id", $term["id"]);
$this->ctrl->setParameterByClass("ilpageobjectgui", "def", $def["id"]);
$this->tpl->setVariable("LINK_EDIT",
$this->ctrl->getLinkTargetByClass(array("ilglossarytermgui",
"iltermdefinitioneditorgui",
"ilpageobjectgui"), "view"));
$this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
$this->tpl->parseCurrentBlock();
// text
$this->tpl->setCurrentBlock("definition");
$short_str = ilPCParagraph::xml2output($def["short_text"]);
//$short_str = str_replace("<", "<", $short_str);
//$short_str = str_replace(">", ">", $short_str);
$this->tpl->setVariable("DEF_SHORT", $short_str);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("definition_row");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("check_col");
$this->tpl->setVariable("CHECKBOX_ID", $term["id"]);
$this->tpl->setVariable("CSS_ROW", $css_row);
$this->tpl->parseCurrentBlock();
// edit term link
$this->tpl->setCurrentBlock("edit_term");
$this->tpl->setVariable("TEXT_TERM", $term["term"]);
$this->ctrl->setParameter($this, "term_id", $term["id"]);
$this->tpl->setVariable("LINK_EDIT_TERM",
$this->ctrl->getLinkTarget($this, "editTerm"));
$this->tpl->setVariable("TXT_EDIT_TERM", $this->lng->txt("edit"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tbl_content");
// output term and language
$this->tpl->setVariable("CSS_ROW", $css_row);
$this->tpl->setVariable("TEXT_LANGUAGE", $this->lng->txt("meta_l_".$term["language"]));
$this->tpl->setCurrentBlock("tbl_content");
$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:| ilObjGlossaryGUI::moveDefinitionDown | ( | ) |
move a definiton down
Definition at line 776 of file class.ilObjGlossaryGUI.php.
References $_GET.
{
include_once("content/classes/class.ilGlossaryDefinition.php");
$definition =& new ilGlossaryDefinition($_GET["def"]);
$definition->moveDown();
$this->ctrl->redirect($this, "listTerms");
}
| ilObjGlossaryGUI::moveDefinitionUp | ( | ) |
move a definiton up
Definition at line 763 of file class.ilObjGlossaryGUI.php.
References $_GET.
{
include_once("content/classes/class.ilGlossaryDefinition.php");
$definition =& new ilGlossaryDefinition($_GET["def"]);
$definition->moveUp();
$this->ctrl->redirect($this, "listTerms");
}
| ilObjGlossaryGUI::owner | ( | ) |
show owner
Definition at line 1338 of file class.ilObjGlossaryGUI.php.
References ilObjectGUI::ownerObject().
{
//$this->prepareOutput();
$this->ownerObject();
}
Here is the call graph for this function:| ilObjGlossaryGUI::perm | ( | ) |
edit permissions
Definition at line 1309 of file class.ilObjGlossaryGUI.php.
References ilObjectGUI::permObject(), and ilObjectGUI::setFormAction().
{
//$this->prepareOutput();
$this->setFormAction("addRole", "glossary_edit.php?ref_id=".$this->object->getRefId()."&cmd=addRole");
$this->setFormAction("permSave", "glossary_edit.php?ref_id=".$this->object->getRefId()."&cmd=permSave");
$this->permObject();
}
Here is the call graph for this function:| ilObjGlossaryGUI::permSave | ( | ) |
save permissions
Definition at line 1320 of file class.ilObjGlossaryGUI.php.
References ilObjectGUI::permSaveObject(), and ilObjectGUI::setReturnLocation().
{
$this->setReturnLocation("permSave", "glossary_edit.php?ref_id=".$this->object->getRefId()."&cmd=perm");
$this->permSaveObject();
}
Here is the call graph for this function:| ilObjGlossaryGUI::properties | ( | ) |
edit properties of object (admin form)
public
Definition at line 495 of file class.ilObjGlossaryGUI.php.
References $rbacsystem, ilObjectGUI::$tpl, and ilObjectGUI::$tree.
{
global $rbacsystem, $tree, $tpl;
// glossary properties
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.glossary_properties.html", true);
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_PROPERTIES", $this->lng->txt("cont_glo_properties"));
// 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");
}
$this->tpl->setCurrentBlock("commands");
$this->tpl->setVariable("BTN_NAME", "saveProperties");
$this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
$this->tpl->parseCurrentBlock();
}
| ilObjGlossaryGUI::saveMeta | ( | ) |
save meta data (called by module)
Definition at line 454 of file class.ilObjGlossaryGUI.php.
References saveMetaObject().
{
$this->saveMetaObject($this->ctrl->getLinkTarget($this, "editMeta"));
}
Here is the call graph for this function:| ilObjGlossaryGUI::saveMetaObject | ( | $ | a_target = "" |
) |
save meta data (called by administration)
Definition at line 435 of file class.ilObjGlossaryGUI.php.
References $_POST, ilUtil::appendUrlParameterString(), and ilUtil::redirect().
Referenced by saveMeta().
{
if ($a_target == "")
{
$a_target = "adm_object.php?cmd=editMeta&ref_id=".$this->object->getRefId();
}
include_once "classes/class.ilMetaDataGUI.php";
$meta_gui =& new ilMetaDataGUI();
$meta_gui->setObject($this->object);
$meta_gui->save($_POST["meta_section"]);
ilUtil::redirect(ilUtil::appendUrlParameterString($a_target,
"meta_section=" . $_POST["meta_section"]));
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGlossaryGUI::saveObject | ( | ) |
save new content object to db
Reimplemented from ilObjectGUI.
Definition at line 179 of file class.ilObjGlossaryGUI.php.
References $_GET, $_POST, $rbacadmin, $rbacsystem, ilObjectGUI::getReturnLocation(), ilUtil::redirect(), and sendInfo().
{
global $rbacadmin, $rbacsystem;
// always call parent method first to create an object_data entry & a reference
//$newObj = parent::saveObject();
// TODO: fix MetaDataGUI implementation to make it compatible to use parent call
if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $_GET["new_type"]))
{
$this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->MESSAGE);
}
// check required fields
if (empty($_POST["Fobject"]["title"]))
{
$this->ilErr->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilErr->MESSAGE);
}
// create and insert object in objecttree
include_once("content/classes/class.ilObjGlossary.php");
$newObj = new ilObjGlossary();
$newObj->setType($this->type);
$newObj->setTitle($_POST["Fobject"]["title"]);
$newObj->setDescription($_POST["Fobject"]["desc"]);
$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());
//$roles = $newObj->initDefaultRoles();
// assign author role to creator of forum object
//$rbacadmin->assignUser($roles[0], $newObj->getOwner(), "n");
//ilObjUser::updateActiveRoles($newObj->getOwner());
unset($newObj);
// always send a message
sendInfo($this->lng->txt("glo_added"),true);
ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
}
Here is the call graph for this function:| ilObjGlossaryGUI::saveProperties | ( | ) |
save properties
Definition at line 523 of file class.ilObjGlossaryGUI.php.
References $_POST, sendInfo(), and ilUtil::yn2tf().
{
$this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
$this->object->update();
sendInfo($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "properties");
}
Here is the call graph for this function:| ilObjGlossaryGUI::saveTerm | ( | ) |
Definition at line 1367 of file class.ilObjGlossaryGUI.php.
References $_GET, and ilUtil::redirect().
{
$term_gui =& new ilGlossaryTermGUI();
$term_gui->setGlossary($this->object);
$term_gui->save();
sendinfo($this->lng->txt("cont_added_term"),true);
ilUtil::redirect("glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
}
Here is the call graph for this function:| ilObjGlossaryGUI::setLocator | ( | $ | a_tree = "", |
|
| $ | a_id = "" | |||
| ) |
set Locator
| object | tree object | |
| integer | reference id public |
Definition at line 1236 of file class.ilObjGlossaryGUI.php.
References $_GET, $ilias_locator, and $term.
Referenced by executeCommand().
{
global $ilias_locator;
if(!defined("ILIAS_MODULE"))
{
parent::setLocator($a_tree, $a_id);
}
else
{
if(is_object($this->object))
{
require_once("content/classes/class.ilGlossaryLocatorGUI.php");
$gloss_loc =& new ilGlossaryLocatorGUI();
if (is_object($this->term))
{
$gloss_loc->setTerm($this->term);
}
$gloss_loc->setGlossary($this->object);
//$gloss_loc->setDefinition($this->definition);
$gloss_loc->display();
return;
// ### AA 03.11.10 added new locator GUI class ###
$i = 1;
$this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
if (!empty($_GET["term_id"]))
{
$this->tpl->touchBlock("locator_separator");
}
$this->tpl->setCurrentBlock("locator_item");
$this->tpl->setVariable("ITEM", $this->object->getTitle());
// TODO: SCRIPT NAME HAS TO BE VARIABLE!!!
$this->tpl->setVariable("LINK_ITEM", "glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
$this->tpl->parseCurrentBlock();
// ### AA 03.11.10 added new locator GUI class ###
// navigate locator
$ilias_locator->navigate($i++,$this->object->getTitle(),"glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms","bottom");
if (!empty($_GET["term_id"]))
{
$term =& new ilGlossaryTerm($_GET["term_id"]);
$this->tpl->setCurrentBlock("locator_item");
$this->tpl->setVariable("ITEM", $term->getTerm());
$this->tpl->setVariable("LINK_ITEM", "glossary_edit.php?ref_id=".$_GET["ref_id"].
"&cmd=listDefinitions&term_id=".$term->getId());
$this->tpl->parseCurrentBlock();
// ### AA 03.11.10 added new locator GUI class ###
// navigate locator
$ilias_locator->navigate($i++,$term->getTerm(),"glossary_edit.php?ref_id=".$_GET["ref_id"].
"&cmd=listDefinitions&term_id=".$term->getId(),"bottom");
}
//$this->tpl->touchBlock("locator_separator");
$this->tpl->setCurrentBlock("locator");
$this->tpl->setVariable("TXT_LOCATOR",$debug.$this->lng->txt("locator"));
$this->tpl->parseCurrentBlock();
}
}
}
Here is the caller graph for this function:| ilObjGlossaryGUI::setTabs | ( | ) |
output tabs
Definition at line 1431 of file class.ilObjGlossaryGUI.php.
References getTabs().
Referenced by confirmDeleteExportFile(), executeCommand(), exportList(), and viewExportLog().
{
// catch feedback message
include_once("classes/class.ilTabsGUI.php");
$tabs_gui =& new ilTabsGUI();
$this->getTabs($tabs_gui);
$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGlossaryGUI::updateTerm | ( | ) |
update term
Definition at line 878 of file class.ilObjGlossaryGUI.php.
References $_GET, $_POST, $term, and ilUtil::stripSlashes().
{
$term = new ilGlossaryTerm($_GET["term_id"]);
$term->setTerm(ilUtil::stripSlashes($_POST["term"]));
$term->setLanguage($_POST["term_language"]);
$term->update();
sendinfo($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this, "listTerms");
}
Here is the call graph for this function:| ilObjGlossaryGUI::view | ( | ) |
view content
Definition at line 1347 of file class.ilObjGlossaryGUI.php.
References viewObject().
{
//$this->prepareOutput();
$this->viewObject();
}
Here is the call graph for this function:| ilObjGlossaryGUI::viewExportLog | ( | ) |
Definition at line 1044 of file class.ilObjGlossaryGUI.php.
References ilObjectGUI::$tree, and setTabs().
{
global $tree;
$this->setTabs();
//add template for view button
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
// create export file button
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK", $this->ctrl->getLinkTarget($this, "exportList"));
$this->tpl->setVariable("BTN_TXT", $this->lng->txt("cont_export_files"));
$this->tpl->parseCurrentBlock();
// load files templates
$this->tpl->setVariable("ADM_CONTENT",
nl2br(file_get_contents($this->object->getExportDirectory()."/export.log")));
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilObjGlossaryGUI::viewObject | ( | ) |
list childs of current object
public
Reimplemented from ilObjectGUI.
Definition at line 460 of file class.ilObjGlossaryGUI.php.
References $rbacsystem.
Referenced by view().
{
global $rbacsystem;
if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
// edit button
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
if (!defined("ILIAS_MODULE"))
{
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK","content/glossary_edit.php?cmd=listTerms&ref_id=".$this->object->getRefID());
$this->tpl->setVariable("BTN_TARGET"," target=\"bottom\" ");
$this->tpl->setVariable("BTN_TXT",$this->lng->txt("edit"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK","content/glossary_presentation.php?cmd=listTerms&ref_id=".$this->object->getRefID());
$this->tpl->setVariable("BTN_TARGET"," target=\"bottom\" ");
$this->tpl->setVariable("BTN_TXT",$this->lng->txt("view"));
$this->tpl->parseCurrentBlock();
//parent::viewObject();
}
Here is the caller graph for this function:| ilObjGlossaryGUI::$admin_tabs |
Definition at line 46 of file class.ilObjGlossaryGUI.php.
| ilObjGlossaryGUI::$mode |
Definition at line 47 of file class.ilObjGlossaryGUI.php.
| ilObjGlossaryGUI::$term |
Definition at line 48 of file class.ilObjGlossaryGUI.php.
Referenced by addDefinition(), addTerm(), confirmDefinitionDeletion(), confirmTermDeletion(), deleteTerms(), editTerm(), listTerms(), setLocator(), and updateTerm().
1.7.1