Public Member Functions | |
| ilMDEditorGUI ($a_rbac_id, $a_obj_id, $a_obj_type) | |
| & | executeCommand () |
| debug () | |
| listGeneral () | |
| updateGeneral () | |
| updateTechnical () | |
| listTechnical () | |
| listLifecycle () | |
| updateLifecycle () | |
| listMetaMetaData () | |
| updateMetaMetaData () | |
| listRights () | |
| updateRights () | |
| listEducational () | |
| updateEducational () | |
| listRelation () | |
| updateRelation () | |
| listAnnotation () | |
| updateAnnotation () | |
| listClassification () | |
| updateClassification () | |
| deleteElement () | |
| deleteSection () | |
| addSection () | |
| addSectionElement () | |
| listSection () | |
| __fillSubelements () | |
| __setTabs ($a_active) | |
| __showLanguageSelect ($a_name, $a_value="") | |
| shows language select box | |
| addObserver (&$a_class, $a_method, $a_element) | |
| callListeners ($a_element) | |
Data Fields | |
| $ctrl = null | |
| $lng = null | |
| $tpl = null | |
| $md_obj = null | |
| $observers = array() | |
| $rbac_id = null | |
| $obj_id = null | |
| $obj_type = null | |
Definition at line 36 of file class.ilMDEditorGUI.php.
| ilMDEditorGUI::__fillSubelements | ( | ) |
Definition at line 1997 of file class.ilMDEditorGUI.php.
References ilUtil::formSelect().
Referenced by listGeneral(), listLifecycle(), listMetaMetaData(), and listTechnical().
{
if(count($subs = $this->md_section->getPossibleSubelements()))
{
$subs = array_merge(array('' => 'meta_please_select'),$subs);
$this->tpl->setCurrentBlock("subelements");
$this->tpl->setVariable("SEL_SUBELEMENTS",ilUtil::formSelect('','section_element',$subs));
$this->tpl->setVariable("TXT_NEW_ELEMENT", $this->lng->txt("meta_new_element"));
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("TXT_ADD",$this->lng->txt('meta_add'));
}
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::__setTabs | ( | $ | a_active | ) |
Definition at line 2016 of file class.ilMDEditorGUI.php.
Referenced by debug(), listAnnotation(), listClassification(), listEducational(), listGeneral(), listLifecycle(), listMetaMetaData(), listRelation(), listRights(), and listTechnical().
{
$tabs = array('meta_general' => 'listGeneral',
'meta_lifecycle' => 'listLifecycle',
'meta_meta_metadata' => 'listMetaMetadata',
'meta_technical' => 'listTechnical',
'meta_educational' => 'listEducational',
'meta_rights' => 'listRights',
'meta_relation' => 'listRelation',
'meta_annotation' => 'listAnnotation',
'meta_classification' => 'listClassification');
if(DEVMODE)
{
$tabs['debug'] = 'debug';
}
foreach($tabs as $key => $target)
{
$this->tpl->setCurrentBlock("md_tabs");
if($a_active == $key)
{
$this->tpl->setVariable("TAB_CLASS",'tabactive');
}
else
{
$this->tpl->setVariable("TAB_CLASS",'tabinactive');
}
$this->ctrl->setParameter($this,'section',$key);
$this->tpl->setVariable("TAB_HREF",$this->ctrl->getLinkTarget($this,'listSection'));
$this->tpl->setVariable("TAB_TXT",$this->lng->txt($key));
$this->tpl->parseCurrentBlock();
}
return true;
}
Here is the caller graph for this function:| ilMDEditorGUI::__showLanguageSelect | ( | $ | a_name, | |
| $ | a_value = "" | |||
| ) |
shows language select box
Definition at line 2056 of file class.ilMDEditorGUI.php.
References $tpl, and ilMDLanguageItem::_getLanguages().
Referenced by listAnnotation(), listClassification(), listEducational(), listGeneral(), listLifecycle(), listMetaMetaData(), listRelation(), listRights(), and listTechnical().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$tpl = new ilTemplate("tpl.lang_selection.html", true, true);
foreach(ilMDLanguageItem::_getLanguages() as $code => $text)
{
$tpl->setCurrentBlock("lg_option");
$tpl->setVariable("VAL_LG", $code);
$tpl->setVariable("TXT_LG", $text);
if ($a_value != "" &&
$a_value == $code)
{
$tpl->setVariable("SELECTED", "selected");
}
$tpl->parseCurrentBlock();
}
$tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
$tpl->setVariable("SEL_NAME", $a_name);
$return = $tpl->get();
unset($tpl);
return $return;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::addObserver | ( | &$ | a_class, | |
| $ | a_method, | |||
| $ | a_element | |||
| ) |
Definition at line 2089 of file class.ilMDEditorGUI.php.
{
$this->observers[$a_element]['class'] =& $a_class;
$this->observers[$a_element]['method'] =& $a_method;
return true;
}
| ilMDEditorGUI::addSection | ( | ) |
Definition at line 1766 of file class.ilMDEditorGUI.php.
References $_GET, and listSection().
{
// Switch section
switch($_GET['section'])
{
case 'meta_technical':
$this->md_section =& $this->md_obj->addTechnical();
$this->md_section->save();
break;
case 'meta_lifecycle':
$this->md_section =& $this->md_obj->addLifecycle();
$this->md_section->save();
$con =& $this->md_section->addContribute();
$con->save();
$ent =& $con->addEntity();
$ent->save();
break;
case 'meta_meta_metadata':
$this->md_section = $this->md_obj->addMetaMetadata();
$this->md_section->save();
$ide =& $this->md_section->addIdentifier();
$ide->save();
$con =& $this->md_section->addContribute();
$con->save();
$ent =& $con->addEntity();
$ent->save();
break;
case 'meta_rights':
$this->md_section = $this->md_obj->addRights();
$this->md_section->save();
break;
case 'meta_educational':
$this->md_section = $this->md_obj->addEducational();
$this->md_section->save();
break;
case 'meta_relation':
$this->md_section = $this->md_obj->addRelation();
$this->md_section->save();
$ident = $this->md_section->addIdentifier_();
$ident->save();
$des = $this->md_section->addDescription();
$des->save();
break;
case 'meta_annotation':
$this->md_section = $this->md_obj->addAnnotation();
$this->md_section->save();
break;
case 'meta_classification':
$this->md_section = $this->md_obj->addClassification();
$this->md_section->save();
break;
}
$this->listSection();
return true;
}
Here is the call graph for this function:| ilMDEditorGUI::addSectionElement | ( | ) |
Definition at line 1836 of file class.ilMDEditorGUI.php.
References $_GET, $_POST, and listSection().
{
$section_element = (empty($_POST['section_element']))
? $_GET['section_element']
: $_POST['section_element'];
// Switch section
switch($_GET['section'])
{
case 'meta_technical':
$this->md_section =& $this->md_obj->getTechnical();
break;
case 'meta_lifecycle':
$this->md_section =& $this->md_obj->getLifecycle();
break;
case 'meta_meta_metadata':
$this->md_section =& $this->md_obj->getMetaMetadata();
break;
case 'meta_general':
$this->md_section = $this->md_obj->getGeneral();
break;
case 'meta_educational':
$this->md_section = $this->md_obj->getEducational();
break;
case 'meta_classification':
$arr = explode("_", $section_element);
$section_element = $arr[0];
$this->md_section = $this->md_obj->getClassification($arr[1]);
break;
}
// Switch new element
switch($section_element)
{
case 'meta_or_composite':
$md_new =& $this->md_section->addOrComposite();
$md_new = $md_new->addRequirement();
break;
case 'meta_requirement':
$md_new =& $this->md_section->addRequirement();
break;
case 'meta_location':
$md_new =& $this->md_section->addLocation();
break;
case 'meta_format':
$md_new = $this->md_section->addFormat();
break;
case 'meta_entity':
$md_new = $this->md_section->getContribute((int) $_GET['meta_index']);
$md_new = $md_new->addEntity();
break;
case 'meta_identifier':
$md_new = $this->md_section->addIdentifier();
break;
case 'meta_contribute':
$md_new =& $this->md_section->addContribute();
$md_new->save();
$md_new = $md_new->addEntity();
break;
case 'educational_language':
case 'meta_language':
$md_new = $this->md_section->addLanguage();
break;
case 'educational_description':
case 'meta_description':
$md_new = $this->md_section->addDescription();
break;
case 'Keyword':
case 'meta_keyword':
$md_new = $this->md_section->addKeyword();
break;
case 'educational_typical_age_range':
$md_new = $this->md_section->addTypicalAgeRange();
break;
case 'relation_resource_identifier':
$rel = $this->md_obj->getRelation($_GET['meta_index']);
$md_new = $rel->addIdentifier_();
break;
case 'relation_resource_description':
$rel = $this->md_obj->getRelation($_GET['meta_index']);
$md_new = $rel->addDescription();
break;
case 'TaxonPath':
$md_new = $this->md_section->addTaxonPath();
$md_new->save();
$md_new = $md_new->addTaxon();
break;
case 'Taxon':
$tax_path = $this->md_section->getTaxonPath($_GET['meta_index']);
$md_new = $tax_path->addTaxon();
break;
}
$md_new->save();
$this->listSection();
return true;
}
Here is the call graph for this function:| ilMDEditorGUI::callListeners | ( | $ | a_element | ) |
Definition at line 2096 of file class.ilMDEditorGUI.php.
Referenced by updateGeneral().
{
if(isset($this->observers[$a_element]))
{
$class =& $this->observers[$a_element]['class'];
$method = $this->observers[$a_element]['method'];
return $class->$method($a_element);
}
return false;
}
Here is the caller graph for this function:| ilMDEditorGUI::debug | ( | ) |
Definition at line 84 of file class.ilMDEditorGUI.php.
References __setTabs().
Referenced by listSection().
{
include_once 'Services/MetaData/classes/class.ilMD2XML.php';
$xml_writer =& new ilMD2XML($this->md_obj->getRBACId(),$this->md_obj->getObjId(),$this->md_obj->getObjType());
$xml_writer->startExport();
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_general');
$this->tpl->setVariable("MD_CONTENT",htmlentities($xml_writer->getXML()));
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::deleteElement | ( | ) |
Definition at line 1742 of file class.ilMDEditorGUI.php.
References $_GET, ilMDFactory::_getInstance(), and listSection().
{
include_once 'Services/MetaData/classes/class.ilMDFactory.php';
$md_element = ilMDFactory::_getInstance($_GET['meta_path'],$_GET['meta_index'],$_GET['meta_technical']);
$md_element->delete();
$this->listSection();
return true;
}
Here is the call graph for this function:| ilMDEditorGUI::deleteSection | ( | ) |
Definition at line 1754 of file class.ilMDEditorGUI.php.
References $_GET, ilMDFactory::_getInstance(), and listSection().
{
include_once 'Services/MetaData/classes/class.ilMDFactory.php';
$md_element = ilMDFactory::_getInstance($_GET['section'],$_GET['meta_index']);
$md_element->delete();
$this->listSection();
return true;
}
Here is the call graph for this function:| & ilMDEditorGUI::executeCommand | ( | ) |
Definition at line 63 of file class.ilMDEditorGUI.php.
References $cmd, and $rbacsystem.
{
global $rbacsystem;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
default:
if(!$cmd)
{
$cmd = "listSection";
}
$this->$cmd();
break;
}
return true;
}
| ilMDEditorGUI::ilMDEditorGUI | ( | $ | a_rbac_id, | |
| $ | a_obj_id, | |||
| $ | a_obj_type | |||
| ) |
| ilMDEditorGUI::listAnnotation | ( | ) |
Definition at line 1420 of file class.ilMDEditorGUI.php.
References __setTabs(), __showLanguageSelect(), ilUtil::prepareFormOutput(), and ilUtil::stripSlashes().
Referenced by listSection().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_annotation');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_annotation.html','Services/MetaData');
$anno_ids = $this->md_obj->getAnnotationIds();
if (!is_array($anno_ids) || count($anno_ids) == 0)
{
$this->tpl->setCurrentBlock("no_annotation");
$this->tpl->setVariable("TXT_NO_ANNOTATION", $this->lng->txt("meta_no_annotation"));
$this->tpl->setVariable("TXT_ADD_ANNOTATION", $this->lng->txt("meta_add"));
$this->ctrl->setParameter($this, "section", "meta_annotation");
$this->tpl->setVariable("ACTION_ADD_ANNOTATION",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
}
else
{
foreach($anno_ids as $anno_id)
{
$this->ctrl->setParameter($this, 'meta_index', $anno_id);
$this->ctrl->setParameter($this, "section", "meta_annotation");
$this->md_section = $this->md_obj->getAnnotation($anno_id);
$this->tpl->setCurrentBlock("annotation_loop");
$this->tpl->setVariable("ANNOTATION_ID", $anno_id);
$this->tpl->setVariable("TXT_ANNOTATION", $this->lng->txt("meta_annotation"));
$this->ctrl->setParameter($this, "meta_index", $anno_id);
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->ctrl->setParameter($this, "section", "meta_annotation");
$this->tpl->setVariable("ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->setVariable("TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->setVariable("TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->setVariable("TXT_ENTITY", $this->lng->txt("meta_entity"));
$this->tpl->setVariable("VAL_ENTITY", ilUtil::prepareFormOutput($this->md_section->getEntity()));
$this->tpl->setVariable("TXT_DATE", $this->lng->txt("meta_date"));
$this->tpl->setVariable("VAL_DATE", ilUtil::prepareFormOutput($this->md_section->getDate()));
/* Description */
$this->tpl->setVariable("TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->tpl->setVariable("TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("VAL_DESCRIPTION", ilUtil::stripSlashes($this->md_section->getDescription()));
$this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("VAL_DESCRIPTION_LANGUAGE",
$this->__showLanguageSelect('annotation['.$anno_id.'][Language]',
$this->md_section->getDescriptionLanguageCode()));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("annotation");
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listClassification | ( | ) |
Definition at line 1506 of file class.ilMDEditorGUI.php.
References __setTabs(), __showLanguageSelect(), and ilUtil::prepareFormOutput().
Referenced by listSection().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_classification');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_classification.html','Services/MetaData');
$class_ids = $this->md_obj->getClassificationIds();
if (!is_array($class_ids) || count($class_ids) == 0)
{
$this->tpl->setCurrentBlock("no_classification");
$this->tpl->setVariable("TXT_NO_CLASSIFICATION", $this->lng->txt("meta_no_classification"));
$this->tpl->setVariable("TXT_ADD_CLASSIFICATION", $this->lng->txt("meta_add"));
$this->ctrl->setParameter($this, "section", "meta_classification");
$this->tpl->setVariable("ACTION_ADD_CLASSIFICATION",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
}
else
{
foreach($class_ids as $class_id)
{
$this->md_section = $this->md_obj->getClassification($class_id);
$this->ctrl->setParameter($this, "section", "meta_classification");
/* TaxonPath */
$tp_ids = $this->md_section->getTaxonPathIds();
foreach ($tp_ids as $tp_id)
{
$tax_path = $this->md_section->getTaxonPath($tp_id);
$tax_ids = $tax_path->getTaxonIds();
foreach($tax_ids as $tax_id)
{
$taxon = $tax_path->getTaxon($tax_id);
if (count($tax_ids) > 1)
{
$this->tpl->setCurrentBlock("taxon_delete");
$this->ctrl->setParameter($this, "meta_index", $tax_id);
$this->ctrl->setParameter($this, "meta_path", "classification_taxon");
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("taxonpath_taxon_loop");
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_NO", $tax_id);
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_TAXONPATH_NO", $tp_id);
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_TXT_TAXON", $this->lng->txt("meta_taxon"));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_VAL_TAXON", ilUtil::prepareFormOutput($taxon->getTaxon()));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_TXT_ID", $this->lng->txt("meta_id"));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_VAL_ID", ilUtil::prepareFormOutput($taxon->getTaxonId()));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_VAL_TAXON_LANGUAGE",
$this->__showLanguageSelect('classification[TaxonPath][Taxon]['.$tax_id.'][Language]',
$taxon->getTaxonLanguageCode()));
$this->ctrl->setParameter($this, "section_element", "Taxon_".$class_id);
$this->ctrl->setParameter($this, "meta_index", $tp_id);
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("TAXONPATH_TAXON_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->parseCurrentBlock();
}
if (count($tp_ids) > 1)
{
$this->tpl->setCurrentBlock("taxonpath_delete");
$this->ctrl->setParameter($this, "meta_index", $tp_id);
$this->ctrl->setParameter($this, "meta_path", "classification_taxon_path");
$this->tpl->setVariable("TAXONPATH_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("TAXONPATH_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("taxonpath_loop");
$this->tpl->setVariable("TAXONPATH_LOOP_NO", $tp_id);
$this->tpl->setVariable("TAXONPATH_LOOP_ROWSPAN", (3 * count($tax_ids)) + 2);
$this->tpl->setVariable("TAXONPATH_LOOP_TXT_TAXONPATH", $this->lng->txt("meta_taxon_path"));
$this->tpl->setVariable("TAXONPATH_LOOP_TXT_SOURCE", $this->lng->txt("meta_source"));
$this->tpl->setVariable("TAXONPATH_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("TAXONPATH_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("TAXONPATH_LOOP_VAL_SOURCE", ilUtil::prepareFormOutput($tax_path->getSource()));
$this->tpl->setVariable("TAXONPATH_LOOP_VAL_SOURCE_LANGUAGE",
$this->__showLanguageSelect('classification[TaxonPath]['.$tp_id.'][Source][Language]',
$tax_path->getSourceLanguageCode()));
$this->ctrl->setParameter($this, "section_element", "TaxonPath_".$class_id);
$this->ctrl->setParameter($this, "meta_index", $class_id);
$this->tpl->setVariable("TAXONPATH_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("TAXONPATH_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->parseCurrentBlock();
}
/* Description */
$this->tpl->setVariable("TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->tpl->setVariable("TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("VAL_DESCRIPTION",
ilUtil::prepareFormOutput($this->md_section->getDescription()));
$this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("VAL_DESCRIPTION_LANGUAGE",
$this->__showLanguageSelect('classification['.$class_id.'][Language]',
$this->md_section->getDescriptionLanguageCode()));
/* Keyword */
$key_ids = $this->md_section->getKeywordIds();
foreach ($key_ids as $key_id)
{
if (count($key_ids) > 1)
{
$this->ctrl->setParameter($this, "meta_index", $key_id);
$this->ctrl->setParameter($this, "meta_path", "classification_keyword");
$this->tpl->setCurrentBlock("keyword_delete");
$this->tpl->setVariable("KEYWORD_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("KEYWORD_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$keyword = $this->md_section->getKeyword($key_id);
$this->tpl->setCurrentBlock("keyword_loop");
$this->tpl->setVariable("KEYWORD_LOOP_NO", $key_id);
$this->tpl->setVariable("KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt("meta_keyword"));
$this->tpl->setVariable("KEYWORD_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("KEYWORD_LOOP_VAL",
ilUtil::prepareFormOutput($keyword->getKeyword()));
$this->tpl->setVariable("KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("KEYWORD_LOOP_VAL_LANGUAGE",
$this->__showLanguageSelect('classification[Keyword]['.$key_id.'][Language]',
$keyword->getKeywordLanguageCode()));
$this->ctrl->setParameter($this, "meta_index", $class_id);
$this->ctrl->setParameter($this, "section_element", "Keyword_".$class_id);
$this->tpl->setVariable("KEYWORD_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("KEYWORD_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("classification_loop");
$this->tpl->setVariable("TXT_CLASSIFICATION", $this->lng->txt("meta_classification"));
$this->ctrl->setParameter($this, "meta_index", $class_id);
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->tpl->setVariable("TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->setVariable("ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->setVariable("TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->setVariable("TXT_NEW_ELEMENT", $this->lng->txt("meta_new_element"));
$this->tpl->setVariable("TXT_TAXONPATH", $this->lng->txt("meta_taxon_path"));
$this->tpl->setVariable("TXT_KEYWORD", $this->lng->txt("meta_keyword"));
$this->tpl->setVariable("TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
$this->tpl->setVariable("CLASS_ID", $class_id);
$this->tpl->setVariable("TXT_PURPOSE", $this->lng->txt("meta_purpose"));
$this->tpl->setVariable("TXT_DESCIPLINE", $this->lng->txt("meta_learning_resource_type"));
$this->tpl->setVariable("TXT_IDEA", $this->lng->txt("meta_idea"));
$this->tpl->setVariable("TXT_PREREQUISITE", $this->lng->txt("meta_prerequisite"));
$this->tpl->setVariable("TXT_EDUCATIONALOBJECTIVE", $this->lng->txt("meta_educational_objective"));
$this->tpl->setVariable("TXT_ACCESSIBILITYRESTRICTIONS", $this->lng->txt("meta_accessibility_restrictions"));
$this->tpl->setVariable("TXT_EDUCATIONALLEVEL", $this->lng->txt("meta_educational_level"));
$this->tpl->setVariable("TXT_SKILLLEVEL", $this->lng->txt("meta_skill_level"));
$this->tpl->setVariable("TXT_SECURITYLEVEL", $this->lng->txt("meta_security_level"));
$this->tpl->setVariable("TXT_COMPETENCY", $this->lng->txt("meta_competency"));
$this->tpl->setVariable("VAL_PURPOSE_" . strtoupper($this->md_section->getPurpose()), " selected");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("classification");
$this->tpl->setVariable("EDIT_ACTION",
$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listEducational | ( | ) |
Definition at line 1013 of file class.ilMDEditorGUI.php.
References $id, __setTabs(), __showLanguageSelect(), ilUtil::prepareFormOutput(), and ilUtil::stripSlashes().
Referenced by listSection().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_educational');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_educational.html','Services/MetaData');
if(!is_object($this->md_section = $this->md_obj->getEducational()))
{
$this->tpl->setCurrentBlock("no_educational");
$this->tpl->setVariable("TXT_NO_EDUCATIONAL", $this->lng->txt("meta_no_educational"));
$this->tpl->setVariable("TXT_ADD_EDUCATIONAL", $this->lng->txt("meta_add"));
$this->ctrl->setParameter($this, "section", "meta_educational");
$this->tpl->setVariable("ACTION_ADD_EDUCATIONAL",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
}
else
{
$this->ctrl->setReturn($this,'listEducational');
$this->ctrl->setParameter($this,'section','meta_educational');
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->ctrl->setParameter($this, "meta_index", $this->md_section->getMetaId());
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->tpl->setVariable("TXT_EDUCATIONAL", $this->lng->txt("meta_educational"));
$this->tpl->setVariable("TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->setVariable("TXT_NEW_ELEMENT", $this->lng->txt("meta_new_element"));
$this->tpl->setVariable("TXT_TYPICALAGERANGE", $this->lng->txt("meta_typical_age_range"));
$this->tpl->setVariable("TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
$this->tpl->setVariable("TXT_INTERACTIVITYTYPE", $this->lng->txt("meta_interactivity_type"));
$this->tpl->setVariable("TXT_LEARNINGRESOURCETYPE", $this->lng->txt("meta_learning_resource_type"));
$this->tpl->setVariable("TXT_INTERACTIVITYLEVEL", $this->lng->txt("meta_interactivity_level"));
$this->tpl->setVariable("TXT_SEMANTICDENSITY", $this->lng->txt("meta_semantic_density"));
$this->tpl->setVariable("TXT_INTENDEDENDUSERROLE", $this->lng->txt("meta_intended_end_user_role"));
$this->tpl->setVariable("TXT_CONTEXT", $this->lng->txt("meta_context"));
$this->tpl->setVariable("TXT_DIFFICULTY", $this->lng->txt("meta_difficulty"));
$this->tpl->setVariable("VAL_INTERACTIVITYTYPE_" . strtoupper($this->md_section->getInteractivityType()), " selected");
$this->tpl->setVariable("VAL_LEARNINGRESOURCETYPE_" . strtoupper($this->md_section->getLearningResourceType()), " selected");
$this->tpl->setVariable("VAL_INTERACTIVITYLEVEL_" . strtoupper($this->md_section->getInteractivityLevel()), " selected");
$this->tpl->setVariable("VAL_SEMANTICDENSITY_" . strtoupper($this->md_section->getSemanticDensity()), " selected");
$this->tpl->setVariable("VAL_INTENDEDENDUSERROLE_" . strtoupper($this->md_section->getIntendedEndUserRole()), " selected");
$this->tpl->setVariable("VAL_CONTEXT_" . strtoupper($this->md_section->getContext()), " selected");
$this->tpl->setVariable("VAL_DIFFICULTY_" . strtoupper($this->md_section->getDifficulty()), " selected");
$this->tpl->setVariable("VAL_TYPICALLEARNINGTIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime()));
$this->tpl->setVariable("TXT_ACTIVE", $this->lng->txt("meta_active"));
$this->tpl->setVariable("TXT_EXPOSITIVE", $this->lng->txt("meta_expositive"));
$this->tpl->setVariable("TXT_MIXED", $this->lng->txt("meta_mixed"));
$this->tpl->setVariable("TXT_EXERCISE", $this->lng->txt("meta_exercise"));
$this->tpl->setVariable("TXT_SIMULATION", $this->lng->txt("meta_simulation"));
$this->tpl->setVariable("TXT_QUESTIONNAIRE", $this->lng->txt("meta_questionnaire"));
$this->tpl->setVariable("TXT_DIAGRAMM", $this->lng->txt("meta_diagramm"));
$this->tpl->setVariable("TXT_FIGURE", $this->lng->txt("meta_figure"));
$this->tpl->setVariable("TXT_GRAPH", $this->lng->txt("meta_graph"));
$this->tpl->setVariable("TXT_INDEX", $this->lng->txt("meta_index"));
$this->tpl->setVariable("TXT_SLIDE", $this->lng->txt("meta_slide"));
$this->tpl->setVariable("TXT_TABLE", $this->lng->txt("meta_table"));
$this->tpl->setVariable("TXT_NARRATIVETEXT", $this->lng->txt("meta_narrative_text"));
$this->tpl->setVariable("TXT_EXAM", $this->lng->txt("meta_exam"));
$this->tpl->setVariable("TXT_EXPERIMENT", $this->lng->txt("meta_experiment"));
$this->tpl->setVariable("TXT_PROBLEMSTATEMENT", $this->lng->txt("meta_problem_statement"));
$this->tpl->setVariable("TXT_SELFASSESSMENT", $this->lng->txt("meta_self_assessment"));
$this->tpl->setVariable("TXT_LECTURE", $this->lng->txt("meta_lecture"));
$this->tpl->setVariable("TXT_VERYLOW", $this->lng->txt("meta_very_low"));
$this->tpl->setVariable("TXT_LOW", $this->lng->txt("meta_low"));
$this->tpl->setVariable("TXT_MEDIUM", $this->lng->txt("meta_medium"));
$this->tpl->setVariable("TXT_HIGH", $this->lng->txt("meta_high"));
$this->tpl->setVariable("TXT_VERYHIGH", $this->lng->txt("meta_very_low"));
$this->tpl->setVariable("TXT_TEACHER", $this->lng->txt("meta_teacher"));
$this->tpl->setVariable("TXT_AUTHOR", $this->lng->txt("meta_author"));
$this->tpl->setVariable("TXT_LEARNER", $this->lng->txt("meta_learner"));
$this->tpl->setVariable("TXT_MANAGER", $this->lng->txt("meta_manager"));
$this->tpl->setVariable("TXT_SCHOOL", $this->lng->txt("meta_school"));
$this->tpl->setVariable("TXT_HIGHEREDUCATION", $this->lng->txt("meta_higher_education"));
$this->tpl->setVariable("TXT_TRAINING", $this->lng->txt("meta_training"));
$this->tpl->setVariable("TXT_OTHER", $this->lng->txt("meta_other"));
$this->tpl->setVariable("TXT_VERYEASY", $this->lng->txt("meta_very_easy"));
$this->tpl->setVariable("TXT_EASY", $this->lng->txt("meta_easy"));
$this->tpl->setVariable("TXT_DIFFICULT", $this->lng->txt("meta_difficult"));
$this->tpl->setVariable("TXT_VERYDIFFICULT", $this->lng->txt("meta_very_difficult"));
$this->tpl->setVariable("TXT_TYPICALLEARNINGTIME", $this->lng->txt("meta_typical_learning_time"));
/* TypicalAgeRange */
foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
{
$md_age = $this->md_section->getTypicalAgeRange($id);
$this->ctrl->setParameter($this, 'meta_index', $id);
$this->ctrl->setParameter($this, 'meta_path', 'educational_typical_age_range');
$this->tpl->setCurrentBlock("typicalagerange_delete");
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("typicalagerange_loop");
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_TXT_TYPICALAGERANGE", $this->lng->txt("meta_typical_age_range"));
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_VAL", ilUtil::prepareFormOutput($md_age->getTypicalAgeRange()));
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_NO", $id);
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_VAL_LANGUAGE",
$this->__showLanguageSelect('educational[TypicalAgeRange]['.$id.'][Language]',
$md_age->getTypicalAgeRangeLanguageCode()));
$this->ctrl->setParameter($this, "section_element", "educational_typical_age_range");
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("TYPICALAGERANGE_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->parseCurrentBlock();
}
/* Description */
foreach($ids = $this->md_section->getDescriptionIds() as $id)
{
$md_des = $this->md_section->getDescription($id);
$this->ctrl->setParameter($this, 'meta_index', $id);
$this->ctrl->setParameter($this, 'meta_path', 'educational_description');
$this->tpl->setCurrentBlock("description_loop");
$this->tpl->setVariable("DESCRIPTION_LOOP_NO", $id);
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL", ilUtil::stripSlashes($md_des->getDescription()));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL_LANGUAGE",
$this->__showLanguageSelect('educational[Description]['.$id.'][Language]',
$md_des->getDescriptionLanguageCode()));
$this->tpl->setVariable("DESCRIPTION_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->ctrl->setParameter($this, "section_element", "educational_description");
$this->tpl->setVariable("DESCRIPTION_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->parseCurrentBlock();
}
/* Language */
foreach($ids = $this->md_section->getLanguageIds() as $id)
{
$md_lang = $this->md_section->getLanguage($id);
$this->ctrl->setParameter($this, 'meta_index', $id);
$this->ctrl->setParameter($this, 'meta_path', 'educational_language');
$this->tpl->setCurrentBlock("language_loop");
$this->tpl->setVariable("LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("LANGUAGE_LOOP_VAL_LANGUAGE",
$this->__showLanguageSelect('educational[Language]['.$id.']',
$md_lang->getLanguageCode()));
$this->tpl->setVariable("LANGUAGE_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->ctrl->setParameter($this, "section_element", "educational_language");
$this->tpl->setVariable("LANGUAGE_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("LANGUAGE_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->setCurrentBlock("educational");
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listGeneral | ( | ) |
Definition at line 104 of file class.ilMDEditorGUI.php.
References $id, __fillSubelements(), __setTabs(), __showLanguageSelect(), ilUtil::prepareFormOutput(), and ilUtil::stripSlashes().
Referenced by listSection().
{
if(!is_object($this->md_section = $this->md_obj->getGeneral()))
{
$this->md_section = $this->md_obj->addGeneral();
$this->md_section->save();
}
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_general');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_general.html','Services/MetaData');
$this->ctrl->setReturn($this,'listGeneral');
$this->ctrl->setParameter($this,'section','meta_general');
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->__fillSubelements();
$this->tpl->setVariable("TXT_GENERAL", $this->lng->txt("meta_general"));
$this->tpl->setVariable("TXT_IDENTIFIER", $this->lng->txt("meta_identifier"));
$this->tpl->setVariable("TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("TXT_KEYWORD", $this->lng->txt("meta_keyword"));
$this->tpl->setVariable("TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->tpl->setVariable("TXT_STRUCTURE", $this->lng->txt("meta_structure"));
$this->tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
$this->tpl->setVariable("TXT_ATOMIC", $this->lng->txt("meta_atomic"));
$this->tpl->setVariable("TXT_COLLECTION", $this->lng->txt("meta_collection"));
$this->tpl->setVariable("TXT_NETWORKED", $this->lng->txt("meta_networked"));
$this->tpl->setVariable("TXT_HIERARCHICAL", $this->lng->txt("meta_hierarchical"));
$this->tpl->setVariable("TXT_LINEAR", $this->lng->txt("meta_linear"));
// Structure
$this->tpl->setVariable("STRUCTURE_VAL_".strtoupper($this->md_section->getStructure())," selected=selected");
// Identifier
foreach($ids = $this->md_section->getIdentifierIds() as $id)
{
$md_ide = $this->md_section->getIdentifier($id);
if(count($ids) > 1)
{
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_identifier');
$this->tpl->setCurrentBlock("identifier_delete");
$this->tpl->setVariable("IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("identifier_loop");
$this->tpl->setVariable("IDENTIFIER_LOOP_NO", $id);
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt("meta_identifier"));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt("meta_catalog"));
$this->tpl->setVariable("IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
ilUtil::prepareFormOutput($md_ide->getCatalog()));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt("meta_entry"));
$this->tpl->setVariable("IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
ilUtil::prepareFormOutput($md_ide->getEntry()));
$this->tpl->parseCurrentBlock();
}
// Language
foreach($ids = $this->md_section->getLanguageIds() as $id)
{
$md_lan = $this->md_section->getLanguage($id);
if (count($ids) > 1)
{
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_language');
$this->tpl->setCurrentBlock("language_delete");
$this->tpl->setVariable("LANGUAGE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("language_loop");
$this->tpl->setVariable("LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("LANGUAGE_LOOP_VAL_LANGUAGE", $this->__showLanguageSelect('gen_language['.$id.'][language]',
$md_lan->getLanguageCode()));
$this->tpl->parseCurrentBlock();
}
// TITLE
$this->tpl->setVariable("TXT_TITLE",$this->lng->txt('title'));
$this->tpl->setVariable("VAL_TITLE",ilUtil::prepareFormOutput($this->md_section->getTitle()));
$this->tpl->setVariable("VAL_TITLE_LANGUAGE",$this->__showLanguageSelect('gen_title_language',
$this->md_section->getTitleLanguageCode()));
// DESCRIPTION
foreach($ids = $this->md_section->getDescriptionIds() as $id)
{
$md_des = $this->md_section->getDescription($id);
if (count($ids) > 1)
{
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_description');
$this->tpl->setCurrentBlock("description_delete");
$this->tpl->setVariable("DESCRIPTION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("description_loop");
$this->tpl->setVariable("DESCRIPTION_LOOP_NO",$id);
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL", ilUtil::stripSlashes($md_des->getDescription()));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL_LANGUAGE", $this->__showLanguageSelect("gen_description[".$id.'][language]',
$md_des->getDescriptionLanguageCode()));
$this->tpl->parseCurrentBlock();
}
// KEYWORD
foreach($ids = $this->md_section->getKeywordIds() as $id)
{
$md_key = $this->md_section->getKeyword($id);
if(count($ids) > 1)
{
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_keyword');
$this->tpl->setCurrentBlock("keyword_delete");
$this->tpl->setVariable("KEYWORD_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("KEYWORD_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("keyword_loop");
$this->tpl->setVariable("KEYWORD_LOOP_NO",$id);
$this->tpl->setVariable("KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt("meta_keyword"));
$this->tpl->setVariable("KEYWORD_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("KEYWORD_LOOP_VAL", ilUtil::prepareFormOutput($md_key->getKeyword()));
$this->tpl->setVariable("KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("KEYWORD_LOOP_VAL_LANGUAGE", $this->__showLanguageSelect("gen_keyword[".$id.'][language]',
$md_key->getKeywordLanguageCode()));
$this->tpl->parseCurrentBlock();
}
// Coverage
$this->tpl->setVariable("COVERAGE_LOOP_TXT_COVERAGE",$this->lng->txt('meta_coverage'));
$this->tpl->setVariable("COVERAGE_LOOP_VAL",ilUtil::prepareFormOutput($this->md_section->getCoverage()));
$this->tpl->setVariable("COVERAGE_LOOP_TXT_LANGUAGE",$this->lng->txt('meta_language'));
$this->tpl->setVariable("COVERAGE_LOOP_VAL_LANGUAGE",$this->__showLanguageSelect('gen_coverage_language',
$this->md_section->getCoverageLanguageCode()));
$this->tpl->setVariable("TXT_SAVE",$this->lng->txt('save'));
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listLifecycle | ( | ) |
Definition at line 600 of file class.ilMDEditorGUI.php.
References __fillSubelements(), __setTabs(), __showLanguageSelect(), ilMDUtilSelect::_getRoleSelect(), ilMDUtilSelect::_getStatusSelect(), and ilUtil::prepareFormOutput().
Referenced by listSection().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_lifecycle');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_lifecycle.html','Services/MetaData');
$this->ctrl->setParameter($this, "section", "meta_lifecycle");
if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
{
$this->tpl->setCurrentBlock("no_lifecycle");
$this->tpl->setVariable("TXT_NO_LIFECYCLE", $this->lng->txt("meta_no_lifecycle"));
$this->tpl->setVariable("TXT_ADD_LIFECYCLE", $this->lng->txt("meta_add"));
$this->tpl->setVariable("ACTION_ADD_LIFECYCLE",$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
return true;
}
$this->ctrl->setReturn($this,'listLifecycle');
$this->ctrl->setParameter($this, "meta_index", $this->md_section->getMetaId());
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_LIFECYCLE",$this->lng->txt('meta_lifecycle'));
// Delete link
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->tpl->setVariable("TXT_DELETE",$this->lng->txt('delete'));
// New element
$this->__fillSubelements();
// Status
$this->tpl->setVariable("TXT_STATUS",$this->lng->txt('meta_status'));
$this->tpl->setVariable("SEL_STATUS",ilMDUtilSelect::_getStatusSelect($this->md_section->getStatus(),
"lif_status",
array(0 => $this->lng->txt('meta_please_select'))));
// Version
$this->tpl->setVariable("TXT_VERSION",$this->lng->txt('meta_version'));
$this->tpl->setVariable("VAL_VERSION",ilUtil::prepareFormOutput($this->md_section->getVersion()));
$this->tpl->setVariable("TXT_LANGUAGE",$this->lng->txt('meta_language'));
$this->tpl->setVariable("VAL_VERSION_LANGUAGE",$this->__showLanguageSelect('lif_language',
$this->md_section->getVersionLanguageCode()));
// Contributes
foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
{
$md_con = $this->md_section->getContribute($con_id);
if(count($ids) > 1)
{
$this->ctrl->setParameter($this,'meta_index',$con_id);
$this->ctrl->setParameter($this,'meta_path','meta_contribute');
$this->tpl->setCurrentBlock("contribute_delete");
$this->tpl->setVariable("CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->parseCurrentBlock();
}
// Entities
foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
{
$md_ent = $md_con->getEntity($ent_id);
$this->ctrl->setParameter($this,'meta_path','meta_entity');
if(count($ent_ids) > 1)
{
$this->tpl->setCurrentBlock("contribute_entity_delete");
$this->ctrl->setParameter($this,'meta_index',$ent_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("contribute_entity_loop");
$this->ctrl->setParameter($this,'section_element','meta_entity');
$this->ctrl->setParameter($this,'meta_index',$con_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,'addSectionElement'));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_TXT_ADD",$this->lng->txt('add'));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_VAL_ENTITY",ilUtil::prepareFormOutput($md_ent->getEntity()));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt('meta_entity'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("contribute_loop");
$this->tpl->setVariable("CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt('meta_contribute'));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt('meta_role'));
$this->tpl->setVariable("SEL_CONTRIBUTE_ROLE",ilMDUtilSelect::_getRoleSelect($md_con->getRole(),
"met_contribute[".$con_id."][Role]",
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt('meta_date'));
$this->tpl->setVariable("CONTRIBUTE_LOOP_NO",$con_id);
$this->tpl->setVariable("CONTRIBUTE_LOOP_VAL_DATE",ilUtil::prepareFormOutput($md_con->getDate()));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TXT_SAVE",$this->lng->txt('save'));
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listMetaMetaData | ( | ) |
Definition at line 759 of file class.ilMDEditorGUI.php.
References $id, __fillSubelements(), __setTabs(), __showLanguageSelect(), ilMDUtilSelect::_getRoleSelect(), and ilUtil::prepareFormOutput().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_meta_metadata');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_meta_metadata.html','Services/MetaData');
$this->ctrl->setParameter($this, "section", "meta_meta_metadata");
if(!is_object($this->md_section = $this->md_obj->getMetaMetadata()))
{
$this->tpl->setCurrentBlock("no_meta_meta");
$this->tpl->setVariable("TXT_NO_META_META", $this->lng->txt("meta_no_meta_metadata"));
$this->tpl->setVariable("TXT_ADD_META_META", $this->lng->txt("meta_add"));
$this->tpl->setVariable("ACTION_ADD_META_META",$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
return true;
}
$this->ctrl->setReturn($this,'listMetaMetaData');
$this->ctrl->setParameter($this, "meta_index", $this->md_section->getMetaId());
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_META_METADATA",$this->lng->txt('meta_meta_metadata'));
// Delete link
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->tpl->setVariable("TXT_DELETE",$this->lng->txt('delete'));
// New element
$this->__fillSubelements();
$this->tpl->setVariable("TXT_LANGUAGE",$this->lng->txt('meta_language'));
$this->tpl->setVariable("VAL_LANGUAGE",$this->__showLanguageSelect('met_language',$this->md_section->getLanguageCode()));
$this->tpl->setVariable("TXT_METADATASCHEME",$this->lng->txt('meta_metadatascheme'));
$this->tpl->setVariable("VAL_METADATASCHEME",$this->md_section->getMetaDataScheme());
// Identifier
foreach($ids = $this->md_section->getIdentifierIds() as $id)
{
$md_ide = $this->md_section->getIdentifier($id);
if(count($ids) > 1)
{
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_identifier');
$this->tpl->setCurrentBlock("identifier_delete");
$this->tpl->setVariable("IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("identifier_loop");
$this->tpl->setVariable("IDENTIFIER_LOOP_NO", $id);
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt("meta_identifier"));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt("meta_catalog"));
$this->tpl->setVariable("IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
ilUtil::prepareFormOutput($md_ide->getCatalog()));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt("meta_entry"));
$this->tpl->setVariable("IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
ilUtil::prepareFormOutput($md_ide->getEntry()));
$this->tpl->parseCurrentBlock();
}
// Contributes
foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
{
$md_con = $this->md_section->getContribute($con_id);
if(count($ids) > 1)
{
$this->ctrl->setParameter($this,'meta_index',$con_id);
$this->ctrl->setParameter($this,'meta_path','meta_contribute');
$this->tpl->setCurrentBlock("contribute_delete");
$this->tpl->setVariable("CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->parseCurrentBlock();
}
// Entities
foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
{
$md_ent = $md_con->getEntity($ent_id);
$this->ctrl->setParameter($this,'meta_path','meta_entity');
if(count($ent_ids) > 1)
{
$this->tpl->setCurrentBlock("contribute_entity_delete");
$this->ctrl->setParameter($this,'meta_index',$ent_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("contribute_entity_loop");
$this->ctrl->setParameter($this,'section_element','meta_entity');
$this->ctrl->setParameter($this,'meta_index',$con_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,'addSectionElement'));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_TXT_ADD",$this->lng->txt('add'));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_VAL_ENTITY",ilUtil::prepareFormOutput($md_ent->getEntity()));
$this->tpl->setVariable("CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt('meta_entity'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("contribute_loop");
$this->tpl->setVariable("CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt('meta_contribute'));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt('meta_role'));
$this->tpl->setVariable("SEL_CONTRIBUTE_ROLE",ilMDUtilSelect::_getRoleSelect($md_con->getRole(),
"met_contribute[".$con_id."][Role]",
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt('meta_date'));
$this->tpl->setVariable("CONTRIBUTE_LOOP_NO",$con_id);
$this->tpl->setVariable("CONTRIBUTE_LOOP_VAL_DATE",ilUtil::prepareFormOutput($md_con->getDate()));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TXT_SAVE",$this->lng->txt('save'));
}
Here is the call graph for this function:| ilMDEditorGUI::listRelation | ( | ) |
Definition at line 1245 of file class.ilMDEditorGUI.php.
References __setTabs(), __showLanguageSelect(), and ilUtil::prepareFormOutput().
Referenced by listSection().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_relation');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_relation.html','Services/MetaData');
$rel_ids = $this->md_obj->getRelationIds();
if (!is_array($rel_ids) || count($rel_ids) == 0)
{
$this->tpl->setCurrentBlock("no_relation");
$this->tpl->setVariable("TXT_NO_RELATION", $this->lng->txt("meta_no_relation"));
$this->tpl->setVariable("TXT_ADD_RELATION", $this->lng->txt("meta_add"));
$this->ctrl->setParameter($this, "section", "meta_relation");
$this->tpl->setVariable("ACTION_ADD_RELATION",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
}
else
{
foreach($rel_ids as $rel_id)
{
$this->md_section = $this->md_obj->getRelation($rel_id);
$this->ctrl->setParameter($this, 'meta_index', $rel_id);
$this->ctrl->setParameter($this, "section", "meta_relation");
/* Identifier_ */
$res_ids = $this->md_section->getIdentifier_Ids();
foreach ($res_ids as $res_id)
{
$ident = $this->md_section->getIdentifier_($res_id);
$this->ctrl->setParameter($this, "meta_index", $res_id);
if (count($res_ids) > 1)
{
$this->tpl->setCurrentBlock("identifier_delete");
$this->ctrl->setParameter($this, "meta_path", "relation_resource_identifier");
$this->tpl->setVariable("IDENTIFIER_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("identifier_loop");
$this->tpl->setVariable("IDENTIFIER_LOOP_NO", $res_id);
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt("meta_identifier"));
$this->ctrl->setParameter($this, 'meta_index', $rel_id);
$this->ctrl->setParameter($this, "section_element", "relation_resource_identifier");
$this->tpl->setVariable("IDENTIFIER_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt("meta_entry"));
$this->tpl->setVariable("IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt("meta_catalog"));
$this->tpl->setVariable("IDENTIFIER_LOOP_VAL_CATALOG",
ilUtil::prepareFormOutput($ident->getCatalog()));
$this->tpl->setVariable("IDENTIFIER_LOOP_VAL_ENTRY",
ilUtil::prepareFormOutput($ident->getEntry()));
$this->tpl->parseCurrentBlock();
}
/* Description */
$res_dess = $this->md_section->getDescriptionIds();
foreach ($res_dess as $res_des)
{
$des = $this->md_section->getDescription($res_des);
$this->ctrl->setParameter($this, "meta_index", $res_des);
if (count($res_dess) > 1)
{
$this->tpl->setCurrentBlock("description_delete");
$this->ctrl->setParameter($this, "meta_path", "relation_resource_description");
$this->tpl->setVariable("DESCRIPTION_LOOP_ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteElement"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("description_loop");
$this->tpl->setVariable("DESCRIPTION_LOOP_NO", $res_des);
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->ctrl->setParameter($this, 'meta_index', $rel_id);
$this->ctrl->setParameter($this, "section_element", "relation_resource_description");
$this->tpl->setVariable("DESCRIPTION_LOOP_ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSectionElement"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL",
ilUtil::prepareFormOutput($des->getDescription()));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL_LANGUAGE",
$this->__showLanguageSelect('relation[Resource][Description]['.$res_des.'][Language]',
$des->getDescriptionLanguageCode()));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("relation_loop");
$this->tpl->setVariable("REL_ID", $rel_id);
$this->tpl->setVariable("TXT_RELATION", $this->lng->txt("meta_relation"));
$this->ctrl->setParameter($this, "meta_index", $this->md_section->getMetaId());
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->ctrl->setParameter($this, "section", "meta_relation");
$this->tpl->setVariable("ACTION_ADD",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->setVariable("TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->setVariable("TXT_ADD", $this->lng->txt("meta_add"));
$this->tpl->setVariable("TXT_NEW_ELEMENT", $this->lng->txt("meta_new_element"));
$this->tpl->setVariable("TXT_KIND", $this->lng->txt("meta_kind"));
$this->tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
$this->tpl->setVariable("TXT_ISPARTOF", $this->lng->txt("meta_is_part_of"));
$this->tpl->setVariable("TXT_HASPART", $this->lng->txt("meta_has_part"));
$this->tpl->setVariable("TXT_ISVERSIONOF", $this->lng->txt("meta_is_version_of"));
$this->tpl->setVariable("TXT_HASVERSION", $this->lng->txt("meta_has_version"));
$this->tpl->setVariable("TXT_ISFORMATOF", $this->lng->txt("meta_is_format_of"));
$this->tpl->setVariable("TXT_HASFORMAT", $this->lng->txt("meta_has_format"));
$this->tpl->setVariable("TXT_REFERENCES", $this->lng->txt("meta_references"));
$this->tpl->setVariable("TXT_ISREFERENCEDBY", $this->lng->txt("meta_is_referenced_by"));
$this->tpl->setVariable("TXT_ISBASEDON", $this->lng->txt("meta_is_based_on"));
$this->tpl->setVariable("TXT_ISBASISFOR", $this->lng->txt("meta_is_basis_for"));
$this->tpl->setVariable("TXT_REQUIRES", $this->lng->txt("meta_requires"));
$this->tpl->setVariable("TXT_ISREQUIREDBY", $this->lng->txt("meta_is_required_by"));
$this->tpl->setVariable("TXT_RESOURCE", $this->lng->txt("meta_resource"));
$this->tpl->setVariable("VAL_KIND_" . strtoupper($this->md_section->getKind()), " selected");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("relation");
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listRights | ( | ) |
Definition at line 938 of file class.ilMDEditorGUI.php.
References __setTabs(), __showLanguageSelect(), and ilUtil::prepareFormOutput().
Referenced by listSection().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_rights');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_rights.html','Services/MetaData');
if(!is_object($this->md_section = $this->md_obj->getRights()))
{
$this->tpl->setCurrentBlock("no_rights");
$this->tpl->setVariable("TXT_NO_RIGHTS", $this->lng->txt("meta_no_rights"));
$this->tpl->setVariable("TXT_ADD_RIGHTS", $this->lng->txt("meta_add"));
$this->ctrl->setParameter($this, "section", "meta_rights");
$this->tpl->setVariable("ACTION_ADD_RIGHTS",
$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
}
else
{
$this->ctrl->setReturn($this,'listRights');
$this->ctrl->setParameter($this,'section','meta_rights');
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_RIGHTS", $this->lng->txt("meta_rights"));
$this->tpl->setVariable("TXT_COST", $this->lng->txt("meta_cost"));
$this->tpl->setVariable("TXT_COPYRIGHTANDOTHERRESTRICTIONS", $this->lng->txt("meta_copyright_and_other_restrictions"));
$this->tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
$this->tpl->setVariable("TXT_YES", $this->lng->txt("meta_yes"));
$this->tpl->setVariable("TXT_NO", $this->lng->txt("meta_no"));
$this->ctrl->setParameter($this, "section", "meta_rights");
$this->ctrl->setParameter($this, "meta_index", $this->md_section->getMetaId());
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->tpl->setVariable("TXT_DELETE", $this->lng->txt("meta_delete"));
$this->tpl->setVariable("VAL_COST_".strtoupper($this->md_section->getCosts()), " selected");
$this->tpl->setVariable("VAL_COPYRIGHTANDOTHERRESTRICTIONS_".
strtoupper($this->md_section->getCopyrightAndOtherRestrictions()), " selected");
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt("meta_description"));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt("meta_value"));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL", ilUtil::prepareFormOutput($this->md_section->getDescription()));
$this->tpl->setVariable("DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt("meta_language"));
$this->tpl->setVariable("DESCRIPTION_LOOP_VAL_LANGUAGE",
$this->__showLanguageSelect('rights[DescriptionLanguage]',
$this->md_section->getDescriptionLanguageCode()));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->setCurrentBlock("rights");
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listSection | ( | ) |
Definition at line 1956 of file class.ilMDEditorGUI.php.
References $_REQUEST, debug(), listAnnotation(), listClassification(), listEducational(), listGeneral(), listLifecycle(), listRelation(), listRights(), and listTechnical().
Referenced by addSection(), addSectionElement(), deleteElement(), deleteSection(), updateAnnotation(), updateClassification(), updateEducational(), updateLifecycle(), updateMetaMetaData(), updateRelation(), updateRights(), and updateTechnical().
{
switch($_REQUEST['section'])
{
case 'meta_general':
return $this->listGeneral();
case 'meta_lifecycle':
return $this->listLifecycle();
case 'meta_technical':
return $this->listTechnical();
case 'meta_meta_metadata':
return $this->listMetaMetadata();
case 'debug':
return $this->debug();
case 'meta_rights':
return $this->listRights();
case 'meta_educational':
return $this->listEducational();
case 'meta_relation':
return $this->listRelation();
case 'meta_annotation':
return $this->listAnnotation();
case 'meta_classification':
return $this->listClassification();
default:
return $this->listGeneral();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::listTechnical | ( | ) |
Definition at line 390 of file class.ilMDEditorGUI.php.
References $id, __fillSubelements(), __setTabs(), __showLanguageSelect(), ilMDUtilSelect::_getBrowserSelect(), ilMDUtilSelect::_getLocationTypeSelect(), ilMDUtilSelect::_getOperatingSystemSelect(), and ilUtil::prepareFormOutput().
Referenced by listSection().
{
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.md_editor.html','Services/MetaData');
$this->__setTabs('meta_technical');
$this->tpl->addBlockFile('MD_CONTENT','md_content','tpl.md_technical.html','Services/MetaData');
$this->ctrl->setParameter($this, "section", "meta_technical");
if(!is_object($this->md_section = $this->md_obj->getTechnical()))
{
$this->tpl->setCurrentBlock("no_technical");
$this->tpl->setVariable("TXT_NO_TECHNICAL", $this->lng->txt("meta_no_technical"));
$this->tpl->setVariable("TXT_ADD_TECHNICAL", $this->lng->txt("meta_add"));
$this->tpl->setVariable("ACTION_ADD_TECHNICAL",$this->ctrl->getLinkTarget($this, "addSection"));
$this->tpl->parseCurrentBlock();
return true;
}
$this->ctrl->setReturn($this,'listTechnical');
$this->ctrl->setParameter($this, "meta_index", $this->md_section->getMetaId());
$this->tpl->setVariable("EDIT_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_TECHNICAL",$this->lng->txt('meta_technical'));
// Delete link
$this->tpl->setVariable("ACTION_DELETE",
$this->ctrl->getLinkTarget($this, "deleteSection"));
$this->tpl->setVariable("TXT_DELETE",$this->lng->txt('delete'));
// New element
$this->__fillSubelements();
// Format
foreach($ids = $this->md_section->getFormatIds() as $id)
{
$md_for =& $this->md_section->getFormat($id);
$this->tpl->setCurrentBlock("format_loop");
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_format');
$this->tpl->setVariable("FORMAT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("FORMAT_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->setVariable("FORMAT_LOOP_NO",$id);
$this->tpl->setVariable("FORMAT_LOOP_TXT_FORMAT",$this->lng->txt('meta_format'));
$this->tpl->setVariable("FORMAT_LOOP_VAL",ilUtil::prepareFormOutput($md_for->getFormat()));
$this->tpl->parseCurrentBlock();
}
// Size
$this->tpl->setVariable("SIZE_TXT_SIZE",$this->lng->txt('meta_size'));
$this->tpl->setVariable("SIZE_VAL",ilUtil::prepareFormOutput($this->md_section->getSize()));
// Location
foreach($ids = $this->md_section->getLocationIds() as $id)
{
$md_loc =& $this->md_section->getLocation($id);
$this->tpl->setCurrentBlock("location_loop");
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_location');
$this->tpl->setVariable("LOCATION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("LOCATION_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->setVariable("LOCATION_LOOP_TXT_LOCATION",$this->lng->txt('meta_location'));
$this->tpl->setVariable("LOCATION_LOOP_NO",$id);
$this->tpl->setVariable("LOCATION_LOOP_TXT_TYPE",$this->lng->txt('meta_type'));
$this->tpl->setVariable("LOCATION_LOOP_VAL",ilUtil::prepareFormOutput($md_loc->getLocation()));
$this->tpl->setVariable("SEL_LOCATION_TYPE",
ilMDUtilSelect::_getLocationTypeSelect($md_loc->getLocationType(),
"met_location[".$id."][Type]",
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->parseCurrentBlock();
}
// Requirement
foreach($ids = $this->md_section->getRequirementIds() as $id)
{
$md_re =& $this->md_section->getRequirement($id);
$this->tpl->setCurrentBlock("requirement_loop");
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_requirement');
$this->tpl->setVariable("REQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt('meta_requirement'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt('meta_type'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt('meta_operating_system'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt('meta_browser'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_NAME",$this->lng->txt('meta_name'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt('meta_minimum_version'));
$this->tpl->setVariable("REQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt('meta_maximum_version'));
$this->tpl->setVariable("REQUIREMENT_LOOP_NO",$id);
$this->tpl->setVariable("REQUIREMENT_SEL_OS_NAME",
ilMDUtilSelect::_getOperatingSystemSelect($md_re->getOperatingSystemName(),
"met_re[".$id."][os][name]",
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("REQUIREMENT_SEL_BROWSER_NAME",
ilMDUtilSelect::_getBrowserSelect($md_re->getBrowserName(),
"met_re[".$id."][browser][name]",
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getOperatingSystemMinimumVersion()));
$this->tpl->setVariable("REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getOperatingSystemMaximumVersion()));
$this->tpl->setVariable("REQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getBrowserMinimumVersion()));
$this->tpl->setVariable("REQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getBrowserMaximumVersion()));
$this->tpl->parseCurrentBlock();
}
// OrComposite
foreach($ids = $this->md_section->getOrCompositeIds() as $or_id)
{
$md_or =& $this->md_section->getOrComposite($or_id);
foreach($ids = $md_or->getRequirementIds() as $id)
{
$md_re =& $this->md_section->getRequirement($id);
$this->tpl->setCurrentBlock("orrequirement_loop");
$this->ctrl->setParameter($this,'meta_index',$id);
$this->ctrl->setParameter($this,'meta_path','meta_requirement');
$this->tpl->setVariable("ORREQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt('meta_requirement'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt('meta_type'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt('meta_operating_system'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt('meta_browser'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_NAME",$this->lng->txt('meta_name'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt('meta_minimum_version'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt('meta_maximum_version'));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_NO",$id);
$this->tpl->setVariable("ORREQUIREMENT_SEL_OS_NAME",
ilMDUtilSelect::_getOperatingSystemSelect($md_re->getOperatingSystemName(),
"met_re[".$id."][os][name]",
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("ORREQUIREMENT_SEL_BROWSER_NAME",
ilMDUtilSelect::_getBrowserSelect($md_re->getBrowserName(),
"met_re[".$id."][browser][name]",
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getOperatingSystemMinimumVersion()));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getOperatingSystemMaximumVersion()));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getBrowserMinimumVersion()));
$this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
ilUtil::prepareFormOutput($md_re->getBrowserMaximumVersion()));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("orcomposite_loop");
$this->ctrl->setParameter($this,'meta_index',$or_id);
$this->ctrl->setParameter($this,'meta_path','meta_or_composite');
$this->ctrl->setParameter($this,'meta_technical',$this->md_section->getMetaId());
$this->tpl->setVariable("ORCOMPOSITE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,'deleteElement'));
$this->tpl->setVariable("ORCOMPOSITE_LOOP_TXT_DELETE",$this->lng->txt('delete'));
$this->tpl->setVariable("ORCOMPOSITE_LOOP_TXT_ORCOMPOSITE",$this->lng->txt('meta_or_composite'));
$this->tpl->parseCurrentBlock();
}
// InstallationRemarks
$this->tpl->setVariable("INSTALLATIONREMARKS_TXT_INSTALLATIONREMARKS",$this->lng->txt('meta_installation_remarks'));
$this->tpl->setVariable("INSTALLATIONREMARKS_TXT_LANGUAGE",$this->lng->txt('meta_language'));
$this->tpl->setVariable("INSTALLATIONREMARKS_VAL",ilUtil::prepareFormOutput($this->md_section->getInstallationRemarks()));
$this->tpl->setVariable("INSTALLATIONREMARKS_VAL_LANGUAGE",
$this->__showLanguageSelect('inst_language',
$this->md_section->getInstallationRemarksLanguageCode()));
// Other platform requirement
$this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_TXT_OTHERPLATTFORMREQUIREMENTS",
$this->lng->txt('meta_other_plattform_requirements'));
$this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_TXT_LANGUAGE",$this->lng->txt('meta_language'));
$this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_VAL",
ilUtil::prepareFormOutput($this->md_section->getOtherPlatformRequirements()));
$this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_VAL_LANGUAGE",
$this->__showLanguageSelect('opr_language',
$this->md_section->getOtherPlatformRequirementsLanguageCode()));
// Duration
$this->tpl->setVariable("DURATION_TXT_DURATION",$this->lng->txt('meta_duration'));
$this->tpl->setVariable("DURATION_VAL",ilUtil::prepareFormOutput($this->md_section->getDuration()));
$this->tpl->setCurrentBlock("technical");
$this->tpl->setVariable("TXT_SAVE",$this->lng->txt('save'));
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDEditorGUI::updateAnnotation | ( | ) |
Definition at line 1482 of file class.ilMDEditorGUI.php.
References $_POST, $id, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// relation
foreach($ids = $this->md_obj->getAnnotationIds() as $id)
{
// entity
$annotation = $this->md_obj->getAnnotation($id);
$annotation->setEntity(ilUtil::stripSlashes($_POST['annotation'][$id]['Entity']));
$annotation->setDate(ilUtil::stripSlashes($_POST['annotation'][$id]['Date']));
$annotation->setDescription(ilUtil::stripSlashes($_POST['annotation'][$id]['Description']));
$annotation->setDescriptionLanguage(
new ilMDLanguageItem($_POST['annotation'][$id]['Language']));
$annotation->update();
}
$this->listSection();
}
Here is the call graph for this function:| ilMDEditorGUI::updateClassification | ( | ) |
Definition at line 1687 of file class.ilMDEditorGUI.php.
References $_POST, $id, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// relation
foreach($ids = $this->md_obj->getClassificationIds() as $id)
{
// entity
$classification = $this->md_obj->getClassification($id);
$classification->setPurpose($_POST['classification'][$id]['Purpose']);
$classification->setDescription(ilUtil::stripSlashes($_POST['classification'][$id]['Description']));
$classification->setDescriptionLanguage(
new ilMDLanguageItem($_POST['classification'][$id]['Language']));
$classification->update();
$key_ids = $classification->getKeywordIds();
foreach ($key_ids as $key_id)
{
$keyword = $classification->getKeyword($key_id);
$keyword->setKeyword(ilUtil::stripSlashes($_POST['classification']['Keyword'][$key_id]['Value']));
$keyword->setKeywordLanguage(
new ilMDLanguageItem($_POST['classification']['Keyword'][$key_id]['Language']));
$keyword->update();
}
$tp_ids = $classification->getTaxonPathIds();
foreach ($tp_ids as $tp_id)
{
$tax_path = $classification->getTaxonPath($tp_id);
$tax_path->setSource(ilUtil::stripSlashes($_POST['classification']['TaxonPath'][$tp_id]['Source']['Value']));
$tax_path->setSourceLanguage(
new ilMDLanguageItem($_POST['classification']['TaxonPath'][$tp_id]['Source']['Language']));
$tax_path->update();
$tax_ids = $tax_path->getTaxonIds();
foreach($tax_ids as $tax_id)
{
$taxon = $tax_path->getTaxon($tax_id);
$taxon->setTaxon(ilUtil::stripSlashes($_POST['classification']['TaxonPath']['Taxon'][$tax_id]['Value']));
$taxon->setTaxonLanguage(
new ilMDLanguageItem($_POST['classification']['TaxonPath']['Taxon'][$tax_id]['Language']));
$taxon->setTaxonId(ilUtil::stripSlashes($_POST['classification']['TaxonPath']['Taxon'][$tax_id]['Id']));
$taxon->update();
}
}
}
$this->listSection();
}
Here is the call graph for this function:| ilMDEditorGUI::updateEducational | ( | ) |
Definition at line 1193 of file class.ilMDEditorGUI.php.
References $_POST, $id, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// update rights section
$this->md_section = $this->md_obj->getEducational();
$this->md_section->setInteractivityType($_POST['educational']['InteractivityType']);
$this->md_section->setLearningResourceType($_POST['educational']['LearningResourceType']);
$this->md_section->setInteractivityLevel($_POST['educational']['InteractivityLevel']);
$this->md_section->setSemanticDensity($_POST['educational']['SemanticDensity']);
$this->md_section->setIntendedEndUserRole($_POST['educational']['IntendedEndUserRole']);
$this->md_section->setContext($_POST['educational']['Context']);
$this->md_section->setDifficulty($_POST['educational']['Difficulty']);
$this->md_section->setTypicalLearningTime(ilUtil::stripSlashes($_POST['educational']['TypicalLearningTime']));
/* TypicalAgeRange */
foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
{
$md_age = $this->md_section->getTypicalAgeRange($id);
$md_age->setTypicalAgeRange(ilUtil::stripSlashes($_POST['educational']['TypicalAgeRange'][$id]['Value']));
$md_age->setTypicalAgeRangeLanguage(
new ilMDLanguageItem($_POST['educational']['TypicalAgeRange'][$id]['Language']));
$md_age->update();
}
/* Description */
foreach($ids = $this->md_section->getDescriptionIds() as $id)
{
$md_des = $this->md_section->getDescription($id);
$md_des->setDescription(ilUtil::stripSlashes($_POST['educational']['Description'][$id]['Value']));
$md_des->setDescriptionLanguage(
new ilMDLanguageItem($_POST['educational']['Description'][$id]['Language']));
$md_des->update();
}
/* Language */
foreach($ids = $this->md_section->getLanguageIds() as $id)
{
$md_lang = $this->md_section->getLanguage($id);
$md_lang->setLanguage(
new ilMDLanguageItem($_POST['educational']['Language'][$id]));
$md_lang->update();
}
$this->md_section->update();
$this->listSection();
}
Here is the call graph for this function:| ilMDEditorGUI::updateGeneral | ( | ) |
Definition at line 264 of file class.ilMDEditorGUI.php.
References $_POST, $data, $id, callListeners(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// General values
$this->md_section = $this->md_obj->getGeneral();
$this->md_section->setStructure($_POST['gen_structure']);
$this->md_section->setTitle(ilUtil::stripSlashes($_POST['gen_title']));
$this->md_section->setTitleLanguage(new ilMDLanguageItem($_POST['gen_title_language']));
$this->md_section->setCoverage(ilUtil::stripSlashes($_POST['gen_coverage']));
$this->md_section->setCoverageLanguage(new ilMDLanguageItem($_POST['gen_coverage_language']));
$this->md_section->update();
// Identifier
if(is_array($_POST['gen_identifier']))
{
foreach($_POST['gen_identifier'] as $id => $data)
{
$md_ide = $this->md_section->getIdentifier($id);
$md_ide->setCatalog(ilUtil::stripSlashes($data['Catalog']));
$md_ide->setEntry(ilUtil::stripSlashes($data['Entry']));
$md_ide->update();
}
}
// Language
if(is_array($_POST['gen_language']))
{
foreach($_POST['gen_language'] as $id => $data)
{
$md_lan = $this->md_section->getLanguage($id);
$md_lan->setLanguage(new ilMDLanguageItem($data['language']));
$md_lan->update();
}
}
// Description
if(is_array($_POST['gen_description']))
{
foreach($_POST['gen_description'] as $id => $data)
{
$md_des = $this->md_section->getDescription($id);
$md_des->setDescription(ilUtil::stripSlashes($data['description']));
$md_des->setDescriptionLanguage(new ilMDLanguageItem($data['language']));
$md_des->update();
}
}
// Keyword
if(is_array($_POST['gen_keyword']))
{
foreach($_POST['gen_keyword'] as $id => $data)
{
$md_key = $this->md_section->getKeyword($id);
$md_key->setKeyword(ilUtil::stripSlashes($data['keyword']));
$md_key->setKeywordLanguage(new ilMDLanguageItem($data['language']));
$md_key->update();
}
}
$this->callListeners('General');
// Redirect here to read new title and description
// Otherwise ('Lifecycle' 'technical' ...) simply call listSection()
$this->ctrl->redirect($this,'listSection');
}
Here is the call graph for this function:| ilMDEditorGUI::updateLifecycle | ( | ) |
Definition at line 708 of file class.ilMDEditorGUI.php.
References $_POST, $data, $id, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// update metametadata section
$this->md_section = $this->md_obj->getLifecycle();
$this->md_section->setVersionLanguage(new ilMDLanguageItem($_POST['lif_language']));
$this->md_section->setVersion(ilUtil::stripSlashes($_POST['lif_version']));
$this->md_section->setStatus($_POST['lif_status']);
$this->md_section->update();
// Identifier
if(is_array($_POST['met_identifier']))
{
foreach($_POST['met_identifier'] as $id => $data)
{
$md_ide = $this->md_section->getIdentifier($id);
$md_ide->setCatalog(ilUtil::stripSlashes($data['Catalog']));
$md_ide->setEntry(ilUtil::stripSlashes($data['Entry']));
$md_ide->update();
}
}
// Contribute
if(is_array($_POST['met_contribute']))
{
foreach($_POST['met_contribute'] as $id => $data)
{
$md_con =& $this->md_section->getContribute($id);
$md_con->setRole(ilUtil::stripSlashes($data['Role']));
$md_con->setDate(ilUtil::stripSlashes($data['Date']));
$md_con->update();
if(is_array($_POST['met_entity'][$id]))
{
foreach($_POST['met_entity'][$id] as $ent_id => $data)
{
$md_ent =& $md_con->getEntity($ent_id);
$md_ent->setEntity(ilUtil::stripSlashes($data['Entity']));
$md_ent->update();
}
}
}
}
$this->listSection();
return true;
}
Here is the call graph for this function:| ilMDEditorGUI::updateMetaMetaData | ( | ) |
Definition at line 889 of file class.ilMDEditorGUI.php.
References $_POST, $data, $id, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// update metametadata section
$this->md_section = $this->md_obj->getMetaMetadata();
$this->md_section->setLanguage(new ilMDLanguageItem($_POST['met_language']));
$this->md_section->update();
// Identifier
if(is_array($_POST['met_identifier']))
{
foreach($_POST['met_identifier'] as $id => $data)
{
$md_ide = $this->md_section->getIdentifier($id);
$md_ide->setCatalog(ilUtil::stripSlashes($data['Catalog']));
$md_ide->setEntry(ilUtil::stripSlashes($data['Entry']));
$md_ide->update();
}
}
// Contribute
if(is_array($_POST['met_contribute']))
{
foreach($_POST['met_contribute'] as $id => $data)
{
$md_con =& $this->md_section->getContribute($id);
$md_con->setRole(ilUtil::stripSlashes($data['Role']));
$md_con->setDate(ilUtil::stripSlashes($data['Date']));
$md_con->update();
if(is_array($_POST['met_entity'][$id]))
{
foreach($_POST['met_entity'][$id] as $ent_id => $data)
{
$md_ent =& $md_con->getEntity($ent_id);
$md_ent->setEntity(ilUtil::stripSlashes($data['Entity']));
$md_ent->update();
}
}
}
}
$this->listSection();
return true;
}
Here is the call graph for this function:| ilMDEditorGUI::updateRelation | ( | ) |
Definition at line 1379 of file class.ilMDEditorGUI.php.
References $_POST, $id, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// relation
foreach($ids = $this->md_obj->getRelationIds() as $id)
{
// kind
$relation = $this->md_obj->getRelation($id);
$relation->setKind($_POST['relation'][$id]['Kind']);
$relation->update();
// identifiers
$res_idents = $relation->getIdentifier_Ids();
foreach ($res_idents as $res_id)
{
$ident = $relation->getIdentifier_($res_id);
$ident->setCatalog(ilUtil::stripSlashes($_POST['relation']['Resource']['Identifier'][$res_id][Catalog]));
$ident->setEntry(ilUtil::stripSlashes($_POST['relation']['Resource']['Identifier'][$res_id][Entry]));
$ident->update();
}
// descriptions
$res_dess = $relation->getDescriptionIds();
foreach ($res_dess as $res_des)
{
$des = $relation->getDescription($res_des);
$des->setDescription(ilUtil::stripSlashes($_POST['relation']['Resource']['Description'][$res_des][Value]));
$des->setDescriptionLanguage(
new ilMDLanguageItem($_POST['relation']['Resource']['Description'][$res_des]['Language']));
$des->update();
}
}
$this->listSection();
}
Here is the call graph for this function:| ilMDEditorGUI::updateRights | ( | ) |
Definition at line 995 of file class.ilMDEditorGUI.php.
References $_POST, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// update rights section
$this->md_section = $this->md_obj->getRights();
$this->md_section->setCosts($_POST['rights']['Cost']);
$this->md_section->setCopyrightAndOtherRestrictions($_POST['rights']['CopyrightAndOtherRestrictions']);
$this->md_section->setDescriptionLanguage(new ilMDLanguageItem($_POST['rights']['DescriptionLanguage']));
$this->md_section->setDescription(ilUtil::stripSlashes($_POST['rights']['Description']));
$this->md_section->update();
$this->listSection();
}
Here is the call graph for this function:| ilMDEditorGUI::updateTechnical | ( | ) |
Definition at line 329 of file class.ilMDEditorGUI.php.
References $_POST, $data, $id, listSection(), and ilUtil::stripSlashes().
{
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
// update technical section
$this->md_section = $this->md_obj->getTechnical();
$this->md_section->setSize(ilUtil::stripSlashes($_POST['met_size']));
$this->md_section->setInstallationRemarks(ilUtil::stripSlashes($_POST['met_inst']));
$this->md_section->setInstallationRemarksLanguage(new ilMDLanguageItem($_POST['inst_language']));
$this->md_section->setOtherPlatformRequirements(ilUtil::stripSlashes($_POST['met_opr']));
$this->md_section->setOtherPlatformRequirementsLanguage(new ilMDLanguageItem($_POST['opr_language']));
$this->md_section->setDuration(ilUtil::stripSlashes($_POST['duration']));
$this->md_section->update();
// Format
if(is_array($_POST['met_format']))
{
foreach($_POST['met_format'] as $id => $data)
{
$md_for = $this->md_section->getFormat($id);
$md_for->setFormat(ilUtil::stripSlashes($data['Format']));
$md_for->update();
}
}
// Location
if(is_array($_POST['met_location']))
{
foreach($_POST['met_location'] as $id => $data)
{
$md_loc = $this->md_section->getLocation($id);
$md_loc->setLocation(ilUtil::stripSlashes($data['Location']));
$md_loc->setLocationType(ilUtil::stripSlashes($data['Type']));
$md_loc->update();
}
}
if(is_array($_POST['met_re']))
{
foreach($_POST['met_re'] as $id => $data)
{
$md_re = $this->md_section->getRequirement($id);
$md_re->setOperatingSystemName(ilUtil::stripSlashes($data['os']['name']));
$md_re->setOperatingSystemMinimumVersion(ilUtil::stripSlashes($data['os']['MinimumVersion']));
$md_re->setOperatingSystemMaximumVersion(ilUtil::stripSlashes($data['os']['MaximumVersion']));
$md_re->setBrowserName(ilUtil::stripSlashes($data['browser']['name']));
$md_re->setBrowserMinimumVersion(ilUtil::stripSlashes($data['browser']['MinimumVersion']));
$md_re->setBrowserMaximumVersion(ilUtil::stripSlashes($data['browser']['MaximumVersion']));
$md_re->update();
}
}
$this->listSection();
#sendInfo($this->lng->txt('msg_changes_ok'));
return true;
}
Here is the call graph for this function:| ilMDEditorGUI::$ctrl = null |
Definition at line 38 of file class.ilMDEditorGUI.php.
| ilMDEditorGUI::$lng = null |
Definition at line 39 of file class.ilMDEditorGUI.php.
Referenced by ilMDEditorGUI().
| ilMDEditorGUI::$md_obj = null |
Definition at line 41 of file class.ilMDEditorGUI.php.
| ilMDEditorGUI::$obj_id = null |
Definition at line 46 of file class.ilMDEditorGUI.php.
| ilMDEditorGUI::$obj_type = null |
Definition at line 47 of file class.ilMDEditorGUI.php.
| ilMDEditorGUI::$observers = array() |
Definition at line 43 of file class.ilMDEditorGUI.php.
| ilMDEditorGUI::$rbac_id = null |
Definition at line 45 of file class.ilMDEditorGUI.php.
| ilMDEditorGUI::$tpl = null |
Definition at line 40 of file class.ilMDEditorGUI.php.
Referenced by __showLanguageSelect(), and ilMDEditorGUI().
1.7.1