12 include_once
'Services/MetaData/classes/class.ilMD.php';
13 include_once
'Services/MetaData/classes/class.ilMDUtilSelect.php';
15 define(
'IL_TLT_MAX_HOURS',99);
35 $this->md_obj =&
new ilMD($a_rbac_id,$a_obj_id,$a_obj_type);
39 $this->lng->loadLanguageModule(
'meta');
41 include_once(
'Services/MetaData/classes/class.ilMDSettings.php');
46 $this->tabs_gui =& $ilTabs;
54 $next_class = $this->ctrl->getNextClass($this);
56 $cmd = $this->ctrl->getCmd();
73 include_once
'Services/MetaData/classes/class.ilMD2XML.php';
76 $xml_writer =&
new ilMD2XML($this->md_obj->getRBACId(),$this->md_obj->getObjId(),$this->md_obj->getObjType());
79 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
83 $this->tpl->setVariable(
"MD_CONTENT",htmlentities($xml_writer->getXML()));
94 if(!is_object($this->md_section = $this->md_obj->getGeneral()))
96 $this->md_section = $this->md_obj->addGeneral();
97 $this->md_section->save();
100 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
104 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_quick_edit_scorm.html',
'Services/MetaData');
106 $this->ctrl->setReturn($this,
'listGeneral');
107 $this->ctrl->setParameter($this,
'section',
'meta_general');
108 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
110 $this->tpl->setVariable(
"TXT_QUICK_EDIT", $this->lng->txt(
"meta_quickedit"));
111 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
112 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
113 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
114 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
118 foreach($ids = $this->md_section->getLanguageIds() as $id)
120 $md_lan = $this->md_section->getLanguage($id);
124 $this->tpl->setCurrentBlock(
"language_head");
125 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
126 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
127 $this->tpl->parseCurrentBlock();
133 $this->ctrl->setParameter($this,
'meta_index',$id);
134 $this->ctrl->setParameter($this,
'meta_path',
'meta_language');
136 $this->tpl->setCurrentBlock(
"language_delete");
137 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
138 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
139 $this->tpl->parseCurrentBlock();
141 $this->tpl->setCurrentBlock(
"language_loop");
142 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
'gen_language['.$id.
'][language]',
143 $md_lan->getLanguageCode()));
144 $this->tpl->parseCurrentBlock();
149 $this->tpl->setCurrentBlock(
"language_head");
150 $this->tpl->setVariable(
"ROWSPAN_LANG", 1);
151 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
152 $this->tpl->parseCurrentBlock();
153 $this->tpl->setCurrentBlock(
"language_loop");
154 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
'gen_language[][language]',
156 $this->tpl->parseCurrentBlock();
160 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
163 $this->md_section->getTitleLanguageCode()));
166 foreach($ids = $this->md_section->getDescriptionIds() as $id)
168 $md_des = $this->md_section->getDescription($id);
172 $this->ctrl->setParameter($this,
'meta_index',$id);
173 $this->ctrl->setParameter($this,
'meta_path',
'meta_description');
175 $this->tpl->setCurrentBlock(
"description_delete");
176 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
177 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
178 $this->tpl->parseCurrentBlock();
181 $this->tpl->setCurrentBlock(
"description_loop");
182 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO",$id);
183 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
184 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
186 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
187 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_description[".$id.
'][language]',
188 $md_des->getDescriptionLanguageCode()));
189 $this->tpl->parseCurrentBlock();
195 foreach($ids = $this->md_section->getKeywordIds() as $id)
197 $md_key = $this->md_section->getKeyword($id);
198 $keywords[$md_key->getKeywordLanguageCode()][]
199 = $md_key->getKeyword();
202 foreach($keywords as
$lang => $keyword_set)
206 $this->tpl->setCurrentBlock(
"keyword_head");
207 $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($keywords));
208 $this->tpl->setVariable(
"TXT_COMMA_SEP2",$this->lng->txt(
'comma_separated'));
209 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"keywords"));
210 $this->tpl->parseCurrentBlock();
214 $this->tpl->setCurrentBlock(
"keyword_loop");
216 implode($keyword_set,
", ")));
217 $this->tpl->setVariable(
"LANG",
$lang);
218 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"keyword[language][$lang]",
220 $this->tpl->parseCurrentBlock();
223 if (count($keywords) == 0)
225 $this->tpl->setCurrentBlock(
"keyword_head");
226 $this->tpl->setVariable(
"ROWSPAN_KEYWORD", 1);
227 $this->tpl->setVariable(
"TXT_COMMA_SEP2",$this->lng->txt(
'comma_separated'));
228 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"keywords"));
229 $this->tpl->parseCurrentBlock();
230 $this->tpl->setCurrentBlock(
"keyword_loop");
231 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"keyword[language][$lang]",
237 $this->tpl->setVariable(
"TXT_EXPERTS",$lng->txt(
'meta_subjectmatterexpert'));
238 $this->tpl->setVariable(
"TXT_COMMA_SEP",$this->lng->txt(
'comma_separated'));
239 $this->tpl->setVariable(
"TXT_SCOPROP_EXPERT",$this->lng->txt(
'sco_propagate'));
240 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
242 $sep = $ent_str =
"";
243 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
245 $md_con = $this->md_section->getContribute($con_id);
246 if ($md_con->getRole() ==
"SubjectMatterExpert")
248 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
250 $md_ent = $md_con->getEntity($ent_id);
251 $ent_str = $ent_str.$sep.$md_ent->getEntity();
259 $this->tpl->setVariable(
"TXT_DESIGNERS",$lng->txt(
'meta_instructionaldesigner'));
260 $this->tpl->setVariable(
"TXT_SCOPROP_DESIGNERS",$this->lng->txt(
'sco_propagate'));
261 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
263 $sep = $ent_str =
"";
264 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
266 $md_con = $this->md_section->getContribute($con_id);
267 if ($md_con->getRole() ==
"InstructionalDesigner")
269 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
271 $md_ent = $md_con->getEntity($ent_id);
272 $ent_str = $ent_str.$sep.$md_ent->getEntity();
280 $this->tpl->setVariable(
"TXT_POC",$lng->txt(
'meta_pointofcontact'));
281 $this->tpl->setVariable(
"TXT_SCOPROP_POC",$this->lng->txt(
'sco_propagate'));
282 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
284 $sep = $ent_str =
"";
285 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
287 $md_con = $this->md_section->getContribute($con_id);
288 if ($md_con->getRole() ==
"PointOfContact")
290 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
292 $md_ent = $md_con->getEntity($ent_id);
293 $ent_str = $ent_str.$sep.$md_ent->getEntity();
301 $this->tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'meta_status'));
302 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
304 $this->md_section = $this->md_obj->addLifecycle();
305 $this->md_section->save();
307 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
311 array(0 => $this->lng->txt(
'meta_please_select'))));
317 include_once(
'Services/MetaData/classes/class.ilMDCopyrightSelectionGUI.php');
320 $this->md_obj->getRBACId(),
321 $this->md_obj->getObjId());
337 #if(is_object($this->md_section = $this->md_obj->getEducational()))
339 # $this->tpl->setVariable("VAL_TYPICAL_LEARN_TIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime()));
342 $tlt = array(0,0,0,0,0);
344 if(is_object($this->md_section = $this->md_obj->getEducational()))
346 include_once
'Services/MetaData/classes/class.ilMDUtils.php';
350 if(strlen($this->md_section->getTypicalLearningTime()))
352 $tlt = array(0,0,0,0,0);
357 $this->tpl->setVariable(
"TXT_MONTH",$this->lng->txt(
'md_months'));
361 $this->tpl->setVariable(
"TXT_DAYS",$this->lng->txt(
'md_days'));
362 $this->tpl->setVariable(
"TXT_TIME",$this->lng->txt(
'md_time'));
364 $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME",$this->lng->txt(
'meta_typical_learning_time'));
366 $tlt[2],$tlt[3],$tlt[4],
368 $this->tpl->setVariable(
"TLT_HINT",$tlt[4] ?
'(hh:mm:ss)' :
'(hh:mm)');
372 $this->tpl->setCurrentBlock(
"tlt_not_valid");
373 $this->tpl->setVariable(
"TXT_CURRENT_VAL",$this->lng->txt(
'meta_current_value'));
374 $this->tpl->setVariable(
"TLT",$this->md_section->getTypicalLearningTime());
375 $this->tpl->setVariable(
"INFO_TLT_NOT_VALID",$this->lng->txt(
'meta_info_tlt_not_valid'));
376 $this->tpl->parseCurrentBlock();
380 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
387 if(!is_object($this->md_section = $this->md_obj->getGeneral()))
389 $this->md_section = $this->md_obj->addGeneral();
390 $this->md_section->save();
395 $tpl->setContent($form->getHTML());
405 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
412 $ti->setRequired(
true);
413 $ti->setValue($this->md_section->getTitle());
414 $this->form->addItem($ti);
417 foreach($ids = $this->md_section->getDescriptionIds() as $id)
419 $md_des = $this->md_section->getDescription($id);
421 $ta =
new ilTextAreaInputGUI($this->lng->txt(
"meta_description"),
"gen_description[".$id.
"][description]");
424 $ta->setValue($md_des->getDescription());
427 $ta->setInfo($this->lng->txt(
"meta_l_".$md_des->getDescriptionLanguageCode()));
430 $this->form->addItem($ta);
436 foreach($ids = $this->md_section->getLanguageIds() as $id)
438 $md_lan = $this->md_section->getLanguage($id);
439 $first_lang = $md_lan->getLanguageCode();
440 $si =
new ilSelectInputGUI($this->lng->txt(
"meta_language"),
"gen_language[".$id.
"][language]");
441 $si->setOptions($options);
442 $si->setValue($md_lan->getLanguageCode());
443 $this->form->addItem(
$si);
449 $si->setOptions($options);
450 $this->form->addItem(
$si);
456 foreach($ids = $this->md_section->getKeywordIds() as $id)
458 $md_key = $this->md_section->getKeyword($id);
459 if (trim($md_key->getKeyword()) !=
"")
461 $keywords[$md_key->getKeywordLanguageCode()][]
462 = $md_key->getKeyword();
465 foreach($keywords as
$lang => $keyword_set)
468 "keywords[value][".$lang.
"]");
469 $kw->setDataSource($this->ctrl->getLinkTarget($this,
"keywordAutocomplete",
"",
true));
470 $kw->setMaxLength(200);
473 if (count($keywords) > 1)
475 $kw->setInfo($this->lng->txt(
"meta_l_".$lang));
477 $this->form->addItem($kw);
479 $kw->setValue($keyword_set);
481 if (count($keywords) == 0)
484 "keywords[value][".$first_lang.
"]");
485 $kw->setDataSource($this->ctrl->getLinkTarget($this,
"keywordAutocomplete",
"",
true));
486 $kw->setMaxLength(200);
489 $this->form->addItem($kw);
495 "(".sprintf($this->lng->txt(
'md_separated_by'), $this->md_settings->getDelimiter()).
")",
499 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
501 $sep = $ent_str =
"";
502 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
504 $md_con = $this->md_section->getContribute($con_id);
505 if ($md_con->getRole() ==
"Author")
507 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
509 $md_ent = $md_con->getEntity($ent_id);
510 $ent_str = $ent_str.$sep.$md_ent->getEntity();
511 $sep = $this->md_settings->getDelimiter().
" ";
515 $ta->setValue($ent_str);
517 $this->form->addItem($ta);
520 include_once(
"./Services/MetaData/classes/class.ilCopyrightInputGUI.php");
525 $this->md_obj->getObjId());
528 $this->form->addItem($cp);
531 include_once(
"./Services/MetaData/classes/class.ilTypicalLearningTimeInputGUI.php");
533 $edu = $this->md_obj->getEducational();
538 $this->form->addItem($tlt);
540 $this->form->addCommandButton(
"updateQuickEdit", $lng->txt(
"save"));
541 $this->form->setTitle($this->lng->txt(
"meta_quickedit"));
542 $this->form->setFormAction($ilCtrl->getFormAction($this));
556 include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
558 $this->md_obj->getObjType(), $this->md_obj->getRBACId());
568 $entry =
new stdClass();
574 include_once
'./Services/JSON/classes/class.ilJsonUtil.php';
585 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
587 if(!trim(
$_POST[
'gen_title']))
595 $this->md_section = $this->md_obj->getGeneral();
598 $this->md_section->update();
601 if(is_array(
$_POST[
'gen_language']))
607 $md_lan = $this->md_section->getLanguage($id);
613 $md_lan = $this->md_section->addLanguage();
620 if(is_array(
$_POST[
'gen_description']))
624 $md_des = $this->md_section->getDescription($id);
632 if(is_array(
$_POST[
"keywords"][
"value"]))
634 include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
641 if(
$_POST[
'copyright'][
'sel'] ||
$_POST[
'copyright'][
'ta'])
643 if(!is_object($this->md_section = $this->md_obj->getRights()))
645 $this->md_section = $this->md_obj->addRights();
646 $this->md_section->save();
648 if(
$_POST[
'copyright'][
'sel'])
650 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
651 $this->md_section->setDescription(
'il_copyright_entry__'.IL_INST_ID.
'__'.(
int)
$_POST[
'copyright'][
'sel']);
655 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
658 $this->md_section->update();
662 if(is_object($this->md_section = $this->md_obj->getRights()))
664 $this->md_section->setCopyrightAndOtherRestrictions(
"No");
665 $this->md_section->setDescription(
"");
666 $this->md_section->update();
676 if(!is_object($this->md_section = $this->md_obj->getEducational()))
678 $this->md_section = $this->md_obj->addEducational();
679 $this->md_section->save();
681 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
682 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
683 $this->md_section->update();
687 if(is_object($this->md_section = $this->md_obj->getEducational()))
689 $this->md_section->setPhysicalTypicalLearningTime(0,0,0,0,0);
690 $this->md_section->update();
696 if ($_POST[
"life_authors"] !=
"")
698 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
700 $this->md_section = $this->md_obj->addLifecycle();
701 $this->md_section->save();
705 $auth_arr = explode($this->md_settings->getDelimiter(), $_POST[
"life_authors"]);
706 for($i = 0; $i < count($auth_arr); $i++)
708 $auth_arr[$i] = trim($auth_arr[$i]);
714 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
716 $md_con = $this->md_section->getContribute($con_id);
717 if ($md_con->getRole() ==
"Author")
719 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
721 $md_ent = $md_con->getEntity($ent_id);
724 if (in_array($md_ent->getEntity(), $auth_arr))
726 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
733 $md_con_author = $md_con;
738 if (count($auth_arr) > 0)
740 if (!is_object($md_con_author))
742 $md_con_author = $this->md_section->addContribute();
743 $md_con_author->setRole(
"Author");
744 $md_con_author->save();
746 foreach ($auth_arr as
$auth)
748 $md_ent = $md_con_author->addEntity();
756 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
758 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
760 $md_con = $this->md_section->getContribute($con_id);
761 if ($md_con->getRole() ==
"Author")
773 $this->ctrl->redirect($this,
'listSection');
779 $module_id = $this->md_obj->obj_id;
780 if($this->md_obj->obj_type==
'sco')
781 $module_id = $this->md_obj->rbac_id;
782 $tree =
new ilTree($module_id);
783 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
784 $tree->setTreeTablePK(
"slm_id");
785 foreach($tree->getSubTree($tree->getNodeData($tree->getRootId()),
true,
'sco') as $sco)
787 $sco_md =
new ilMD($module_id,$sco[
'obj_id'],
'sco');
788 if (
$_POST[$request] !=
"")
791 if(!is_object($sco_md_section = $sco_md->getLifecycle()))
793 $sco_md_section = $sco_md->addLifecycle();
794 $sco_md_section->save();
797 $auth_arr = explode(
",",
$_POST[$request]);
798 for($i = 0; $i < count($auth_arr); $i++)
800 $auth_arr[$i] = trim($auth_arr[$i]);
806 foreach(($ids = $sco_md_section->getContributeIds()) as $con_id)
808 $md_con = $sco_md_section->getContribute($con_id);
809 if ($md_con->getRole() == $type)
811 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
813 $md_ent = $md_con->getEntity($ent_id);
816 if (in_array($md_ent->getEntity(), $auth_arr))
818 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
825 $md_con_author = $md_con;
830 if (count($auth_arr) > 0)
832 if (!is_object($md_con_author))
834 $md_con_author = $sco_md_section->addContribute();
835 $md_con_author->setRole($type);
836 $md_con_author->save();
838 foreach ($auth_arr as
$auth)
840 $md_ent = $md_con_author->addEntity();
848 if(is_object($sco_md_section = $sco_md->getLifecycle()))
850 foreach(($ids = $sco_md_section->getContributeIds()) as $con_id)
852 $md_con = $sco_md_section->getContribute($con_id);
853 if ($md_con->getRole() == $type)
883 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
886 $this->md_section = $this->md_obj->getGeneral();
889 $this->md_section->update();
892 if(is_array(
$_POST[
'gen_language']))
898 $md_lan = $this->md_section->getLanguage($id);
904 $md_lan = $this->md_section->addLanguage();
911 if(is_array(
$_POST[
'gen_description']))
915 $md_des = $this->md_section->getDescription($id);
924 if(is_array(
$_POST[
"keywords"][
"value"]))
926 $new_keywords = array();
927 foreach(
$_POST[
"keywords"][
"value"] as
$lang => $keywords)
930 $keywords = explode(
",", $keywords);
931 foreach($keywords as $keyword)
933 $new_keywords[$language][] = trim($keyword);
938 foreach($ids = $this->md_section->getKeywordIds() as $id)
940 $md_key = $this->md_section->getKeyword($id);
942 $lang = $md_key->getKeywordLanguageCode();
945 if (is_array($new_keywords[
$lang]) &&
946 in_array($md_key->getKeyword(), $new_keywords[
$lang]))
948 unset($new_keywords[$lang]
949 [array_search($md_key->getKeyword(), $new_keywords[
$lang])]);
958 foreach ($new_keywords as
$lang => $key_arr)
960 foreach($key_arr as $keyword)
964 $md_key = $this->md_section->addKeyword();
976 if(
$_POST[
'copyright_id'] or
$_POST[
'rights_copyright'])
978 if(!is_object($this->md_section = $this->md_obj->getRights()))
980 $this->md_section = $this->md_obj->addRights();
981 $this->md_section->save();
983 if($_POST[
'copyright_id'])
985 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
986 $this->md_section->setDescription(
'il_copyright_entry__'.IL_INST_ID.
'__'.(
int) $_POST[
'copyright_id']);
990 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
993 $this->md_section->update();
997 if(is_object($this->md_section = $this->md_obj->getRights()))
999 $this->md_section->setCopyrightAndOtherRestrictions(
"No");
1000 $this->md_section->setDescription(
"");
1001 $this->md_section->update();
1008 if($_POST[
'tlt'][
'mo'] or $_POST[
'tlt'][
'd'] or
1009 $_POST[
"tlt"][
'h'] or $_POST[
'tlt'][
'm'] or $_POST[
'tlt'][
's'])
1011 if(!is_object($this->md_section = $this->md_obj->getEducational()))
1013 $this->md_section = $this->md_obj->addEducational();
1014 $this->md_section->save();
1016 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
1017 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
1018 $this->md_section->update();
1022 if(is_object($this->md_section = $this->md_obj->getEducational()))
1024 $this->md_section->setPhysicalTypicalLearningTime(0,0,0,0,0);
1025 $this->md_section->update();
1031 if ($_POST[
"life_experts"] !=
"")
1033 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1035 $this->md_section = $this->md_obj->addLifecycle();
1036 $this->md_section->save();
1040 $auth_arr = explode(
",", $_POST[
"life_experts"]);
1041 for($i = 0; $i < count($auth_arr); $i++)
1043 $auth_arr[$i] = trim($auth_arr[$i]);
1046 $md_con_author =
"";
1049 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1051 $md_con = $this->md_section->getContribute($con_id);
1052 if ($md_con->getRole() ==
"SubjectMatterExpert")
1054 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1056 $md_ent = $md_con->getEntity($ent_id);
1059 if (in_array($md_ent->getEntity(), $auth_arr))
1061 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1068 $md_con_author = $md_con;
1073 if (count($auth_arr) > 0)
1075 if (!is_object($md_con_author))
1077 $md_con_author = $this->md_section->addContribute();
1078 $md_con_author->setRole(
"SubjectMatterExpert");
1079 $md_con_author->save();
1081 foreach ($auth_arr as
$auth)
1083 $md_ent = $md_con_author->addEntity();
1091 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1093 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1095 $md_con = $this->md_section->getContribute($con_id);
1096 if ($md_con->getRole() ==
"SubjectMatterExpert")
1106 if ($_POST[
"life_designers"] !=
"")
1108 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1110 $this->md_section = $this->md_obj->addLifecycle();
1111 $this->md_section->save();
1115 $auth_arr = explode(
",", $_POST[
"life_designers"]);
1116 for($i = 0; $i < count($auth_arr); $i++)
1118 $auth_arr[$i] = trim($auth_arr[$i]);
1121 $md_con_author =
"";
1124 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1126 $md_con = $this->md_section->getContribute($con_id);
1127 if ($md_con->getRole() ==
"InstructionalDesigner")
1129 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1131 $md_ent = $md_con->getEntity($ent_id);
1134 if (in_array($md_ent->getEntity(), $auth_arr))
1136 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1143 $md_con_author = $md_con;
1148 if (count($auth_arr) > 0)
1150 if (!is_object($md_con_author))
1152 $md_con_author = $this->md_section->addContribute();
1153 $md_con_author->setRole(
"InstructionalDesigner");
1154 $md_con_author->save();
1156 foreach ($auth_arr as
$auth)
1158 $md_ent = $md_con_author->addEntity();
1166 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1168 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1170 $md_con = $this->md_section->getContribute($con_id);
1171 if ($md_con->getRole() ==
"InstructionalDesigner")
1181 if ($_POST[
"life_poc"] !=
"")
1183 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1185 $this->md_section = $this->md_obj->addLifecycle();
1186 $this->md_section->save();
1190 $auth_arr = explode(
",", $_POST[
"life_poc"]);
1191 for($i = 0; $i < count($auth_arr); $i++)
1193 $auth_arr[$i] = trim($auth_arr[$i]);
1196 $md_con_author =
"";
1199 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1201 $md_con = $this->md_section->getContribute($con_id);
1202 if ($md_con->getRole() ==
"PointOfContact")
1204 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1206 $md_ent = $md_con->getEntity($ent_id);
1209 if (in_array($md_ent->getEntity(), $auth_arr))
1211 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1218 $md_con_author = $md_con;
1223 if (count($auth_arr) > 0)
1225 if (!is_object($md_con_author))
1227 $md_con_author = $this->md_section->addContribute();
1228 $md_con_author->setRole(
"PointOfContact");
1229 $md_con_author->save();
1231 foreach ($auth_arr as
$auth)
1233 $md_ent = $md_con_author->addEntity();
1241 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1243 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1245 $md_con = $this->md_section->getContribute($con_id);
1246 if ($md_con->getRole() ==
"PointOfContact")
1255 $this->md_section = $this->md_obj->getLifecycle();
1256 $this->md_section->setVersionLanguage(
new ilMDLanguageItem($_POST[
'lif_language']));
1258 $this->md_section->setStatus($_POST[
'lif_status']);
1259 $this->md_section->update();
1267 $this->ctrl->redirect($this,
'listSection');
1275 if(!is_object($this->md_section = $this->md_obj->getGeneral()))
1277 $this->md_section = $this->md_obj->addGeneral();
1278 $this->md_section->save();
1281 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1285 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_general.html',
'Services/MetaData');
1287 $this->ctrl->setReturn($this,
'listGeneral');
1288 $this->ctrl->setParameter($this,
'section',
'meta_general');
1289 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1293 $this->tpl->setVariable(
"TXT_GENERAL", $this->lng->txt(
"meta_general"));
1294 $this->tpl->setVariable(
"TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
1295 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1296 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
1297 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
1298 $this->tpl->setVariable(
"TXT_STRUCTURE", $this->lng->txt(
"meta_structure"));
1299 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
1300 $this->tpl->setVariable(
"TXT_ATOMIC", $this->lng->txt(
"meta_atomic"));
1301 $this->tpl->setVariable(
"TXT_COLLECTION", $this->lng->txt(
"meta_collection"));
1302 $this->tpl->setVariable(
"TXT_NETWORKED", $this->lng->txt(
"meta_networked"));
1303 $this->tpl->setVariable(
"TXT_HIERARCHICAL", $this->lng->txt(
"meta_hierarchical"));
1304 $this->tpl->setVariable(
"TXT_LINEAR", $this->lng->txt(
"meta_linear"));
1307 $this->tpl->setVariable(
"STRUCTURE_VAL_".strtoupper($this->md_section->getStructure()),
" selected=selected");
1311 foreach($ids = $this->md_section->getIdentifierIds() as $id)
1313 $md_ide = $this->md_section->getIdentifier($id);
1318 $this->tpl->setCurrentBlock(
"id_head");
1319 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
1320 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
1321 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
1322 $this->tpl->setVariable(
"ROWSPAN_ID", count($ids));
1323 $this->tpl->parseCurrentBlock();
1329 $this->ctrl->setParameter($this,
'meta_index',$id);
1330 $this->ctrl->setParameter($this,
'meta_path',
'meta_identifier');
1332 if ($md_ide->getCatalog() !=
"ILIAS")
1334 $this->tpl->setCurrentBlock(
"identifier_delete");
1335 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1336 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1337 $this->tpl->parseCurrentBlock();
1341 $this->tpl->setCurrentBlock(
"identifier_loop");
1342 if ($md_ide->getCatalog() ==
"ILIAS")
1344 $this->tpl->setVariable(
"DISABLE_IDENT",
' disabled="disabled" ');
1346 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $id);
1347 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
1349 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
1351 $this->tpl->parseCurrentBlock();
1357 foreach($ids = $this->md_section->getLanguageIds() as $id)
1359 $md_lan = $this->md_section->getLanguage($id);
1363 $this->tpl->setCurrentBlock(
"language_head");
1364 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
1365 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1366 $this->tpl->parseCurrentBlock();
1370 if (count($ids) > 1)
1372 $this->ctrl->setParameter($this,
'meta_index',$id);
1373 $this->ctrl->setParameter($this,
'meta_path',
'meta_language');
1375 $this->tpl->setCurrentBlock(
"language_delete");
1376 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1377 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1378 $this->tpl->parseCurrentBlock();
1380 $this->tpl->setCurrentBlock(
"language_loop");
1381 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
'gen_language['.$id.
'][language]',
1382 $md_lan->getLanguageCode()));
1383 $this->tpl->parseCurrentBlock();
1387 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
1390 $this->md_section->getTitleLanguageCode()));
1394 foreach($ids = $this->md_section->getDescriptionIds() as $id)
1396 $md_des = $this->md_section->getDescription($id);
1398 if (count($ids) > 1)
1400 $this->ctrl->setParameter($this,
'meta_index',$id);
1401 $this->ctrl->setParameter($this,
'meta_path',
'meta_description');
1403 $this->tpl->setCurrentBlock(
"description_delete");
1404 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1405 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1406 $this->tpl->parseCurrentBlock();
1409 $this->tpl->setCurrentBlock(
"description_loop");
1410 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO",$id);
1411 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
1412 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
1414 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1415 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_description[".$id.
'][language]',
1416 $md_des->getDescriptionLanguageCode()));
1417 $this->tpl->parseCurrentBlock();
1422 foreach($ids = $this->md_section->getKeywordIds() as $id)
1424 $md_key = $this->md_section->getKeyword($id);
1428 $this->tpl->setCurrentBlock(
"keyword_head");
1429 $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($ids));
1430 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
1431 $this->tpl->parseCurrentBlock();
1438 $this->ctrl->setParameter($this,
'meta_index',$id);
1439 $this->ctrl->setParameter($this,
'meta_path',
'meta_keyword');
1441 $this->tpl->setCurrentBlock(
"keyword_delete");
1442 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1443 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1444 $this->tpl->parseCurrentBlock();
1447 $this->tpl->setCurrentBlock(
"keyword_loop");
1448 $this->tpl->setVariable(
"KEYWORD_LOOP_NO",$id);
1449 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
1451 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1452 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_keyword[".$id.
'][language]',
1453 $md_key->getKeywordLanguageCode()));
1455 $this->tpl->parseCurrentBlock();
1459 $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_COVERAGE",$this->lng->txt(
'meta_coverage'));
1461 $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1462 $this->tpl->setVariable(
"COVERAGE_LOOP_VAL_LANGUAGE",$this->
__showLanguageSelect(
'gen_coverage_language',
1463 $this->md_section->getCoverageLanguageCode()));
1465 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1473 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1475 if(!strlen(trim(
$_POST[
'gen_title'])))
1483 $this->md_section = $this->md_obj->getGeneral();
1484 $this->md_section->setStructure(
$_POST[
'gen_structure']);
1489 $this->md_section->update();
1492 if(is_array(
$_POST[
'gen_identifier']))
1496 $md_ide = $this->md_section->getIdentifier($id);
1504 if(is_array(
$_POST[
'gen_language']))
1508 $md_lan = $this->md_section->getLanguage($id);
1514 if(is_array(
$_POST[
'gen_description']))
1516 foreach(
$_POST[
'gen_description'] as $id =>
$data)
1518 $md_des = $this->md_section->getDescription($id);
1525 if(is_array(
$_POST[
'gen_keyword']))
1529 $md_key = $this->md_section->getKeyword($id);
1540 $this->ctrl->setParameter($this,
"section",
"meta_general");
1542 $this->ctrl->redirect($this,
'listSection');
1547 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1550 $this->md_section = $this->md_obj->getTechnical();
1557 $this->md_section->update();
1560 if(is_array(
$_POST[
'met_format']))
1564 $md_for = $this->md_section->getFormat($id);
1570 if(is_array(
$_POST[
'met_location']))
1574 $md_loc = $this->md_section->getLocation($id);
1580 if(is_array(
$_POST[
'met_re']))
1585 $md_re = $this->md_section->getRequirement($id);
1606 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1608 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_technical.html',
'Services/MetaData');
1611 $this->ctrl->setParameter($this,
"section",
"meta_technical");
1612 if(!is_object($this->md_section = $this->md_obj->getTechnical()))
1614 $this->tpl->setCurrentBlock(
"no_technical");
1615 $this->tpl->setVariable(
"TXT_NO_TECHNICAL", $this->lng->txt(
"meta_no_technical"));
1616 $this->tpl->setVariable(
"TXT_ADD_TECHNICAL", $this->lng->txt(
"meta_add"));
1617 $this->tpl->setVariable(
"ACTION_ADD_TECHNICAL",$this->ctrl->getLinkTarget($this,
"addSection"));
1618 $this->tpl->parseCurrentBlock();
1622 $this->ctrl->setReturn($this,
'listTechnical');
1623 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
1625 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1626 $this->tpl->setVariable(
"TXT_TECHNICAL",$this->lng->txt(
'meta_technical'));
1629 $this->tpl->setVariable(
"ACTION_DELETE",
1630 $this->ctrl->getLinkTarget($this,
"deleteSection"));
1631 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
1637 foreach($ids = $this->md_section->getFormatIds() as $id)
1639 $md_for =& $this->md_section->getFormat($id);
1641 $this->tpl->setCurrentBlock(
"format_loop");
1643 $this->ctrl->setParameter($this,
'meta_index',$id);
1644 $this->ctrl->setParameter($this,
'meta_path',
'meta_format');
1645 $this->tpl->setVariable(
"FORMAT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1646 $this->tpl->setVariable(
"FORMAT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1648 $this->tpl->setVariable(
"FORMAT_LOOP_NO",$id);
1649 $this->tpl->setVariable(
"FORMAT_LOOP_TXT_FORMAT",$this->lng->txt(
'meta_format'));
1652 $this->tpl->parseCurrentBlock();
1655 $this->tpl->setVariable(
"SIZE_TXT_SIZE",$this->lng->txt(
'meta_size'));
1659 foreach($ids = $this->md_section->getLocationIds() as $id)
1661 $md_loc =& $this->md_section->getLocation($id);
1663 $this->tpl->setCurrentBlock(
"location_loop");
1665 $this->ctrl->setParameter($this,
'meta_index',$id);
1666 $this->ctrl->setParameter($this,
'meta_path',
'meta_location');
1667 $this->tpl->setVariable(
"LOCATION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1668 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1670 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_LOCATION",$this->lng->txt(
'meta_location'));
1671 $this->tpl->setVariable(
"LOCATION_LOOP_NO",$id);
1672 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1675 $this->tpl->setVariable(
"SEL_LOCATION_TYPE",
1677 "met_location[".$id.
"][Type]",
1678 array(0 => $this->lng->txt(
'meta_please_select'))));
1679 $this->tpl->parseCurrentBlock();
1682 foreach($ids = $this->md_section->getRequirementIds() as $id)
1684 $md_re =& $this->md_section->getRequirement($id);
1686 $this->tpl->setCurrentBlock(
"requirement_loop");
1688 $this->ctrl->setParameter($this,
'meta_index',$id);
1689 $this->ctrl->setParameter($this,
'meta_path',
'meta_requirement');
1690 $this->tpl->setVariable(
"REQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1691 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1693 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt(
'meta_requirement'));
1694 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1695 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt(
'meta_operating_system'));
1696 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt(
'meta_browser'));
1697 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_NAME",$this->lng->txt(
'meta_name'));
1698 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt(
'meta_minimum_version'));
1699 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt(
'meta_maximum_version'));
1701 $this->tpl->setVariable(
"REQUIREMENT_LOOP_NO",$id);
1702 $this->tpl->setVariable(
"REQUIREMENT_SEL_OS_NAME",
1704 "met_re[".$id.
"][os][name]",
1705 array(0 => $this->lng->txt(
'meta_please_select'))));
1706 $this->tpl->setVariable(
"REQUIREMENT_SEL_BROWSER_NAME",
1708 "met_re[".$id.
"][browser][name]",
1709 array(0 => $this->lng->txt(
'meta_please_select'))));
1711 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
1714 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
1717 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
1720 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
1722 $this->tpl->parseCurrentBlock();
1726 foreach($ids = $this->md_section->getOrCompositeIds() as $or_id)
1728 $md_or =& $this->md_section->getOrComposite($or_id);
1729 foreach($ids = $md_or->getRequirementIds() as $id)
1731 $md_re =& $this->md_section->getRequirement($id);
1733 $this->tpl->setCurrentBlock(
"orrequirement_loop");
1735 $this->ctrl->setParameter($this,
'meta_index',$id);
1736 $this->ctrl->setParameter($this,
'meta_path',
'meta_requirement');
1737 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1738 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1740 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt(
'meta_requirement'));
1741 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1742 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt(
'meta_operating_system'));
1743 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt(
'meta_browser'));
1744 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_NAME",$this->lng->txt(
'meta_name'));
1745 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt(
'meta_minimum_version'));
1746 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt(
'meta_maximum_version'));
1748 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_NO",$id);
1749 $this->tpl->setVariable(
"ORREQUIREMENT_SEL_OS_NAME",
1751 "met_re[".$id.
"][os][name]",
1752 array(0 => $this->lng->txt(
'meta_please_select'))));
1753 $this->tpl->setVariable(
"ORREQUIREMENT_SEL_BROWSER_NAME",
1755 "met_re[".$id.
"][browser][name]",
1756 array(0 => $this->lng->txt(
'meta_please_select'))));
1758 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
1761 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
1764 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
1767 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
1769 $this->tpl->parseCurrentBlock();
1771 $this->tpl->setCurrentBlock(
"orcomposite_loop");
1773 $this->ctrl->setParameter($this,
'meta_index',$or_id);
1774 $this->ctrl->setParameter($this,
'meta_path',
'meta_or_composite');
1775 $this->ctrl->setParameter($this,
'meta_technical',$this->md_section->getMetaId());
1776 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1777 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1779 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_ORCOMPOSITE",$this->lng->txt(
'meta_or_composite'));
1780 $this->tpl->parseCurrentBlock();
1784 $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_INSTALLATIONREMARKS",$this->lng->txt(
'meta_installation_remarks'));
1785 $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1787 $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL",
ilUtil::prepareFormOutput($this->md_section->getInstallationRemarks()));
1788 $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL_LANGUAGE",
1790 $this->md_section->getInstallationRemarksLanguageCode()));
1793 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_OTHERPLATTFORMREQUIREMENTS",
1794 $this->lng->txt(
'meta_other_plattform_requirements'));
1795 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1797 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_VAL",
1799 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_VAL_LANGUAGE",
1801 $this->md_section->getOtherPlatformRequirementsLanguageCode()));
1804 $this->tpl->setVariable(
"DURATION_TXT_DURATION",$this->lng->txt(
'meta_duration'));
1807 $this->tpl->setCurrentBlock(
"technical");
1808 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1809 $this->tpl->parseCurrentBlock();
1816 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1818 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_lifecycle.html',
'Services/MetaData');
1821 $this->ctrl->setParameter($this,
"section",
"meta_lifecycle");
1822 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1824 $this->tpl->setCurrentBlock(
"no_lifecycle");
1825 $this->tpl->setVariable(
"TXT_NO_LIFECYCLE", $this->lng->txt(
"meta_no_lifecycle"));
1826 $this->tpl->setVariable(
"TXT_ADD_LIFECYCLE", $this->lng->txt(
"meta_add"));
1827 $this->tpl->setVariable(
"ACTION_ADD_LIFECYCLE",$this->ctrl->getLinkTarget($this,
"addSection"));
1828 $this->tpl->parseCurrentBlock();
1832 $this->ctrl->setReturn($this,
'listLifecycle');
1833 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
1835 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1836 $this->tpl->setVariable(
"TXT_LIFECYCLE",$this->lng->txt(
'meta_lifecycle'));
1839 $this->tpl->setVariable(
"ACTION_DELETE",
1840 $this->ctrl->getLinkTarget($this,
"deleteSection"));
1841 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
1847 $this->tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'meta_status'));
1850 array(0 => $this->lng->txt(
'meta_please_select'))));
1852 $this->tpl->setVariable(
"TXT_VERSION",$this->lng->txt(
'meta_version'));
1855 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1857 $this->md_section->getVersionLanguageCode()));
1860 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1862 $md_con = $this->md_section->getContribute($con_id);
1866 $this->ctrl->setParameter($this,
'meta_index',$con_id);
1867 $this->ctrl->setParameter($this,
'meta_path',
'meta_contribute');
1869 $this->tpl->setCurrentBlock(
"contribute_delete");
1870 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1871 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1872 $this->tpl->parseCurrentBlock();
1875 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1877 $md_ent = $md_con->getEntity($ent_id);
1879 $this->ctrl->setParameter($this,
'meta_path',
'meta_entity');
1881 if(count($ent_ids) > 1)
1883 $this->tpl->setCurrentBlock(
"contribute_entity_delete");
1885 $this->ctrl->setParameter($this,
'meta_index',$ent_id);
1886 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1887 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1888 $this->tpl->parseCurrentBlock();
1891 $this->tpl->setCurrentBlock(
"contribute_entity_loop");
1893 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
1894 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
1896 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt(
'meta_entity'));
1897 $this->tpl->parseCurrentBlock();
1899 $this->tpl->setCurrentBlock(
"contribute_loop");
1901 $this->ctrl->setParameter($this,
'section_element',
'meta_entity');
1902 $this->ctrl->setParameter($this,
'meta_index',$con_id);
1903 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,
'addSectionElement'));
1904 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD",
1905 $this->lng->txt(
'add').
" ".$this->lng->txt(
'meta_entity'));
1907 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
1908 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt(
'meta_contribute'));
1909 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt(
'meta_role'));
1911 "met_contribute[".$con_id.
"][Role]",
1912 array(0 => $this->lng->txt(
'meta_please_select'))));
1913 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt(
'meta_date'));
1914 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO",$con_id);
1917 $this->tpl->parseCurrentBlock();
1919 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1925 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1928 $this->md_section = $this->md_obj->getLifecycle();
1931 $this->md_section->setStatus(
$_POST[
'lif_status']);
1932 $this->md_section->update();
1935 if(is_array(
$_POST[
'met_identifier']))
1939 $md_ide = $this->md_section->getIdentifier($id);
1946 if(is_array(
$_POST[
'met_contribute']))
1950 $md_con =& $this->md_section->getContribute($id);
1955 if(is_array(
$_POST[
'met_entity'][$id]))
1957 foreach(
$_POST[
'met_entity'][$id] as $ent_id =>
$data)
1959 $md_ent =& $md_con->getEntity($ent_id);
1978 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1980 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_meta_metadata.html',
'Services/MetaData');
1983 $this->ctrl->setParameter($this,
"section",
"meta_meta_metadata");
1984 if(!is_object($this->md_section = $this->md_obj->getMetaMetadata()))
1986 $this->tpl->setCurrentBlock(
"no_meta_meta");
1987 $this->tpl->setVariable(
"TXT_NO_META_META", $this->lng->txt(
"meta_no_meta_metadata"));
1988 $this->tpl->setVariable(
"TXT_ADD_META_META", $this->lng->txt(
"meta_add"));
1989 $this->tpl->setVariable(
"ACTION_ADD_META_META",$this->ctrl->getLinkTarget($this,
"addSection"));
1990 $this->tpl->parseCurrentBlock();
1994 $this->ctrl->setReturn($this,
'listMetaMetaData');
1995 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
1997 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1998 $this->tpl->setVariable(
"TXT_META_METADATA",$this->lng->txt(
'meta_meta_metadata'));
2001 $this->tpl->setVariable(
"ACTION_DELETE",
2002 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2003 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
2008 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
2010 $this->tpl->setVariable(
"VAL_LANGUAGE",$this->
__showLanguageSelect(
'met_language',$this->md_section->getLanguageCode()));
2011 $this->tpl->setVariable(
"TXT_METADATASCHEME",$this->lng->txt(
'meta_metadatascheme'));
2012 $this->tpl->setVariable(
"VAL_METADATASCHEME",$this->md_section->getMetaDataScheme());
2016 foreach($ids = $this->md_section->getIdentifierIds() as $id)
2018 $md_ide = $this->md_section->getIdentifier($id);
2022 $this->ctrl->setParameter($this,
'meta_index',$id);
2023 $this->ctrl->setParameter($this,
'meta_path',
'meta_identifier');
2025 $this->tpl->setCurrentBlock(
"identifier_delete");
2026 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2027 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2028 $this->tpl->parseCurrentBlock();
2031 $this->tpl->setCurrentBlock(
"identifier_loop");
2032 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $id);
2033 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
2034 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
2035 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
2037 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
2038 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
2040 $this->tpl->parseCurrentBlock();
2044 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
2046 $md_con = $this->md_section->getContribute($con_id);
2050 $this->ctrl->setParameter($this,
'meta_index',$con_id);
2051 $this->ctrl->setParameter($this,
'meta_path',
'meta_contribute');
2053 $this->tpl->setCurrentBlock(
"contribute_delete");
2054 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2055 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2056 $this->tpl->parseCurrentBlock();
2059 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
2061 $md_ent = $md_con->getEntity($ent_id);
2063 $this->ctrl->setParameter($this,
'meta_path',
'meta_entity');
2065 if(count($ent_ids) > 1)
2067 $this->tpl->setCurrentBlock(
"contribute_entity_delete");
2069 $this->ctrl->setParameter($this,
'meta_index',$ent_id);
2070 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2071 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2072 $this->tpl->parseCurrentBlock();
2075 $this->tpl->setCurrentBlock(
"contribute_entity_loop");
2077 $this->ctrl->setParameter($this,
'section_element',
'meta_entity');
2078 $this->ctrl->setParameter($this,
'meta_index',$con_id);
2079 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,
'addSectionElement'));
2080 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD",$this->lng->txt(
'add'));
2083 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
2084 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
2086 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt(
'meta_entity'));
2087 $this->tpl->parseCurrentBlock();
2089 $this->tpl->setCurrentBlock(
"contribute_loop");
2090 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
2091 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt(
'meta_contribute'));
2092 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt(
'meta_role'));
2094 "met_contribute[".$con_id.
"][Role]",
2095 array(0 => $this->lng->txt(
'meta_please_select'))));
2096 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt(
'meta_date'));
2097 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO",$con_id);
2100 $this->tpl->parseCurrentBlock();
2102 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
2108 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2111 $this->md_section = $this->md_obj->getMetaMetadata();
2113 $this->md_section->update();
2116 if(is_array(
$_POST[
'met_identifier']))
2120 $md_ide = $this->md_section->getIdentifier($id);
2127 if(is_array(
$_POST[
'met_contribute']))
2131 $md_con =& $this->md_section->getContribute($id);
2136 if(is_array(
$_POST[
'met_entity'][$id]))
2138 foreach(
$_POST[
'met_entity'][$id] as $ent_id =>
$data)
2140 $md_ent =& $md_con->getEntity($ent_id);
2159 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2161 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_rights.html',
'Services/MetaData');
2163 if(!is_object($this->md_section = $this->md_obj->getRights()))
2165 $this->tpl->setCurrentBlock(
"no_rights");
2166 $this->tpl->setVariable(
"TXT_NO_RIGHTS", $this->lng->txt(
"meta_no_rights"));
2167 $this->tpl->setVariable(
"TXT_ADD_RIGHTS", $this->lng->txt(
"meta_add"));
2168 $this->ctrl->setParameter($this,
"section",
"meta_rights");
2169 $this->tpl->setVariable(
"ACTION_ADD_RIGHTS",
2170 $this->ctrl->getLinkTarget($this,
"addSection"));
2171 $this->tpl->parseCurrentBlock();
2176 $this->ctrl->setReturn($this,
'listRights');
2177 $this->ctrl->setParameter($this,
'section',
'meta_rights');
2178 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2180 $this->tpl->setVariable(
"TXT_RIGHTS", $this->lng->txt(
"meta_rights"));
2181 $this->tpl->setVariable(
"TXT_COST", $this->lng->txt(
"meta_cost"));
2182 $this->tpl->setVariable(
"TXT_COPYRIGHTANDOTHERRESTRICTIONS", $this->lng->txt(
"meta_copyright_and_other_restrictions"));
2183 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2184 $this->tpl->setVariable(
"TXT_YES", $this->lng->txt(
"meta_yes"));
2185 $this->tpl->setVariable(
"TXT_NO", $this->lng->txt(
"meta_no"));
2187 $this->ctrl->setParameter($this,
"section",
"meta_rights");
2188 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2189 $this->tpl->setVariable(
"ACTION_DELETE",
2190 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2192 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2194 $this->tpl->setVariable(
"VAL_COST_".strtoupper($this->md_section->getCosts()),
" selected");
2195 $this->tpl->setVariable(
"VAL_COPYRIGHTANDOTHERRESTRICTIONS_".
2196 strtoupper($this->md_section->getCopyrightAndOtherRestrictions()),
" selected");
2198 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2199 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2201 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2202 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2204 $this->md_section->getDescriptionLanguageCode()));
2206 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2208 $this->tpl->setCurrentBlock(
"rights");
2209 $this->tpl->parseCurrentBlock();
2216 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2219 $this->md_section = $this->md_obj->getRights();
2220 $this->md_section->setCosts(
$_POST[
'rights'][
'Cost']);
2221 $this->md_section->setCopyrightAndOtherRestrictions(
$_POST[
'rights'][
'CopyrightAndOtherRestrictions']);
2222 $this->md_section->setDescriptionLanguage(
new ilMDLanguageItem(
$_POST[
'rights'][
'DescriptionLanguage']));
2224 $this->md_section->update();
2236 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2238 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_educational.html',
'Services/MetaData');
2240 if(!is_object($this->md_section = $this->md_obj->getEducational()))
2242 $this->tpl->setCurrentBlock(
"no_educational");
2243 $this->tpl->setVariable(
"TXT_NO_EDUCATIONAL", $this->lng->txt(
"meta_no_educational"));
2244 $this->tpl->setVariable(
"TXT_ADD_EDUCATIONAL", $this->lng->txt(
"meta_add"));
2245 $this->ctrl->setParameter($this,
"section",
"meta_educational");
2246 $this->tpl->setVariable(
"ACTION_ADD_EDUCATIONAL",
2247 $this->ctrl->getLinkTarget($this,
"addSection"));
2248 $this->tpl->parseCurrentBlock();
2252 $this->ctrl->setReturn($this,
'listEducational');
2253 $this->ctrl->setParameter($this,
'section',
'meta_educational');
2254 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2256 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2257 $this->tpl->setVariable(
"ACTION_DELETE",
2258 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2260 $this->tpl->setVariable(
"TXT_EDUCATIONAL", $this->lng->txt(
"meta_educational"));
2261 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2262 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2263 $this->tpl->setVariable(
"TXT_TYPICALAGERANGE", $this->lng->txt(
"meta_typical_age_range"));
2264 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2265 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2266 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2267 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2269 $this->tpl->setVariable(
"TXT_INTERACTIVITYTYPE", $this->lng->txt(
"meta_interactivity_type"));
2270 $this->tpl->setVariable(
"TXT_LEARNINGRESOURCETYPE", $this->lng->txt(
"meta_learning_resource_type"));
2271 $this->tpl->setVariable(
"TXT_INTERACTIVITYLEVEL", $this->lng->txt(
"meta_interactivity_level"));
2272 $this->tpl->setVariable(
"TXT_SEMANTICDENSITY", $this->lng->txt(
"meta_semantic_density"));
2273 $this->tpl->setVariable(
"TXT_INTENDEDENDUSERROLE", $this->lng->txt(
"meta_intended_end_user_role"));
2274 $this->tpl->setVariable(
"TXT_CONTEXT", $this->lng->txt(
"meta_context"));
2275 $this->tpl->setVariable(
"TXT_DIFFICULTY", $this->lng->txt(
"meta_difficulty"));
2277 $this->tpl->setVariable(
"VAL_INTERACTIVITYTYPE_" . strtoupper($this->md_section->getInteractivityType()),
" selected");
2278 $this->tpl->setVariable(
"VAL_LEARNINGRESOURCETYPE_" . strtoupper($this->md_section->getLearningResourceType()),
" selected");
2279 $this->tpl->setVariable(
"VAL_INTERACTIVITYLEVEL_" . strtoupper($this->md_section->getInteractivityLevel()),
" selected");
2280 $this->tpl->setVariable(
"VAL_SEMANTICDENSITY_" . strtoupper($this->md_section->getSemanticDensity()),
" selected");
2281 $this->tpl->setVariable(
"VAL_INTENDEDENDUSERROLE_" . strtoupper($this->md_section->getIntendedEndUserRole()),
" selected");
2282 $this->tpl->setVariable(
"VAL_CONTEXT_" . strtoupper($this->md_section->getContext()),
" selected");
2283 $this->tpl->setVariable(
"VAL_DIFFICULTY_" . strtoupper($this->md_section->getDifficulty()),
" selected");
2284 #$this->tpl->setVariable("VAL_TYPICALLEARNINGTIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime()));
2286 $this->tpl->setVariable(
"TXT_ACTIVE", $this->lng->txt(
"meta_active"));
2287 $this->tpl->setVariable(
"TXT_EXPOSITIVE", $this->lng->txt(
"meta_expositive"));
2288 $this->tpl->setVariable(
"TXT_MIXED", $this->lng->txt(
"meta_mixed"));
2289 $this->tpl->setVariable(
"TXT_EXERCISE", $this->lng->txt(
"meta_exercise"));
2290 $this->tpl->setVariable(
"TXT_SIMULATION", $this->lng->txt(
"meta_simulation"));
2291 $this->tpl->setVariable(
"TXT_QUESTIONNAIRE", $this->lng->txt(
"meta_questionnaire"));
2292 $this->tpl->setVariable(
"TXT_DIAGRAMM", $this->lng->txt(
"meta_diagramm"));
2293 $this->tpl->setVariable(
"TXT_FIGURE", $this->lng->txt(
"meta_figure"));
2294 $this->tpl->setVariable(
"TXT_GRAPH", $this->lng->txt(
"meta_graph"));
2295 $this->tpl->setVariable(
"TXT_INDEX", $this->lng->txt(
"meta_index"));
2296 $this->tpl->setVariable(
"TXT_SLIDE", $this->lng->txt(
"meta_slide"));
2297 $this->tpl->setVariable(
"TXT_TABLE", $this->lng->txt(
"meta_table"));
2298 $this->tpl->setVariable(
"TXT_NARRATIVETEXT", $this->lng->txt(
"meta_narrative_text"));
2299 $this->tpl->setVariable(
"TXT_EXAM", $this->lng->txt(
"meta_exam"));
2300 $this->tpl->setVariable(
"TXT_EXPERIMENT", $this->lng->txt(
"meta_experiment"));
2301 $this->tpl->setVariable(
"TXT_PROBLEMSTATEMENT", $this->lng->txt(
"meta_problem_statement"));
2302 $this->tpl->setVariable(
"TXT_SELFASSESSMENT", $this->lng->txt(
"meta_self_assessment"));
2303 $this->tpl->setVariable(
"TXT_LECTURE", $this->lng->txt(
"meta_lecture"));
2304 $this->tpl->setVariable(
"TXT_VERYLOW", $this->lng->txt(
"meta_very_low"));
2305 $this->tpl->setVariable(
"TXT_LOW", $this->lng->txt(
"meta_low"));
2306 $this->tpl->setVariable(
"TXT_MEDIUM", $this->lng->txt(
"meta_medium"));
2307 $this->tpl->setVariable(
"TXT_HIGH", $this->lng->txt(
"meta_high"));
2308 $this->tpl->setVariable(
"TXT_VERYHIGH", $this->lng->txt(
"meta_very_high"));
2309 $this->tpl->setVariable(
"TXT_TEACHER", $this->lng->txt(
"meta_teacher"));
2310 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
2311 $this->tpl->setVariable(
"TXT_LEARNER", $this->lng->txt(
"meta_learner"));
2312 $this->tpl->setVariable(
"TXT_MANAGER", $this->lng->txt(
"meta_manager"));
2313 $this->tpl->setVariable(
"TXT_SCHOOL", $this->lng->txt(
"meta_school"));
2314 $this->tpl->setVariable(
"TXT_HIGHEREDUCATION", $this->lng->txt(
"meta_higher_education"));
2315 $this->tpl->setVariable(
"TXT_TRAINING", $this->lng->txt(
"meta_training"));
2316 $this->tpl->setVariable(
"TXT_OTHER", $this->lng->txt(
"meta_other"));
2317 $this->tpl->setVariable(
"TXT_VERYEASY", $this->lng->txt(
"meta_very_easy"));
2318 $this->tpl->setVariable(
"TXT_EASY", $this->lng->txt(
"meta_easy"));
2319 $this->tpl->setVariable(
"TXT_DIFFICULT", $this->lng->txt(
"meta_difficult"));
2320 $this->tpl->setVariable(
"TXT_VERYDIFFICULT", $this->lng->txt(
"meta_very_difficult"));
2321 $this->tpl->setVariable(
"TXT_TYPICALLEARNINGTIME", $this->lng->txt(
"meta_typical_learning_time"));
2325 $tlt = array(0,0,0,0,0);
2328 include_once
'Services/MetaData/classes/class.ilMDUtils.php';
2332 if(strlen($this->md_section->getTypicalLearningTime()))
2334 $tlt = array(0,0,0,0,0);
2339 $this->tpl->setVariable(
"TXT_MONTH",$this->lng->txt(
'md_months'));
2343 $this->tpl->setVariable(
"TXT_DAYS",$this->lng->txt(
'md_days'));
2344 $this->tpl->setVariable(
"TXT_TIME",$this->lng->txt(
'md_time'));
2346 $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME",$this->lng->txt(
'meta_typical_learning_time'));
2348 $tlt[2],$tlt[3],$tlt[4],
2350 $this->tpl->setVariable(
"TLT_HINT",$tlt[4] ?
'(hh:mm:ss)' :
'(hh:mm)');
2354 $this->tpl->setCurrentBlock(
"tlt_not_valid");
2355 $this->tpl->setVariable(
"TXT_CURRENT_VAL",$this->lng->txt(
'meta_current_value'));
2356 $this->tpl->setVariable(
"TLT",$this->md_section->getTypicalLearningTime());
2357 $this->tpl->setVariable(
"INFO_TLT_NOT_VALID",$this->lng->txt(
'meta_info_tlt_not_valid'));
2358 $this->tpl->parseCurrentBlock();
2364 foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
2366 $md_age = $this->md_section->getTypicalAgeRange($id);
2369 if (is_object($md_age))
2374 $this->tpl->setCurrentBlock(
"agerange_head");
2375 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_TYPICALAGERANGE",
2376 $this->lng->txt(
"meta_typical_age_range"));
2377 $this->tpl->setVariable(
"ROWSPAN_AGERANGE", count($ids));
2378 $this->tpl->parseCurrentBlock();
2383 $this->ctrl->setParameter($this,
'meta_index', $id);
2384 $this->ctrl->setParameter($this,
'meta_path',
'educational_typical_age_range');
2386 $this->tpl->setCurrentBlock(
"typicalagerange_delete");
2387 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_ACTION_DELETE",
2388 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2389 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2390 $this->tpl->parseCurrentBlock();
2392 $this->tpl->setCurrentBlock(
"typicalagerange_loop");
2393 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2395 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_NO", $id);
2396 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2397 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_VAL_LANGUAGE",
2399 $md_age->getTypicalAgeRangeLanguageCode()));
2400 $this->ctrl->setParameter($this,
"section_element",
"educational_typical_age_range");
2401 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_ACTION_ADD",
2402 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2403 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2404 $this->tpl->parseCurrentBlock();
2410 foreach($ids = $this->md_section->getDescriptionIds() as $id)
2414 $this->tpl->setCurrentBlock(
"desc_head");
2415 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2416 $this->tpl->setVariable(
"ROWSPAN_DESC", count($ids));
2417 $this->tpl->parseCurrentBlock();
2421 $md_des = $this->md_section->getDescription($id);
2423 $this->ctrl->setParameter($this,
'meta_index', $id);
2424 $this->ctrl->setParameter($this,
'meta_path',
'educational_description');
2426 $this->tpl->setCurrentBlock(
"description_loop");
2427 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $id);
2428 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2430 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2431 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2433 $md_des->getDescriptionLanguageCode()));
2434 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",
2435 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2436 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2437 $this->ctrl->setParameter($this,
"section_element",
"educational_description");
2438 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_ADD",
2439 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2440 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2441 $this->tpl->parseCurrentBlock();
2447 foreach($ids = $this->md_section->getLanguageIds() as $id)
2451 $this->tpl->setCurrentBlock(
"language_head");
2452 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2453 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
2454 $this->tpl->parseCurrentBlock();
2458 $md_lang = $this->md_section->getLanguage($id);
2460 $this->ctrl->setParameter($this,
'meta_index', $id);
2461 $this->ctrl->setParameter($this,
'meta_path',
'educational_language');
2463 $this->tpl->setCurrentBlock(
"language_loop");
2464 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE",
2466 $md_lang->getLanguageCode()));
2468 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",
2469 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2470 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2471 $this->ctrl->setParameter($this,
"section_element",
"educational_language");
2472 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_ADD",
2473 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2474 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2475 $this->tpl->parseCurrentBlock();
2479 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2481 $this->tpl->setCurrentBlock(
"educational");
2482 $this->tpl->parseCurrentBlock();
2488 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2491 $this->md_section = $this->md_obj->getEducational();
2492 $this->md_section->setInteractivityType(
$_POST[
'educational'][
'InteractivityType']);
2493 $this->md_section->setLearningResourceType(
$_POST[
'educational'][
'LearningResourceType']);
2494 $this->md_section->setInteractivityLevel(
$_POST[
'educational'][
'InteractivityLevel']);
2495 $this->md_section->setSemanticDensity(
$_POST[
'educational'][
'SemanticDensity']);
2496 $this->md_section->setIntendedEndUserRole(
$_POST[
'educational'][
'IntendedEndUserRole']);
2497 $this->md_section->setContext(
$_POST[
'educational'][
'Context']);
2498 $this->md_section->setDifficulty(
$_POST[
'educational'][
'Difficulty']);
2506 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
2507 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
2511 $this->md_section->setTypicalLearningTime(
'');
2517 foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
2519 $md_age = $this->md_section->getTypicalAgeRange($id);
2520 $md_age->setTypicalAgeRange(
ilUtil::stripSlashes($_POST[
'educational'][
'TypicalAgeRange'][$id][
'Value']));
2521 $md_age->setTypicalAgeRangeLanguage(
2522 new ilMDLanguageItem($_POST[
'educational'][
'TypicalAgeRange'][$id][
'Language']));
2527 foreach($ids = $this->md_section->getDescriptionIds() as $id)
2529 $md_des = $this->md_section->getDescription($id);
2530 $md_des->setDescription(
ilUtil::stripSlashes($_POST[
'educational'][
'Description'][$id][
'Value']));
2531 $md_des->setDescriptionLanguage(
2532 new ilMDLanguageItem($_POST[
'educational'][
'Description'][$id][
'Language']));
2537 foreach($ids = $this->md_section->getLanguageIds() as $id)
2539 $md_lang = $this->md_section->getLanguage($id);
2540 $md_lang->setLanguage(
2545 $this->md_section->update();
2557 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2559 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_relation.html',
'Services/MetaData');
2561 $rel_ids = $this->md_obj->getRelationIds();
2562 if (!is_array($rel_ids) || count($rel_ids) == 0)
2564 $this->tpl->setCurrentBlock(
"no_relation");
2565 $this->tpl->setVariable(
"TXT_NO_RELATION", $this->lng->txt(
"meta_no_relation"));
2566 $this->tpl->setVariable(
"TXT_ADD_RELATION", $this->lng->txt(
"meta_add"));
2567 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2568 $this->tpl->setVariable(
"ACTION_ADD_RELATION",
2569 $this->ctrl->getLinkTarget($this,
"addSection"));
2570 $this->tpl->parseCurrentBlock();
2574 foreach($rel_ids as $rel_id)
2576 $this->md_section = $this->md_obj->getRelation($rel_id);
2578 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2579 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2582 $res_ids = $this->md_section->getIdentifier_Ids();
2583 foreach ($res_ids as $res_id)
2585 $ident = $this->md_section->getIdentifier_($res_id);
2586 $this->ctrl->setParameter($this,
"meta_index", $res_id);
2588 if (count($res_ids) > 1)
2590 $this->tpl->setCurrentBlock(
"identifier_delete");
2591 $this->ctrl->setParameter($this,
"meta_path",
"relation_resource_identifier");
2592 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",
2593 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2594 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2595 $this->tpl->parseCurrentBlock();
2598 $this->tpl->setCurrentBlock(
"identifier_loop");
2600 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $res_id);
2601 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
2602 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2603 $this->ctrl->setParameter($this,
"section_element",
"relation_resource_identifier");
2604 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_ADD",
2605 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2606 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2607 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
2608 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
2609 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_CATALOG",
2611 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_ENTRY",
2613 $this->tpl->parseCurrentBlock();
2617 $res_dess = $this->md_section->getDescriptionIds();
2618 foreach ($res_dess as $res_des)
2620 $des = $this->md_section->getDescription($res_des);
2621 $this->ctrl->setParameter($this,
"meta_index", $res_des);
2623 if (count($res_dess) > 1)
2625 $this->tpl->setCurrentBlock(
"description_delete");
2626 $this->ctrl->setParameter($this,
"meta_path",
"relation_resource_description");
2627 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",
2628 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2629 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2630 $this->tpl->parseCurrentBlock();
2633 $this->tpl->setCurrentBlock(
"description_loop");
2634 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $res_des);
2635 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2636 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2637 $this->ctrl->setParameter($this,
"section_element",
"relation_resource_description");
2638 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_ADD",
2639 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2640 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2641 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2642 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2643 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL",
2645 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2647 $des->getDescriptionLanguageCode()));
2648 $this->tpl->parseCurrentBlock();
2651 $this->tpl->setCurrentBlock(
"relation_loop");
2652 $this->tpl->setVariable(
"REL_ID", $rel_id);
2653 $this->tpl->setVariable(
"TXT_RELATION", $this->lng->txt(
"meta_relation"));
2654 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2655 $this->tpl->setVariable(
"ACTION_DELETE",
2656 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2657 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2658 $this->tpl->setVariable(
"ACTION_ADD",
2659 $this->ctrl->getLinkTarget($this,
"addSection"));
2660 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2661 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2662 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2663 $this->tpl->setVariable(
"TXT_KIND", $this->lng->txt(
"meta_kind"));
2664 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2665 $this->tpl->setVariable(
"TXT_ISPARTOF", $this->lng->txt(
"meta_is_part_of"));
2666 $this->tpl->setVariable(
"TXT_HASPART", $this->lng->txt(
"meta_has_part"));
2667 $this->tpl->setVariable(
"TXT_ISVERSIONOF", $this->lng->txt(
"meta_is_version_of"));
2668 $this->tpl->setVariable(
"TXT_HASVERSION", $this->lng->txt(
"meta_has_version"));
2669 $this->tpl->setVariable(
"TXT_ISFORMATOF", $this->lng->txt(
"meta_is_format_of"));
2670 $this->tpl->setVariable(
"TXT_HASFORMAT", $this->lng->txt(
"meta_has_format"));
2671 $this->tpl->setVariable(
"TXT_REFERENCES", $this->lng->txt(
"meta_references"));
2672 $this->tpl->setVariable(
"TXT_ISREFERENCEDBY", $this->lng->txt(
"meta_is_referenced_by"));
2673 $this->tpl->setVariable(
"TXT_ISBASEDON", $this->lng->txt(
"meta_is_based_on"));
2674 $this->tpl->setVariable(
"TXT_ISBASISFOR", $this->lng->txt(
"meta_is_basis_for"));
2675 $this->tpl->setVariable(
"TXT_REQUIRES", $this->lng->txt(
"meta_requires"));
2676 $this->tpl->setVariable(
"TXT_ISREQUIREDBY", $this->lng->txt(
"meta_is_required_by"));
2677 $this->tpl->setVariable(
"TXT_RESOURCE", $this->lng->txt(
"meta_resource"));
2678 $this->tpl->setVariable(
"VAL_KIND_" . strtoupper($this->md_section->getKind()),
" selected");
2679 $this->tpl->parseCurrentBlock();
2682 $this->tpl->setCurrentBlock(
"relation");
2683 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2684 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2685 $this->tpl->parseCurrentBlock();
2691 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2694 foreach($ids = $this->md_obj->getRelationIds() as $id)
2697 $relation = $this->md_obj->getRelation($id);
2698 $relation->setKind(
$_POST[
'relation'][$id][
'Kind']);
2700 $relation->update();
2703 $res_idents = $relation->getIdentifier_Ids();
2704 foreach ($res_idents as $res_id)
2706 $ident = $relation->getIdentifier_($res_id);
2713 $res_dess = $relation->getDescriptionIds();
2714 foreach ($res_dess as $res_des)
2716 $des = $relation->getDescription($res_des);
2718 $des->setDescriptionLanguage(
2734 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2736 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_annotation.html',
'Services/MetaData');
2738 $anno_ids = $this->md_obj->getAnnotationIds();
2739 if (!is_array($anno_ids) || count($anno_ids) == 0)
2741 $this->tpl->setCurrentBlock(
"no_annotation");
2742 $this->tpl->setVariable(
"TXT_NO_ANNOTATION", $this->lng->txt(
"meta_no_annotation"));
2743 $this->tpl->setVariable(
"TXT_ADD_ANNOTATION", $this->lng->txt(
"meta_add"));
2744 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2745 $this->tpl->setVariable(
"ACTION_ADD_ANNOTATION",
2746 $this->ctrl->getLinkTarget($this,
"addSection"));
2747 $this->tpl->parseCurrentBlock();
2751 foreach($anno_ids as $anno_id)
2753 $this->ctrl->setParameter($this,
'meta_index', $anno_id);
2754 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2756 $this->md_section = $this->md_obj->getAnnotation($anno_id);
2758 $this->tpl->setCurrentBlock(
"annotation_loop");
2759 $this->tpl->setVariable(
"ANNOTATION_ID", $anno_id);
2760 $this->tpl->setVariable(
"TXT_ANNOTATION", $this->lng->txt(
"meta_annotation"));
2761 $this->ctrl->setParameter($this,
"meta_index", $anno_id);
2762 $this->tpl->setVariable(
"ACTION_DELETE",
2763 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2764 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2765 $this->tpl->setVariable(
"ACTION_ADD",
2766 $this->ctrl->getLinkTarget($this,
"addSection"));
2767 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2768 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2770 $this->tpl->setVariable(
"TXT_ENTITY", $this->lng->txt(
"meta_entity"));
2772 $this->tpl->setVariable(
"TXT_DATE", $this->lng->txt(
"meta_date"));
2776 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2777 $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
2779 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2780 $this->tpl->setVariable(
"VAL_DESCRIPTION_LANGUAGE",
2782 $this->md_section->getDescriptionLanguageCode()));
2784 $this->tpl->parseCurrentBlock();
2787 $this->tpl->setCurrentBlock(
"annotation");
2788 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2789 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2790 $this->tpl->parseCurrentBlock();
2796 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2799 foreach($ids = $this->md_obj->getAnnotationIds() as $id)
2802 $annotation = $this->md_obj->getAnnotation($id);
2806 $annotation->setDescriptionLanguage(
2809 $annotation->update();
2822 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2823 $this->
__setTabs(
'meta_classification');
2824 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_classification.html',
'Services/MetaData');
2826 $class_ids = $this->md_obj->getClassificationIds();
2827 if (!is_array($class_ids) || count($class_ids) == 0)
2829 $this->tpl->setCurrentBlock(
"no_classification");
2830 $this->tpl->setVariable(
"TXT_NO_CLASSIFICATION", $this->lng->txt(
"meta_no_classification"));
2831 $this->tpl->setVariable(
"TXT_ADD_CLASSIFICATION", $this->lng->txt(
"meta_add"));
2832 $this->ctrl->setParameter($this,
"section",
"meta_classification");
2833 $this->tpl->setVariable(
"ACTION_ADD_CLASSIFICATION",
2834 $this->ctrl->getLinkTarget($this,
"addSection"));
2835 $this->tpl->parseCurrentBlock();
2839 foreach($class_ids as $class_id)
2841 $this->md_section = $this->md_obj->getClassification($class_id);
2842 $this->ctrl->setParameter($this,
"section",
"meta_classification");
2845 $tp_ids = $this->md_section->getTaxonPathIds();
2846 foreach ($tp_ids as $tp_id)
2848 $tax_path = $this->md_section->getTaxonPath($tp_id);
2850 $tax_ids = $tax_path->getTaxonIds();
2852 foreach($tax_ids as $tax_id)
2854 $taxon = $tax_path->getTaxon($tax_id);
2856 if (count($tax_ids) > 1)
2858 $this->tpl->setCurrentBlock(
"taxon_delete");
2859 $this->ctrl->setParameter($this,
"meta_index", $tax_id);
2860 $this->ctrl->setParameter($this,
"meta_path",
"classification_taxon");
2861 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_ACTION_DELETE",
2862 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2863 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2864 $this->tpl->parseCurrentBlock();
2867 $this->tpl->setCurrentBlock(
"taxonpath_taxon_loop");
2868 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_NO", $tax_id);
2869 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TAXONPATH_NO", $tp_id);
2870 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_TAXON", $this->lng->txt(
"meta_taxon"));
2871 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2873 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ID", $this->lng->txt(
"meta_id"));
2875 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2876 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_VAL_TAXON_LANGUAGE",
2878 $taxon->getTaxonLanguageCode()));
2880 $this->ctrl->setParameter($this,
"section_element",
"Taxon_".$class_id);
2881 $this->ctrl->setParameter($this,
"meta_index", $tp_id);
2882 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_ACTION_ADD",
2883 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2884 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2885 $this->tpl->parseCurrentBlock();
2888 if (count($tp_ids) > 1)
2890 $this->tpl->setCurrentBlock(
"taxonpath_delete");
2891 $this->ctrl->setParameter($this,
"meta_index", $tp_id);
2892 $this->ctrl->setParameter($this,
"meta_path",
"classification_taxon_path");
2893 $this->tpl->setVariable(
"TAXONPATH_LOOP_ACTION_DELETE",
2894 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2895 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2896 $this->tpl->parseCurrentBlock();
2899 $this->tpl->setCurrentBlock(
"taxonpath_loop");
2900 $this->tpl->setVariable(
"TAXONPATH_LOOP_NO", $tp_id);
2901 $this->tpl->setVariable(
"TAXONPATH_LOOP_ROWSPAN", (3 * count($tax_ids)) + 2);
2902 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
2903 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_SOURCE", $this->lng->txt(
"meta_source"));
2904 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2905 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2907 $this->tpl->setVariable(
"TAXONPATH_LOOP_VAL_SOURCE_LANGUAGE",
2909 $tax_path->getSourceLanguageCode()));
2910 $this->ctrl->setParameter($this,
"section_element",
"TaxonPath_".$class_id);
2911 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2912 $this->tpl->setVariable(
"TAXONPATH_LOOP_ACTION_ADD",
2913 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2914 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2915 $this->tpl->parseCurrentBlock();
2919 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2920 $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
2921 $this->tpl->setVariable(
"VAL_DESCRIPTION",
2923 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2924 $this->tpl->setVariable(
"VAL_DESCRIPTION_LANGUAGE",
2926 $this->md_section->getDescriptionLanguageCode()));
2929 $key_ids = $this->md_section->getKeywordIds();
2930 foreach ($key_ids as $key_id)
2932 if (count($key_ids) > 1)
2934 $this->ctrl->setParameter($this,
"meta_index", $key_id);
2935 $this->ctrl->setParameter($this,
"meta_path",
"classification_keyword");
2936 $this->tpl->setCurrentBlock(
"keyword_delete");
2937 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE",
2938 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2939 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2940 $this->tpl->parseCurrentBlock();
2943 $keyword = $this->md_section->getKeyword($key_id);
2944 $this->tpl->setCurrentBlock(
"keyword_loop");
2945 $this->tpl->setVariable(
"KEYWORD_LOOP_NO", $key_id);
2946 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
2947 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2948 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL",
2950 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2951 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE",
2953 $keyword->getKeywordLanguageCode()));
2954 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2955 $this->ctrl->setParameter($this,
"section_element",
"Keyword_".$class_id);
2956 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_ADD",
2957 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2958 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2959 $this->tpl->parseCurrentBlock();
2962 $this->tpl->setCurrentBlock(
"classification_loop");
2963 $this->tpl->setVariable(
"TXT_CLASSIFICATION", $this->lng->txt(
"meta_classification"));
2964 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2965 $this->tpl->setVariable(
"ACTION_DELETE",
2966 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2967 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2968 $this->tpl->setVariable(
"ACTION_ADD",
2969 $this->ctrl->getLinkTarget($this,
"addSection"));
2970 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2972 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2973 $this->tpl->setVariable(
"TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
2974 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
2975 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2977 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2978 $this->tpl->setVariable(
"CLASS_ID", $class_id);
2979 $this->tpl->setVariable(
"TXT_PURPOSE", $this->lng->txt(
"meta_purpose"));
2980 $this->tpl->setVariable(
"TXT_DISCIPLINE", $this->lng->txt(
"meta_learning_resource_type"));
2981 $this->tpl->setVariable(
"TXT_IDEA", $this->lng->txt(
"meta_idea"));
2982 $this->tpl->setVariable(
"TXT_PREREQUISITE", $this->lng->txt(
"meta_prerequisite"));
2983 $this->tpl->setVariable(
"TXT_EDUCATIONALOBJECTIVE", $this->lng->txt(
"meta_educational_objective"));
2984 $this->tpl->setVariable(
"TXT_ACCESSIBILITYRESTRICTIONS", $this->lng->txt(
"meta_accessibility_restrictions"));
2985 $this->tpl->setVariable(
"TXT_EDUCATIONALLEVEL", $this->lng->txt(
"meta_educational_level"));
2986 $this->tpl->setVariable(
"TXT_SKILLLEVEL", $this->lng->txt(
"meta_skill_level"));
2987 $this->tpl->setVariable(
"TXT_SECURITYLEVEL", $this->lng->txt(
"meta_security_level"));
2988 $this->tpl->setVariable(
"TXT_COMPETENCY", $this->lng->txt(
"meta_competency"));
2989 $this->tpl->setVariable(
"VAL_PURPOSE_" . strtoupper($this->md_section->getPurpose()),
" selected");
2990 $this->tpl->parseCurrentBlock();
2993 $this->tpl->setCurrentBlock(
"classification");
2994 $this->tpl->setVariable(
"EDIT_ACTION",
2995 $this->ctrl->getFormAction($this));
2996 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2997 $this->tpl->parseCurrentBlock();
3003 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
3006 foreach($ids = $this->md_obj->getClassificationIds() as $id)
3009 $classification = $this->md_obj->getClassification($id);
3010 $classification->setPurpose(
$_POST[
'classification'][$id][
'Purpose']);
3013 $classification->setDescriptionLanguage(
3016 $classification->update();
3018 $key_ids = $classification->getKeywordIds();
3019 foreach ($key_ids as $key_id)
3021 $keyword = $classification->getKeyword($key_id);
3023 $keyword->setKeywordLanguage(
3028 $tp_ids = $classification->getTaxonPathIds();
3029 foreach ($tp_ids as $tp_id)
3031 $tax_path = $classification->getTaxonPath($tp_id);
3033 $tax_path->setSourceLanguage(
3035 $tax_path->update();
3037 $tax_ids = $tax_path->getTaxonIds();
3039 foreach($tax_ids as $tax_id)
3041 $taxon = $tax_path->getTaxon($tax_id);
3043 $taxon->setTaxonLanguage(
3060 include_once
'Services/MetaData/classes/class.ilMDFactory.php';
3063 $md_element->delete();
3072 include_once
'Services/MetaData/classes/class.ilMDFactory.php';
3075 $md_element->delete();
3085 switch(
$_GET[
'section'])
3087 case 'meta_technical':
3088 $this->md_section =& $this->md_obj->addTechnical();
3089 $this->md_section->save();
3093 case 'meta_lifecycle':
3094 $this->md_section =& $this->md_obj->addLifecycle();
3095 $this->md_section->save();
3096 $con =& $this->md_section->addContribute();
3099 $ent =& $con->addEntity();
3103 case 'meta_meta_metadata':
3104 $this->md_section = $this->md_obj->addMetaMetadata();
3105 $this->md_section->save();
3107 $ide =& $this->md_section->addIdentifier();
3110 $con =& $this->md_section->addContribute();
3113 $ent =& $con->addEntity();
3118 $this->md_section = $this->md_obj->addRights();
3119 $this->md_section->save();
3122 case 'meta_educational':
3123 $this->md_section = $this->md_obj->addEducational();
3124 $this->md_section->save();
3127 case 'meta_relation':
3128 $this->md_section = $this->md_obj->addRelation();
3129 $this->md_section->save();
3130 $ident = $this->md_section->addIdentifier_();
3132 $des = $this->md_section->addDescription();
3136 case 'meta_annotation':
3137 $this->md_section = $this->md_obj->addAnnotation();
3138 $this->md_section->save();
3141 case 'meta_classification':
3142 $this->md_section = $this->md_obj->addClassification();
3143 $this->md_section->save();
3145 $taxon_path =& $this->md_section->addTaxonPath();
3146 $taxon_path->save();
3148 $taxon =& $taxon_path->addTaxon();
3151 $key =& $this->md_section->addKeyword();
3163 $section_element = (empty(
$_POST[
'section_element']))
3164 ?
$_GET[
'section_element']
3165 :
$_POST[
'section_element'];
3169 switch(
$_GET[
'section'])
3171 case 'meta_technical':
3172 $this->md_section =& $this->md_obj->getTechnical();
3175 case 'meta_lifecycle':
3176 $this->md_section =& $this->md_obj->getLifecycle();
3179 case 'meta_meta_metadata':
3180 $this->md_section =& $this->md_obj->getMetaMetadata();
3183 case 'meta_general':
3184 $this->md_section = $this->md_obj->getGeneral();
3187 case 'meta_educational':
3188 $this->md_section = $this->md_obj->getEducational();
3191 case 'meta_classification':
3192 $arr = explode(
"_", $section_element);
3193 $section_element = $arr[0];
3194 $this->md_section = $this->md_obj->getClassification($arr[1]);
3199 switch($section_element)
3201 case 'meta_or_composite':
3202 $md_new =& $this->md_section->addOrComposite();
3203 $md_new = $md_new->addRequirement();
3206 case 'meta_requirement':
3207 $md_new =& $this->md_section->addRequirement();
3210 case 'meta_location':
3211 $md_new =& $this->md_section->addLocation();
3215 $md_new = $this->md_section->addFormat();
3219 $md_new = $this->md_section->getContribute((
int)
$_GET[
'meta_index']);
3220 $md_new = $md_new->addEntity();
3223 case 'meta_identifier':
3224 $md_new = $this->md_section->addIdentifier();
3227 case 'meta_contribute':
3228 $md_new =& $this->md_section->addContribute();
3230 $md_new = $md_new->addEntity();
3233 case 'educational_language':
3234 case 'meta_language':
3235 $md_new = $this->md_section->addLanguage();
3238 case 'educational_description':
3239 case 'meta_description':
3240 $md_new = $this->md_section->addDescription();
3244 case 'meta_keyword':
3245 $md_new = $this->md_section->addKeyword();
3248 case 'educational_typical_age_range':
3249 $md_new = $this->md_section->addTypicalAgeRange();
3252 case 'relation_resource_identifier':
3253 $rel = $this->md_obj->getRelation($_GET[
'meta_index']);
3254 $md_new = $rel->addIdentifier_();
3257 case 'relation_resource_description':
3258 $rel = $this->md_obj->getRelation($_GET[
'meta_index']);
3259 $md_new = $rel->addDescription();
3263 $md_new = $this->md_section->addTaxonPath();
3265 $md_new = $md_new->addTaxon();
3269 $tax_path = $this->md_section->getTaxonPath($_GET[
'meta_index']);
3270 $md_new = $tax_path->addTaxon();
3285 case 'meta_general':
3288 case 'meta_lifecycle':
3291 case 'meta_technical':
3294 case 'meta_meta_metadata':
3295 return $this->listMetaMetadata();
3298 return $this->
debug();
3303 case 'meta_educational':
3306 case 'meta_relation':
3309 case 'meta_annotation':
3312 case 'meta_classification':
3316 if($this->md_obj->obj_type==
'sahs'||$this->md_obj->obj_type==
'sco')
3327 if(count($subs = $this->md_section->getPossibleSubelements()))
3331 $this->tpl->setCurrentBlock(
"subelements");
3332 $this->tpl->setVariable(
"SEL_SUBELEMENTS",
ilUtil::formSelect(
'',
'section_element',$subs));
3333 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
3334 $this->tpl->parseCurrentBlock();
3336 $this->tpl->setVariable(
"TXT_ADD",$this->lng->txt(
'meta_add'));
3346 $tabs = array(
'meta_quickedit' =>
'listQuickEdit',
3347 'meta_general' =>
'listGeneral',
3348 'meta_lifecycle' =>
'listLifecycle',
3349 'meta_meta_metadata' =>
'listMetaMetadata',
3350 'meta_technical' =>
'listTechnical',
3351 'meta_educational' =>
'listEducational',
3352 'meta_rights' =>
'listRights',
3353 'meta_relation' =>
'listRelation',
3354 'meta_annotation' =>
'listAnnotation',
3355 'meta_classification' =>
'listClassification');
3359 $tabs[
'debug'] =
'debug';
3362 foreach($tabs as $key => $target)
3364 if($a_active == $key)
3372 $this->ctrl->setParameter($this,
'section',$key);
3373 $this->tabs_gui->addSubTabTarget($key, $this->ctrl->getLinkTarget($this,
'listSection'),
3374 "",
"",
"", $active);
3376 #$this->tpl->setVariable("SUB_TABS", $tab_gui->getHTML());
3386 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
3389 "Services/MetaData");
3393 $tpl->setCurrentBlock(
"lg_option");
3394 $tpl->setVariable(
"VAL_LG", $code);
3395 $tpl->setVariable(
"TXT_LG", $text);
3397 if ($a_value !=
"" &&
3400 $tpl->setVariable(
"SELECTED",
"selected");
3403 $tpl->parseCurrentBlock();
3405 $tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
3406 $tpl->setVariable(
"SEL_NAME", $a_name);
3408 $return =
$tpl->get();
3416 for($i = 0;$i <= 24;$i++)
3418 $options[$i] = sprintf(
'%02d',$i);
3426 for($i = 0;$i <= 31;$i++)
3428 $options[$i] = sprintf(
'%02d',$i);
3438 $this->observers[$a_element][
'class'] =& $a_class;
3439 $this->observers[$a_element][
'method'] =& $a_method;
3445 if(isset($this->observers[$a_element]))
3447 $class =& $this->observers[$a_element][
'class'];
3448 $method = $this->observers[$a_element][
'method'];
3450 return $class->$method($a_element);