14 include_once
'Services/MetaData/classes/class.ilMD.php';
15 include_once
'Services/MetaData/classes/class.ilMDUtilSelect.php';
17 define(
'IL_TLT_MAX_HOURS',99);
37 $this->md_obj =&
new ilMD($a_rbac_id,$a_obj_id,$a_obj_type);
41 $this->lng->loadLanguageModule(
'meta');
43 include_once(
'Services/MetaData/classes/class.ilMDSettings.php');
48 $this->tabs_gui =& $ilTabs;
56 $next_class = $this->ctrl->getNextClass($this);
58 $cmd = $this->ctrl->getCmd();
61 case 'ilformpropertydispatchgui':
63 include_once
'./Services/Form/classes/class.ilFormPropertyDispatchGUI.php';
66 $item = $this->getFilterItemByPostVar(
$_GET[
"postvar"]);
67 $form_prop_dispatch->setItem($item);
68 return $this->ctrl->forwardCommand($form_prop_dispatch);
84 include_once
'Services/MetaData/classes/class.ilMD2XML.php';
87 $xml_writer =&
new ilMD2XML($this->md_obj->getRBACId(),$this->md_obj->getObjId(),$this->md_obj->getObjType());
90 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
94 $this->tpl->setVariable(
"MD_CONTENT",htmlentities($xml_writer->getXML()));
105 if(!is_object($this->md_section = $this->md_obj->getGeneral()))
107 $this->md_section = $this->md_obj->addGeneral();
108 $this->md_section->save();
111 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
115 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_quick_edit_scorm.html',
'Services/MetaData');
117 $this->ctrl->setReturn($this,
'listGeneral');
118 $this->ctrl->setParameter($this,
'section',
'meta_general');
119 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
121 $this->tpl->setVariable(
"TXT_QUICK_EDIT", $this->lng->txt(
"meta_quickedit"));
122 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
123 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
124 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
125 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
129 foreach($ids = $this->md_section->getLanguageIds() as $id)
131 $md_lan = $this->md_section->getLanguage($id);
135 $this->tpl->setCurrentBlock(
"language_head");
136 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
137 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
138 $this->tpl->parseCurrentBlock();
144 $this->ctrl->setParameter($this,
'meta_index',$id);
145 $this->ctrl->setParameter($this,
'meta_path',
'meta_language');
147 $this->tpl->setCurrentBlock(
"language_delete");
148 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
149 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
150 $this->tpl->parseCurrentBlock();
152 $this->tpl->setCurrentBlock(
"language_loop");
153 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
'gen_language['.$id.
'][language]',
154 $md_lan->getLanguageCode()));
155 $this->tpl->parseCurrentBlock();
160 $this->tpl->setCurrentBlock(
"language_head");
161 $this->tpl->setVariable(
"ROWSPAN_LANG", 1);
162 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
163 $this->tpl->parseCurrentBlock();
164 $this->tpl->setCurrentBlock(
"language_loop");
165 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
'gen_language[][language]',
167 $this->tpl->parseCurrentBlock();
171 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
174 $this->md_section->getTitleLanguageCode()));
177 foreach($ids = $this->md_section->getDescriptionIds() as $id)
179 $md_des = $this->md_section->getDescription($id);
183 $this->ctrl->setParameter($this,
'meta_index',$id);
184 $this->ctrl->setParameter($this,
'meta_path',
'meta_description');
186 $this->tpl->setCurrentBlock(
"description_delete");
187 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
188 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
189 $this->tpl->parseCurrentBlock();
192 $this->tpl->setCurrentBlock(
"description_loop");
193 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO",$id);
194 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
195 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
197 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
198 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_description[".$id.
'][language]',
199 $md_des->getDescriptionLanguageCode()));
200 $this->tpl->parseCurrentBlock();
206 foreach($ids = $this->md_section->getKeywordIds() as $id)
208 $md_key = $this->md_section->getKeyword($id);
209 $keywords[$md_key->getKeywordLanguageCode()][]
210 = $md_key->getKeyword();
213 foreach($keywords as
$lang => $keyword_set)
217 $this->tpl->setCurrentBlock(
"keyword_head");
218 $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($keywords));
219 $this->tpl->setVariable(
"TXT_COMMA_SEP2",$this->lng->txt(
'comma_separated'));
220 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"keywords"));
221 $this->tpl->parseCurrentBlock();
225 $this->tpl->setCurrentBlock(
"keyword_loop");
227 implode($keyword_set,
", ")));
228 $this->tpl->setVariable(
"LANG",
$lang);
229 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"keyword[language][$lang]",
231 $this->tpl->parseCurrentBlock();
234 if (count($keywords) == 0)
236 $this->tpl->setCurrentBlock(
"keyword_head");
237 $this->tpl->setVariable(
"ROWSPAN_KEYWORD", 1);
238 $this->tpl->setVariable(
"TXT_COMMA_SEP2",$this->lng->txt(
'comma_separated'));
239 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"keywords"));
240 $this->tpl->parseCurrentBlock();
241 $this->tpl->setCurrentBlock(
"keyword_loop");
242 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"keyword[language][$lang]",
248 $this->tpl->setVariable(
"TXT_EXPERTS",$lng->txt(
'meta_subjectmatterexpert'));
249 $this->tpl->setVariable(
"TXT_COMMA_SEP",$this->lng->txt(
'comma_separated'));
250 $this->tpl->setVariable(
"TXT_SCOPROP_EXPERT",$this->lng->txt(
'sco_propagate'));
251 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
253 $sep = $ent_str =
"";
254 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
256 $md_con = $this->md_section->getContribute($con_id);
257 if ($md_con->getRole() ==
"SubjectMatterExpert")
259 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
261 $md_ent = $md_con->getEntity($ent_id);
262 $ent_str = $ent_str.$sep.$md_ent->getEntity();
270 $this->tpl->setVariable(
"TXT_DESIGNERS",$lng->txt(
'meta_instructionaldesigner'));
271 $this->tpl->setVariable(
"TXT_SCOPROP_DESIGNERS",$this->lng->txt(
'sco_propagate'));
272 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
274 $sep = $ent_str =
"";
275 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
277 $md_con = $this->md_section->getContribute($con_id);
278 if ($md_con->getRole() ==
"InstructionalDesigner")
280 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
282 $md_ent = $md_con->getEntity($ent_id);
283 $ent_str = $ent_str.$sep.$md_ent->getEntity();
291 $this->tpl->setVariable(
"TXT_POC",$lng->txt(
'meta_pointofcontact'));
292 $this->tpl->setVariable(
"TXT_SCOPROP_POC",$this->lng->txt(
'sco_propagate'));
293 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
295 $sep = $ent_str =
"";
296 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
298 $md_con = $this->md_section->getContribute($con_id);
299 if ($md_con->getRole() ==
"PointOfContact")
301 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
303 $md_ent = $md_con->getEntity($ent_id);
304 $ent_str = $ent_str.$sep.$md_ent->getEntity();
312 $this->tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'meta_status'));
313 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
315 $this->md_section = $this->md_obj->addLifecycle();
316 $this->md_section->save();
318 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
322 array(0 => $this->lng->txt(
'meta_please_select'))));
328 include_once(
'Services/MetaData/classes/class.ilMDCopyrightSelectionGUI.php');
331 $this->md_obj->getRBACId(),
332 $this->md_obj->getObjId());
348 #if(is_object($this->md_section = $this->md_obj->getEducational())) 350 # $this->tpl->setVariable("VAL_TYPICAL_LEARN_TIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime())); 353 $tlt = array(0,0,0,0,0);
355 if(is_object($this->md_section = $this->md_obj->getEducational()))
357 include_once
'Services/MetaData/classes/class.ilMDUtils.php';
361 if(strlen($this->md_section->getTypicalLearningTime()))
363 $tlt = array(0,0,0,0,0);
368 $this->tpl->setVariable(
"TXT_MONTH",$this->lng->txt(
'md_months'));
372 $this->tpl->setVariable(
"TXT_DAYS",$this->lng->txt(
'md_days'));
373 $this->tpl->setVariable(
"TXT_TIME",$this->lng->txt(
'md_time'));
375 $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME",$this->lng->txt(
'meta_typical_learning_time'));
377 $tlt[2],$tlt[3],$tlt[4],
379 $this->tpl->setVariable(
"TLT_HINT",$tlt[4] ?
'(hh:mm:ss)' :
'(hh:mm)');
383 $this->tpl->setCurrentBlock(
"tlt_not_valid");
384 $this->tpl->setVariable(
"TXT_CURRENT_VAL",$this->lng->txt(
'meta_current_value'));
385 $this->tpl->setVariable(
"TLT",$this->md_section->getTypicalLearningTime());
386 $this->tpl->setVariable(
"INFO_TLT_NOT_VALID",$this->lng->txt(
'meta_info_tlt_not_valid'));
387 $this->tpl->parseCurrentBlock();
391 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
398 if(!is_object($this->md_section = $this->md_obj->getGeneral()))
400 $this->md_section = $this->md_obj->addGeneral();
401 $this->md_section->save();
406 $tpl->setContent($form->getHTML());
416 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
423 $ti->setRequired(
true);
424 $ti->setValue($this->md_section->getTitle());
425 $this->form->addItem($ti);
428 foreach($ids = $this->md_section->getDescriptionIds() as $id)
430 $md_des = $this->md_section->getDescription($id);
432 $ta =
new ilTextAreaInputGUI($this->lng->txt(
"meta_description"),
"gen_description[".$id.
"][description]");
435 $ta->setValue($md_des->getDescription());
438 $ta->setInfo($this->lng->txt(
"meta_l_".$md_des->getDescriptionLanguageCode()));
441 $this->form->addItem($ta);
447 foreach($ids = $this->md_section->getLanguageIds() as $id)
449 $md_lan = $this->md_section->getLanguage($id);
450 $first_lang = $md_lan->getLanguageCode();
451 $si =
new ilSelectInputGUI($this->lng->txt(
"meta_language"),
"gen_language[".$id.
"][language]");
453 $si->setValue($md_lan->getLanguageCode());
454 $this->form->addItem(
$si);
461 $this->form->addItem(
$si);
467 foreach($ids = $this->md_section->getKeywordIds() as $id)
469 $md_key = $this->md_section->getKeyword($id);
470 if (trim($md_key->getKeyword()) !=
"")
472 $keywords[$md_key->getKeywordLanguageCode()][]
473 = $md_key->getKeyword();
476 foreach($keywords as
$lang => $keyword_set)
479 "keywords[value][".$lang.
"]");
480 $kw->setDataSource($this->ctrl->getLinkTarget($this,
"keywordAutocomplete",
"",
true));
481 $kw->setMaxLength(200);
484 if (count($keywords) > 1)
486 $kw->setInfo($this->lng->txt(
"meta_l_".$lang));
488 $this->form->addItem($kw);
490 $kw->setValue($keyword_set);
492 if (count($keywords) == 0)
495 "keywords[value][".$first_lang.
"]");
496 $kw->setDataSource($this->ctrl->getLinkTarget($this,
"keywordAutocomplete",
"",
true));
497 $kw->setMaxLength(200);
500 $this->form->addItem($kw);
506 "(".sprintf($this->lng->txt(
'md_separated_by'), $this->md_settings->getDelimiter()).
")",
510 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
512 $sep = $ent_str =
"";
513 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
515 $md_con = $this->md_section->getContribute($con_id);
516 if ($md_con->getRole() ==
"Author")
518 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
520 $md_ent = $md_con->getEntity($ent_id);
521 $ent_str = $ent_str.$sep.$md_ent->getEntity();
522 $sep = $this->md_settings->getDelimiter().
" ";
526 $ta->setValue($ent_str);
528 $this->form->addItem($ta);
531 include_once(
"./Services/MetaData/classes/class.ilCopyrightInputGUI.php");
536 $this->md_obj->getObjId());
539 $this->form->addItem($cp);
542 include_once(
"./Services/MetaData/classes/class.ilTypicalLearningTimeInputGUI.php");
544 $edu = $this->md_obj->getEducational();
549 $this->form->addItem($tlt);
552 include_once
"Services/Taxonomy/classes/class.ilTaxMDGUI.php";
553 $tax_gui =
new ilTaxMDGUI($this->md_obj->getRBACId(),$this->md_obj->getObjId(),$this->md_obj->getObjType());
556 $this->form->addCommandButton(
"updateQuickEdit", $lng->txt(
"save"));
557 $this->form->setTitle($this->lng->txt(
"meta_quickedit"));
558 $this->form->setFormAction($ilCtrl->getFormAction($this));
572 include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
574 $this->md_obj->getObjType(), $this->md_obj->getRBACId());
584 $entry =
new stdClass();
590 include_once
'./Services/JSON/classes/class.ilJsonUtil.php';
601 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
603 if(!trim(
$_POST[
'gen_title']))
611 $this->md_section = $this->md_obj->getGeneral();
614 $this->md_section->update();
617 if(is_array(
$_POST[
'gen_language']))
623 $md_lan = $this->md_section->getLanguage($id);
629 $md_lan = $this->md_section->addLanguage();
636 if(is_array(
$_POST[
'gen_description']))
640 $md_des = $this->md_section->getDescription($id);
648 if(is_array(
$_POST[
"keywords"][
"value"]))
650 include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
657 if(
$_POST[
'copyright'][
'sel'] ||
$_POST[
'copyright'][
'ta'])
659 if(!is_object($this->md_section = $this->md_obj->getRights()))
661 $this->md_section = $this->md_obj->addRights();
662 $this->md_section->save();
664 if(
$_POST[
'copyright'][
'sel'])
666 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
667 $this->md_section->setDescription(
'il_copyright_entry__'.IL_INST_ID.
'__'.(
int)
$_POST[
'copyright'][
'sel']);
671 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
674 $this->md_section->update();
678 if(is_object($this->md_section = $this->md_obj->getRights()))
680 $this->md_section->setCopyrightAndOtherRestrictions(
"No");
681 $this->md_section->setDescription(
"");
682 $this->md_section->update();
692 if(!is_object($this->md_section = $this->md_obj->getEducational()))
694 $this->md_section = $this->md_obj->addEducational();
695 $this->md_section->save();
697 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
698 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
699 $this->md_section->update();
703 if(is_object($this->md_section = $this->md_obj->getEducational()))
705 $this->md_section->setPhysicalTypicalLearningTime(0,0,0,0,0);
706 $this->md_section->update();
712 if ($_POST[
"life_authors"] !=
"")
714 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
716 $this->md_section = $this->md_obj->addLifecycle();
717 $this->md_section->save();
721 $auth_arr = explode($this->md_settings->getDelimiter(), $_POST[
"life_authors"]);
722 for($i = 0; $i < count($auth_arr); $i++)
724 $auth_arr[$i] = trim($auth_arr[$i]);
730 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
732 $md_con = $this->md_section->getContribute($con_id);
733 if ($md_con->getRole() ==
"Author")
735 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
737 $md_ent = $md_con->getEntity($ent_id);
740 if (in_array($md_ent->getEntity(), $auth_arr))
742 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
749 $md_con_author = $md_con;
754 if (count($auth_arr) > 0)
756 if (!is_object($md_con_author))
758 $md_con_author = $this->md_section->addContribute();
759 $md_con_author->setRole(
"Author");
760 $md_con_author->save();
762 foreach ($auth_arr as
$auth)
764 $md_ent = $md_con_author->addEntity();
772 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
774 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
776 $md_con = $this->md_section->getContribute($con_id);
777 if ($md_con->getRole() ==
"Author")
787 include_once
"Services/Taxonomy/classes/class.ilTaxMDGUI.php";
788 $tax_gui =
new ilTaxMDGUI($this->md_obj->getRBACId(),$this->md_obj->getObjId(),$this->md_obj->getObjType());
794 $this->ctrl->redirect($this,
'listSection');
800 $module_id = $this->md_obj->obj_id;
801 if($this->md_obj->obj_type==
'sco')
802 $module_id = $this->md_obj->rbac_id;
803 $tree =
new ilTree($module_id);
804 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
805 $tree->setTreeTablePK(
"slm_id");
806 foreach($tree->getSubTree($tree->getNodeData($tree->getRootId()),
true,
'sco') as $sco)
808 $sco_md =
new ilMD($module_id,$sco[
'obj_id'],
'sco');
809 if (
$_POST[$request] !=
"")
812 if(!is_object($sco_md_section = $sco_md->getLifecycle()))
814 $sco_md_section = $sco_md->addLifecycle();
815 $sco_md_section->save();
818 $auth_arr = explode(
",",
$_POST[$request]);
819 for($i = 0; $i < count($auth_arr); $i++)
821 $auth_arr[$i] = trim($auth_arr[$i]);
827 foreach(($ids = $sco_md_section->getContributeIds()) as $con_id)
829 $md_con = $sco_md_section->getContribute($con_id);
830 if ($md_con->getRole() == $type)
832 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
834 $md_ent = $md_con->getEntity($ent_id);
837 if (in_array($md_ent->getEntity(), $auth_arr))
839 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
846 $md_con_author = $md_con;
851 if (count($auth_arr) > 0)
853 if (!is_object($md_con_author))
855 $md_con_author = $sco_md_section->addContribute();
856 $md_con_author->setRole($type);
857 $md_con_author->save();
859 foreach ($auth_arr as
$auth)
861 $md_ent = $md_con_author->addEntity();
869 if(is_object($sco_md_section = $sco_md->getLifecycle()))
871 foreach(($ids = $sco_md_section->getContributeIds()) as $con_id)
873 $md_con = $sco_md_section->getContribute($con_id);
874 if ($md_con->getRole() == $type)
904 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
907 $this->md_section = $this->md_obj->getGeneral();
910 $this->md_section->update();
913 if(is_array(
$_POST[
'gen_language']))
919 $md_lan = $this->md_section->getLanguage($id);
925 $md_lan = $this->md_section->addLanguage();
932 if(is_array(
$_POST[
'gen_description']))
936 $md_des = $this->md_section->getDescription($id);
945 if(is_array(
$_POST[
"keywords"][
"value"]))
947 $new_keywords = array();
948 foreach(
$_POST[
"keywords"][
"value"] as
$lang => $keywords)
951 $keywords = explode(
",", $keywords);
952 foreach($keywords as $keyword)
954 $new_keywords[$language][] = trim($keyword);
959 foreach($ids = $this->md_section->getKeywordIds() as $id)
961 $md_key = $this->md_section->getKeyword($id);
963 $lang = $md_key->getKeywordLanguageCode();
966 if (is_array($new_keywords[
$lang]) &&
967 in_array($md_key->getKeyword(), $new_keywords[
$lang]))
969 unset($new_keywords[$lang]
970 [array_search($md_key->getKeyword(), $new_keywords[
$lang])]);
979 foreach ($new_keywords as
$lang => $key_arr)
981 foreach($key_arr as $keyword)
985 $md_key = $this->md_section->addKeyword();
997 if(
$_POST[
'copyright_id'] or
$_POST[
'rights_copyright'])
999 if(!is_object($this->md_section = $this->md_obj->getRights()))
1001 $this->md_section = $this->md_obj->addRights();
1002 $this->md_section->save();
1004 if($_POST[
'copyright_id'])
1006 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
1007 $this->md_section->setDescription(
'il_copyright_entry__'.IL_INST_ID.
'__'.(
int) $_POST[
'copyright_id']);
1011 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
1014 $this->md_section->update();
1018 if(is_object($this->md_section = $this->md_obj->getRights()))
1020 $this->md_section->setCopyrightAndOtherRestrictions(
"No");
1021 $this->md_section->setDescription(
"");
1022 $this->md_section->update();
1029 if($_POST[
'tlt'][
'mo'] or $_POST[
'tlt'][
'd'] or
1030 $_POST[
"tlt"][
'h'] or $_POST[
'tlt'][
'm'] or $_POST[
'tlt'][
's'])
1032 if(!is_object($this->md_section = $this->md_obj->getEducational()))
1034 $this->md_section = $this->md_obj->addEducational();
1035 $this->md_section->save();
1037 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
1038 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
1039 $this->md_section->update();
1043 if(is_object($this->md_section = $this->md_obj->getEducational()))
1045 $this->md_section->setPhysicalTypicalLearningTime(0,0,0,0,0);
1046 $this->md_section->update();
1052 if ($_POST[
"life_experts"] !=
"")
1054 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1056 $this->md_section = $this->md_obj->addLifecycle();
1057 $this->md_section->save();
1061 $auth_arr = explode(
",", $_POST[
"life_experts"]);
1062 for($i = 0; $i < count($auth_arr); $i++)
1064 $auth_arr[$i] = trim($auth_arr[$i]);
1067 $md_con_author =
"";
1070 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1072 $md_con = $this->md_section->getContribute($con_id);
1073 if ($md_con->getRole() ==
"SubjectMatterExpert")
1075 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1077 $md_ent = $md_con->getEntity($ent_id);
1080 if (in_array($md_ent->getEntity(), $auth_arr))
1082 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1089 $md_con_author = $md_con;
1094 if (count($auth_arr) > 0)
1096 if (!is_object($md_con_author))
1098 $md_con_author = $this->md_section->addContribute();
1099 $md_con_author->setRole(
"SubjectMatterExpert");
1100 $md_con_author->save();
1102 foreach ($auth_arr as
$auth)
1104 $md_ent = $md_con_author->addEntity();
1112 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1114 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1116 $md_con = $this->md_section->getContribute($con_id);
1117 if ($md_con->getRole() ==
"SubjectMatterExpert")
1127 if ($_POST[
"life_designers"] !=
"")
1129 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1131 $this->md_section = $this->md_obj->addLifecycle();
1132 $this->md_section->save();
1136 $auth_arr = explode(
",", $_POST[
"life_designers"]);
1137 for($i = 0; $i < count($auth_arr); $i++)
1139 $auth_arr[$i] = trim($auth_arr[$i]);
1142 $md_con_author =
"";
1145 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1147 $md_con = $this->md_section->getContribute($con_id);
1148 if ($md_con->getRole() ==
"InstructionalDesigner")
1150 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1152 $md_ent = $md_con->getEntity($ent_id);
1155 if (in_array($md_ent->getEntity(), $auth_arr))
1157 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1164 $md_con_author = $md_con;
1169 if (count($auth_arr) > 0)
1171 if (!is_object($md_con_author))
1173 $md_con_author = $this->md_section->addContribute();
1174 $md_con_author->setRole(
"InstructionalDesigner");
1175 $md_con_author->save();
1177 foreach ($auth_arr as
$auth)
1179 $md_ent = $md_con_author->addEntity();
1187 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1189 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1191 $md_con = $this->md_section->getContribute($con_id);
1192 if ($md_con->getRole() ==
"InstructionalDesigner")
1202 if ($_POST[
"life_poc"] !=
"")
1204 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1206 $this->md_section = $this->md_obj->addLifecycle();
1207 $this->md_section->save();
1211 $auth_arr = explode(
",", $_POST[
"life_poc"]);
1212 for($i = 0; $i < count($auth_arr); $i++)
1214 $auth_arr[$i] = trim($auth_arr[$i]);
1217 $md_con_author =
"";
1220 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1222 $md_con = $this->md_section->getContribute($con_id);
1223 if ($md_con->getRole() ==
"PointOfContact")
1225 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1227 $md_ent = $md_con->getEntity($ent_id);
1230 if (in_array($md_ent->getEntity(), $auth_arr))
1232 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1239 $md_con_author = $md_con;
1244 if (count($auth_arr) > 0)
1246 if (!is_object($md_con_author))
1248 $md_con_author = $this->md_section->addContribute();
1249 $md_con_author->setRole(
"PointOfContact");
1250 $md_con_author->save();
1252 foreach ($auth_arr as
$auth)
1254 $md_ent = $md_con_author->addEntity();
1262 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1264 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1266 $md_con = $this->md_section->getContribute($con_id);
1267 if ($md_con->getRole() ==
"PointOfContact")
1276 $this->md_section = $this->md_obj->getLifecycle();
1277 $this->md_section->setVersionLanguage(
new ilMDLanguageItem($_POST[
'lif_language']));
1279 $this->md_section->setStatus($_POST[
'lif_status']);
1280 $this->md_section->update();
1288 $this->ctrl->redirect($this,
'listSection');
1296 if(!is_object($this->md_section = $this->md_obj->getGeneral()))
1298 $this->md_section = $this->md_obj->addGeneral();
1299 $this->md_section->save();
1302 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1306 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_general.html',
'Services/MetaData');
1308 $this->ctrl->setReturn($this,
'listGeneral');
1309 $this->ctrl->setParameter($this,
'section',
'meta_general');
1310 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1314 $this->tpl->setVariable(
"TXT_GENERAL", $this->lng->txt(
"meta_general"));
1315 $this->tpl->setVariable(
"TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
1316 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1317 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
1318 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
1319 $this->tpl->setVariable(
"TXT_STRUCTURE", $this->lng->txt(
"meta_structure"));
1320 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
1321 $this->tpl->setVariable(
"TXT_ATOMIC", $this->lng->txt(
"meta_atomic"));
1322 $this->tpl->setVariable(
"TXT_COLLECTION", $this->lng->txt(
"meta_collection"));
1323 $this->tpl->setVariable(
"TXT_NETWORKED", $this->lng->txt(
"meta_networked"));
1324 $this->tpl->setVariable(
"TXT_HIERARCHICAL", $this->lng->txt(
"meta_hierarchical"));
1325 $this->tpl->setVariable(
"TXT_LINEAR", $this->lng->txt(
"meta_linear"));
1328 $this->tpl->setVariable(
"STRUCTURE_VAL_".strtoupper($this->md_section->getStructure()),
" selected=selected");
1332 foreach($ids = $this->md_section->getIdentifierIds() as $id)
1334 $md_ide = $this->md_section->getIdentifier($id);
1339 $this->tpl->setCurrentBlock(
"id_head");
1340 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
1341 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
1342 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
1343 $this->tpl->setVariable(
"ROWSPAN_ID", count($ids));
1344 $this->tpl->parseCurrentBlock();
1350 $this->ctrl->setParameter($this,
'meta_index',$id);
1351 $this->ctrl->setParameter($this,
'meta_path',
'meta_identifier');
1353 if ($md_ide->getCatalog() !=
"ILIAS")
1355 $this->tpl->setCurrentBlock(
"identifier_delete");
1356 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1357 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1358 $this->tpl->parseCurrentBlock();
1362 $this->tpl->setCurrentBlock(
"identifier_loop");
1363 if ($md_ide->getCatalog() ==
"ILIAS")
1365 $this->tpl->setVariable(
"DISABLE_IDENT",
' disabled="disabled" ');
1367 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $id);
1368 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
1370 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
1372 $this->tpl->parseCurrentBlock();
1378 foreach($ids = $this->md_section->getLanguageIds() as $id)
1380 $md_lan = $this->md_section->getLanguage($id);
1384 $this->tpl->setCurrentBlock(
"language_head");
1385 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
1386 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1387 $this->tpl->parseCurrentBlock();
1391 if (count($ids) > 1)
1393 $this->ctrl->setParameter($this,
'meta_index',$id);
1394 $this->ctrl->setParameter($this,
'meta_path',
'meta_language');
1396 $this->tpl->setCurrentBlock(
"language_delete");
1397 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1398 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1399 $this->tpl->parseCurrentBlock();
1401 $this->tpl->setCurrentBlock(
"language_loop");
1402 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
'gen_language['.$id.
'][language]',
1403 $md_lan->getLanguageCode()));
1404 $this->tpl->parseCurrentBlock();
1408 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
1411 $this->md_section->getTitleLanguageCode()));
1415 foreach($ids = $this->md_section->getDescriptionIds() as $id)
1417 $md_des = $this->md_section->getDescription($id);
1419 if (count($ids) > 1)
1421 $this->ctrl->setParameter($this,
'meta_index',$id);
1422 $this->ctrl->setParameter($this,
'meta_path',
'meta_description');
1424 $this->tpl->setCurrentBlock(
"description_delete");
1425 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1426 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1427 $this->tpl->parseCurrentBlock();
1430 $this->tpl->setCurrentBlock(
"description_loop");
1431 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO",$id);
1432 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
1433 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
1435 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1436 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_description[".$id.
'][language]',
1437 $md_des->getDescriptionLanguageCode()));
1438 $this->tpl->parseCurrentBlock();
1443 foreach($ids = $this->md_section->getKeywordIds() as $id)
1445 $md_key = $this->md_section->getKeyword($id);
1449 $this->tpl->setCurrentBlock(
"keyword_head");
1450 $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($ids));
1451 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
1452 $this->tpl->parseCurrentBlock();
1459 $this->ctrl->setParameter($this,
'meta_index',$id);
1460 $this->ctrl->setParameter($this,
'meta_path',
'meta_keyword');
1462 $this->tpl->setCurrentBlock(
"keyword_delete");
1463 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1464 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1465 $this->tpl->parseCurrentBlock();
1468 $this->tpl->setCurrentBlock(
"keyword_loop");
1469 $this->tpl->setVariable(
"KEYWORD_LOOP_NO",$id);
1470 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
1472 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1473 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_keyword[".$id.
'][language]',
1474 $md_key->getKeywordLanguageCode()));
1476 $this->tpl->parseCurrentBlock();
1480 $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_COVERAGE",$this->lng->txt(
'meta_coverage'));
1482 $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1483 $this->tpl->setVariable(
"COVERAGE_LOOP_VAL_LANGUAGE",$this->
__showLanguageSelect(
'gen_coverage_language',
1484 $this->md_section->getCoverageLanguageCode()));
1486 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1494 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1496 if(!strlen(trim(
$_POST[
'gen_title'])))
1504 $this->md_section = $this->md_obj->getGeneral();
1505 $this->md_section->setStructure(
$_POST[
'gen_structure']);
1510 $this->md_section->update();
1513 if(is_array(
$_POST[
'gen_identifier']))
1517 $md_ide = $this->md_section->getIdentifier($id);
1525 if(is_array(
$_POST[
'gen_language']))
1529 $md_lan = $this->md_section->getLanguage($id);
1535 if(is_array(
$_POST[
'gen_description']))
1537 foreach(
$_POST[
'gen_description'] as $id =>
$data)
1539 $md_des = $this->md_section->getDescription($id);
1546 if(is_array(
$_POST[
'gen_keyword']))
1550 $md_key = $this->md_section->getKeyword($id);
1561 $this->ctrl->setParameter($this,
"section",
"meta_general");
1563 $this->ctrl->redirect($this,
'listSection');
1568 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1571 $this->md_section = $this->md_obj->getTechnical();
1578 $this->md_section->update();
1581 if(is_array(
$_POST[
'met_format']))
1585 $md_for = $this->md_section->getFormat($id);
1591 if(is_array(
$_POST[
'met_location']))
1595 $md_loc = $this->md_section->getLocation($id);
1601 if(is_array(
$_POST[
'met_re']))
1606 $md_re = $this->md_section->getRequirement($id);
1627 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1629 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_technical.html',
'Services/MetaData');
1632 $this->ctrl->setParameter($this,
"section",
"meta_technical");
1633 if(!is_object($this->md_section = $this->md_obj->getTechnical()))
1635 $this->tpl->setCurrentBlock(
"no_technical");
1636 $this->tpl->setVariable(
"TXT_NO_TECHNICAL", $this->lng->txt(
"meta_no_technical"));
1637 $this->tpl->setVariable(
"TXT_ADD_TECHNICAL", $this->lng->txt(
"meta_add"));
1638 $this->tpl->setVariable(
"ACTION_ADD_TECHNICAL",$this->ctrl->getLinkTarget($this,
"addSection"));
1639 $this->tpl->parseCurrentBlock();
1643 $this->ctrl->setReturn($this,
'listTechnical');
1644 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
1646 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1647 $this->tpl->setVariable(
"TXT_TECHNICAL",$this->lng->txt(
'meta_technical'));
1650 $this->tpl->setVariable(
"ACTION_DELETE",
1651 $this->ctrl->getLinkTarget($this,
"deleteSection"));
1652 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
1658 foreach($ids = $this->md_section->getFormatIds() as $id)
1660 $md_for =& $this->md_section->getFormat($id);
1662 $this->tpl->setCurrentBlock(
"format_loop");
1664 $this->ctrl->setParameter($this,
'meta_index',$id);
1665 $this->ctrl->setParameter($this,
'meta_path',
'meta_format');
1666 $this->tpl->setVariable(
"FORMAT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1667 $this->tpl->setVariable(
"FORMAT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1669 $this->tpl->setVariable(
"FORMAT_LOOP_NO",$id);
1670 $this->tpl->setVariable(
"FORMAT_LOOP_TXT_FORMAT",$this->lng->txt(
'meta_format'));
1673 $this->tpl->parseCurrentBlock();
1676 $this->tpl->setVariable(
"SIZE_TXT_SIZE",$this->lng->txt(
'meta_size'));
1680 foreach($ids = $this->md_section->getLocationIds() as $id)
1682 $md_loc =& $this->md_section->getLocation($id);
1684 $this->tpl->setCurrentBlock(
"location_loop");
1686 $this->ctrl->setParameter($this,
'meta_index',$id);
1687 $this->ctrl->setParameter($this,
'meta_path',
'meta_location');
1688 $this->tpl->setVariable(
"LOCATION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1689 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1691 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_LOCATION",$this->lng->txt(
'meta_location'));
1692 $this->tpl->setVariable(
"LOCATION_LOOP_NO",$id);
1693 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1696 $this->tpl->setVariable(
"SEL_LOCATION_TYPE",
1698 "met_location[".$id.
"][Type]",
1699 array(0 => $this->lng->txt(
'meta_please_select'))));
1700 $this->tpl->parseCurrentBlock();
1703 foreach($ids = $this->md_section->getRequirementIds() as $id)
1705 $md_re =& $this->md_section->getRequirement($id);
1707 $this->tpl->setCurrentBlock(
"requirement_loop");
1709 $this->ctrl->setParameter($this,
'meta_index',$id);
1710 $this->ctrl->setParameter($this,
'meta_path',
'meta_requirement');
1711 $this->tpl->setVariable(
"REQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1712 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1714 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt(
'meta_requirement'));
1715 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1716 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt(
'meta_operating_system'));
1717 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt(
'meta_browser'));
1718 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_NAME",$this->lng->txt(
'meta_name'));
1719 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt(
'meta_minimum_version'));
1720 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt(
'meta_maximum_version'));
1722 $this->tpl->setVariable(
"REQUIREMENT_LOOP_NO",$id);
1723 $this->tpl->setVariable(
"REQUIREMENT_SEL_OS_NAME",
1725 "met_re[".$id.
"][os][name]",
1726 array(0 => $this->lng->txt(
'meta_please_select'))));
1727 $this->tpl->setVariable(
"REQUIREMENT_SEL_BROWSER_NAME",
1729 "met_re[".$id.
"][browser][name]",
1730 array(0 => $this->lng->txt(
'meta_please_select'))));
1732 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
1735 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
1738 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
1741 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
1743 $this->tpl->parseCurrentBlock();
1747 foreach($ids = $this->md_section->getOrCompositeIds() as $or_id)
1749 $md_or =& $this->md_section->getOrComposite($or_id);
1750 foreach($ids = $md_or->getRequirementIds() as $id)
1752 $md_re =& $this->md_section->getRequirement($id);
1754 $this->tpl->setCurrentBlock(
"orrequirement_loop");
1756 $this->ctrl->setParameter($this,
'meta_index',$id);
1757 $this->ctrl->setParameter($this,
'meta_path',
'meta_requirement');
1758 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1759 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1761 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt(
'meta_requirement'));
1762 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1763 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt(
'meta_operating_system'));
1764 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt(
'meta_browser'));
1765 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_NAME",$this->lng->txt(
'meta_name'));
1766 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt(
'meta_minimum_version'));
1767 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt(
'meta_maximum_version'));
1769 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_NO",$id);
1770 $this->tpl->setVariable(
"ORREQUIREMENT_SEL_OS_NAME",
1772 "met_re[".$id.
"][os][name]",
1773 array(0 => $this->lng->txt(
'meta_please_select'))));
1774 $this->tpl->setVariable(
"ORREQUIREMENT_SEL_BROWSER_NAME",
1776 "met_re[".$id.
"][browser][name]",
1777 array(0 => $this->lng->txt(
'meta_please_select'))));
1779 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
1782 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
1785 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
1788 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
1790 $this->tpl->parseCurrentBlock();
1792 $this->tpl->setCurrentBlock(
"orcomposite_loop");
1794 $this->ctrl->setParameter($this,
'meta_index',$or_id);
1795 $this->ctrl->setParameter($this,
'meta_path',
'meta_or_composite');
1796 $this->ctrl->setParameter($this,
'meta_technical',$this->md_section->getMetaId());
1797 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1798 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1800 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_ORCOMPOSITE",$this->lng->txt(
'meta_or_composite'));
1801 $this->tpl->parseCurrentBlock();
1805 $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_INSTALLATIONREMARKS",$this->lng->txt(
'meta_installation_remarks'));
1806 $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1808 $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL",
ilUtil::prepareFormOutput($this->md_section->getInstallationRemarks()));
1809 $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL_LANGUAGE",
1811 $this->md_section->getInstallationRemarksLanguageCode()));
1814 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_OTHERPLATTFORMREQUIREMENTS",
1815 $this->lng->txt(
'meta_other_plattform_requirements'));
1816 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1818 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_VAL",
1820 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_VAL_LANGUAGE",
1822 $this->md_section->getOtherPlatformRequirementsLanguageCode()));
1825 $this->tpl->setVariable(
"DURATION_TXT_DURATION",$this->lng->txt(
'meta_duration'));
1828 $this->tpl->setCurrentBlock(
"technical");
1829 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1830 $this->tpl->parseCurrentBlock();
1837 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1839 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_lifecycle.html',
'Services/MetaData');
1842 $this->ctrl->setParameter($this,
"section",
"meta_lifecycle");
1843 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1845 $this->tpl->setCurrentBlock(
"no_lifecycle");
1846 $this->tpl->setVariable(
"TXT_NO_LIFECYCLE", $this->lng->txt(
"meta_no_lifecycle"));
1847 $this->tpl->setVariable(
"TXT_ADD_LIFECYCLE", $this->lng->txt(
"meta_add"));
1848 $this->tpl->setVariable(
"ACTION_ADD_LIFECYCLE",$this->ctrl->getLinkTarget($this,
"addSection"));
1849 $this->tpl->parseCurrentBlock();
1853 $this->ctrl->setReturn($this,
'listLifecycle');
1854 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
1856 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1857 $this->tpl->setVariable(
"TXT_LIFECYCLE",$this->lng->txt(
'meta_lifecycle'));
1860 $this->tpl->setVariable(
"ACTION_DELETE",
1861 $this->ctrl->getLinkTarget($this,
"deleteSection"));
1862 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
1868 $this->tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'meta_status'));
1871 array(0 => $this->lng->txt(
'meta_please_select'))));
1873 $this->tpl->setVariable(
"TXT_VERSION",$this->lng->txt(
'meta_version'));
1876 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1878 $this->md_section->getVersionLanguageCode()));
1881 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1883 $md_con = $this->md_section->getContribute($con_id);
1887 $this->ctrl->setParameter($this,
'meta_index',$con_id);
1888 $this->ctrl->setParameter($this,
'meta_path',
'meta_contribute');
1890 $this->tpl->setCurrentBlock(
"contribute_delete");
1891 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1892 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1893 $this->tpl->parseCurrentBlock();
1896 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1898 $md_ent = $md_con->getEntity($ent_id);
1900 $this->ctrl->setParameter($this,
'meta_path',
'meta_entity');
1902 if(count($ent_ids) > 1)
1904 $this->tpl->setCurrentBlock(
"contribute_entity_delete");
1906 $this->ctrl->setParameter($this,
'meta_index',$ent_id);
1907 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1908 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1909 $this->tpl->parseCurrentBlock();
1912 $this->tpl->setCurrentBlock(
"contribute_entity_loop");
1914 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
1915 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
1917 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt(
'meta_entity'));
1918 $this->tpl->parseCurrentBlock();
1920 $this->tpl->setCurrentBlock(
"contribute_loop");
1922 $this->ctrl->setParameter($this,
'section_element',
'meta_entity');
1923 $this->ctrl->setParameter($this,
'meta_index',$con_id);
1924 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,
'addSectionElement'));
1925 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD",
1926 $this->lng->txt(
'add').
" ".$this->lng->txt(
'meta_entity'));
1928 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
1929 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt(
'meta_contribute'));
1930 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt(
'meta_role'));
1932 "met_contribute[".$con_id.
"][Role]",
1933 array(0 => $this->lng->txt(
'meta_please_select'))));
1934 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt(
'meta_date'));
1935 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO",$con_id);
1938 $this->tpl->parseCurrentBlock();
1940 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1946 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1949 $this->md_section = $this->md_obj->getLifecycle();
1952 $this->md_section->setStatus(
$_POST[
'lif_status']);
1953 $this->md_section->update();
1956 if(is_array(
$_POST[
'met_identifier']))
1960 $md_ide = $this->md_section->getIdentifier($id);
1967 if(is_array(
$_POST[
'met_contribute']))
1971 $md_con =& $this->md_section->getContribute($id);
1976 if(is_array(
$_POST[
'met_entity'][$id]))
1978 foreach(
$_POST[
'met_entity'][$id] as $ent_id =>
$data)
1980 $md_ent =& $md_con->getEntity($ent_id);
1999 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2001 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_meta_metadata.html',
'Services/MetaData');
2004 $this->ctrl->setParameter($this,
"section",
"meta_meta_metadata");
2005 if(!is_object($this->md_section = $this->md_obj->getMetaMetadata()))
2007 $this->tpl->setCurrentBlock(
"no_meta_meta");
2008 $this->tpl->setVariable(
"TXT_NO_META_META", $this->lng->txt(
"meta_no_meta_metadata"));
2009 $this->tpl->setVariable(
"TXT_ADD_META_META", $this->lng->txt(
"meta_add"));
2010 $this->tpl->setVariable(
"ACTION_ADD_META_META",$this->ctrl->getLinkTarget($this,
"addSection"));
2011 $this->tpl->parseCurrentBlock();
2015 $this->ctrl->setReturn($this,
'listMetaMetaData');
2016 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2018 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2019 $this->tpl->setVariable(
"TXT_META_METADATA",$this->lng->txt(
'meta_meta_metadata'));
2022 $this->tpl->setVariable(
"ACTION_DELETE",
2023 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2024 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
2029 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
2031 $this->tpl->setVariable(
"VAL_LANGUAGE",$this->
__showLanguageSelect(
'met_language',$this->md_section->getLanguageCode()));
2032 $this->tpl->setVariable(
"TXT_METADATASCHEME",$this->lng->txt(
'meta_metadatascheme'));
2033 $this->tpl->setVariable(
"VAL_METADATASCHEME",$this->md_section->getMetaDataScheme());
2037 foreach($ids = $this->md_section->getIdentifierIds() as $id)
2039 $md_ide = $this->md_section->getIdentifier($id);
2043 $this->ctrl->setParameter($this,
'meta_index',$id);
2044 $this->ctrl->setParameter($this,
'meta_path',
'meta_identifier');
2046 $this->tpl->setCurrentBlock(
"identifier_delete");
2047 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2048 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2049 $this->tpl->parseCurrentBlock();
2052 $this->tpl->setCurrentBlock(
"identifier_loop");
2053 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $id);
2054 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
2055 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
2056 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
2058 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
2059 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
2061 $this->tpl->parseCurrentBlock();
2065 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
2067 $md_con = $this->md_section->getContribute($con_id);
2071 $this->ctrl->setParameter($this,
'meta_index',$con_id);
2072 $this->ctrl->setParameter($this,
'meta_path',
'meta_contribute');
2074 $this->tpl->setCurrentBlock(
"contribute_delete");
2075 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2076 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2077 $this->tpl->parseCurrentBlock();
2080 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
2082 $md_ent = $md_con->getEntity($ent_id);
2084 $this->ctrl->setParameter($this,
'meta_path',
'meta_entity');
2086 if(count($ent_ids) > 1)
2088 $this->tpl->setCurrentBlock(
"contribute_entity_delete");
2090 $this->ctrl->setParameter($this,
'meta_index',$ent_id);
2091 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2092 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2093 $this->tpl->parseCurrentBlock();
2096 $this->tpl->setCurrentBlock(
"contribute_entity_loop");
2098 $this->ctrl->setParameter($this,
'section_element',
'meta_entity');
2099 $this->ctrl->setParameter($this,
'meta_index',$con_id);
2100 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,
'addSectionElement'));
2101 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD",$this->lng->txt(
'add'));
2104 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
2105 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
2107 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt(
'meta_entity'));
2108 $this->tpl->parseCurrentBlock();
2110 $this->tpl->setCurrentBlock(
"contribute_loop");
2111 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
2112 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt(
'meta_contribute'));
2113 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt(
'meta_role'));
2115 "met_contribute[".$con_id.
"][Role]",
2116 array(0 => $this->lng->txt(
'meta_please_select'))));
2117 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt(
'meta_date'));
2118 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO",$con_id);
2121 $this->tpl->parseCurrentBlock();
2123 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
2129 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2132 $this->md_section = $this->md_obj->getMetaMetadata();
2134 $this->md_section->update();
2137 if(is_array(
$_POST[
'met_identifier']))
2141 $md_ide = $this->md_section->getIdentifier($id);
2148 if(is_array(
$_POST[
'met_contribute']))
2152 $md_con =& $this->md_section->getContribute($id);
2157 if(is_array(
$_POST[
'met_entity'][$id]))
2159 foreach(
$_POST[
'met_entity'][$id] as $ent_id =>
$data)
2161 $md_ent =& $md_con->getEntity($ent_id);
2180 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2182 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_rights.html',
'Services/MetaData');
2184 if(!is_object($this->md_section = $this->md_obj->getRights()))
2186 $this->tpl->setCurrentBlock(
"no_rights");
2187 $this->tpl->setVariable(
"TXT_NO_RIGHTS", $this->lng->txt(
"meta_no_rights"));
2188 $this->tpl->setVariable(
"TXT_ADD_RIGHTS", $this->lng->txt(
"meta_add"));
2189 $this->ctrl->setParameter($this,
"section",
"meta_rights");
2190 $this->tpl->setVariable(
"ACTION_ADD_RIGHTS",
2191 $this->ctrl->getLinkTarget($this,
"addSection"));
2192 $this->tpl->parseCurrentBlock();
2197 $this->ctrl->setReturn($this,
'listRights');
2198 $this->ctrl->setParameter($this,
'section',
'meta_rights');
2199 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2201 $this->tpl->setVariable(
"TXT_RIGHTS", $this->lng->txt(
"meta_rights"));
2202 $this->tpl->setVariable(
"TXT_COST", $this->lng->txt(
"meta_cost"));
2203 $this->tpl->setVariable(
"TXT_COPYRIGHTANDOTHERRESTRICTIONS", $this->lng->txt(
"meta_copyright_and_other_restrictions"));
2204 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2205 $this->tpl->setVariable(
"TXT_YES", $this->lng->txt(
"meta_yes"));
2206 $this->tpl->setVariable(
"TXT_NO", $this->lng->txt(
"meta_no"));
2208 $this->ctrl->setParameter($this,
"section",
"meta_rights");
2209 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2210 $this->tpl->setVariable(
"ACTION_DELETE",
2211 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2213 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2215 $this->tpl->setVariable(
"VAL_COST_".strtoupper($this->md_section->getCosts()),
" selected");
2216 $this->tpl->setVariable(
"VAL_COPYRIGHTANDOTHERRESTRICTIONS_".
2217 strtoupper($this->md_section->getCopyrightAndOtherRestrictions()),
" selected");
2219 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2220 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2222 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2223 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2225 $this->md_section->getDescriptionLanguageCode()));
2227 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2229 $this->tpl->setCurrentBlock(
"rights");
2230 $this->tpl->parseCurrentBlock();
2237 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2240 $this->md_section = $this->md_obj->getRights();
2241 $this->md_section->setCosts(
$_POST[
'rights'][
'Cost']);
2242 $this->md_section->setCopyrightAndOtherRestrictions(
$_POST[
'rights'][
'CopyrightAndOtherRestrictions']);
2243 $this->md_section->setDescriptionLanguage(
new ilMDLanguageItem(
$_POST[
'rights'][
'DescriptionLanguage']));
2245 $this->md_section->update();
2257 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2259 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_educational.html',
'Services/MetaData');
2261 if(!is_object($this->md_section = $this->md_obj->getEducational()))
2263 $this->tpl->setCurrentBlock(
"no_educational");
2264 $this->tpl->setVariable(
"TXT_NO_EDUCATIONAL", $this->lng->txt(
"meta_no_educational"));
2265 $this->tpl->setVariable(
"TXT_ADD_EDUCATIONAL", $this->lng->txt(
"meta_add"));
2266 $this->ctrl->setParameter($this,
"section",
"meta_educational");
2267 $this->tpl->setVariable(
"ACTION_ADD_EDUCATIONAL",
2268 $this->ctrl->getLinkTarget($this,
"addSection"));
2269 $this->tpl->parseCurrentBlock();
2273 $this->ctrl->setReturn($this,
'listEducational');
2274 $this->ctrl->setParameter($this,
'section',
'meta_educational');
2275 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2277 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2278 $this->tpl->setVariable(
"ACTION_DELETE",
2279 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2281 $this->tpl->setVariable(
"TXT_EDUCATIONAL", $this->lng->txt(
"meta_educational"));
2282 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2283 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2284 $this->tpl->setVariable(
"TXT_TYPICALAGERANGE", $this->lng->txt(
"meta_typical_age_range"));
2285 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2286 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2287 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2288 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2290 $this->tpl->setVariable(
"TXT_INTERACTIVITYTYPE", $this->lng->txt(
"meta_interactivity_type"));
2291 $this->tpl->setVariable(
"TXT_LEARNINGRESOURCETYPE", $this->lng->txt(
"meta_learning_resource_type"));
2292 $this->tpl->setVariable(
"TXT_INTERACTIVITYLEVEL", $this->lng->txt(
"meta_interactivity_level"));
2293 $this->tpl->setVariable(
"TXT_SEMANTICDENSITY", $this->lng->txt(
"meta_semantic_density"));
2294 $this->tpl->setVariable(
"TXT_INTENDEDENDUSERROLE", $this->lng->txt(
"meta_intended_end_user_role"));
2295 $this->tpl->setVariable(
"TXT_CONTEXT", $this->lng->txt(
"meta_context"));
2296 $this->tpl->setVariable(
"TXT_DIFFICULTY", $this->lng->txt(
"meta_difficulty"));
2298 $this->tpl->setVariable(
"VAL_INTERACTIVITYTYPE_" . strtoupper($this->md_section->getInteractivityType()),
" selected");
2299 $this->tpl->setVariable(
"VAL_LEARNINGRESOURCETYPE_" . strtoupper($this->md_section->getLearningResourceType()),
" selected");
2300 $this->tpl->setVariable(
"VAL_INTERACTIVITYLEVEL_" . strtoupper($this->md_section->getInteractivityLevel()),
" selected");
2301 $this->tpl->setVariable(
"VAL_SEMANTICDENSITY_" . strtoupper($this->md_section->getSemanticDensity()),
" selected");
2302 $this->tpl->setVariable(
"VAL_INTENDEDENDUSERROLE_" . strtoupper($this->md_section->getIntendedEndUserRole()),
" selected");
2303 $this->tpl->setVariable(
"VAL_CONTEXT_" . strtoupper($this->md_section->getContext()),
" selected");
2304 $this->tpl->setVariable(
"VAL_DIFFICULTY_" . strtoupper($this->md_section->getDifficulty()),
" selected");
2305 #$this->tpl->setVariable("VAL_TYPICALLEARNINGTIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime())); 2307 $this->tpl->setVariable(
"TXT_ACTIVE", $this->lng->txt(
"meta_active"));
2308 $this->tpl->setVariable(
"TXT_EXPOSITIVE", $this->lng->txt(
"meta_expositive"));
2309 $this->tpl->setVariable(
"TXT_MIXED", $this->lng->txt(
"meta_mixed"));
2310 $this->tpl->setVariable(
"TXT_EXERCISE", $this->lng->txt(
"meta_exercise"));
2311 $this->tpl->setVariable(
"TXT_SIMULATION", $this->lng->txt(
"meta_simulation"));
2312 $this->tpl->setVariable(
"TXT_QUESTIONNAIRE", $this->lng->txt(
"meta_questionnaire"));
2313 $this->tpl->setVariable(
"TXT_DIAGRAMM", $this->lng->txt(
"meta_diagramm"));
2314 $this->tpl->setVariable(
"TXT_FIGURE", $this->lng->txt(
"meta_figure"));
2315 $this->tpl->setVariable(
"TXT_GRAPH", $this->lng->txt(
"meta_graph"));
2316 $this->tpl->setVariable(
"TXT_INDEX", $this->lng->txt(
"meta_index"));
2317 $this->tpl->setVariable(
"TXT_SLIDE", $this->lng->txt(
"meta_slide"));
2318 $this->tpl->setVariable(
"TXT_TABLE", $this->lng->txt(
"meta_table"));
2319 $this->tpl->setVariable(
"TXT_NARRATIVETEXT", $this->lng->txt(
"meta_narrative_text"));
2320 $this->tpl->setVariable(
"TXT_EXAM", $this->lng->txt(
"meta_exam"));
2321 $this->tpl->setVariable(
"TXT_EXPERIMENT", $this->lng->txt(
"meta_experiment"));
2322 $this->tpl->setVariable(
"TXT_PROBLEMSTATEMENT", $this->lng->txt(
"meta_problem_statement"));
2323 $this->tpl->setVariable(
"TXT_SELFASSESSMENT", $this->lng->txt(
"meta_self_assessment"));
2324 $this->tpl->setVariable(
"TXT_LECTURE", $this->lng->txt(
"meta_lecture"));
2325 $this->tpl->setVariable(
"TXT_VERYLOW", $this->lng->txt(
"meta_very_low"));
2326 $this->tpl->setVariable(
"TXT_LOW", $this->lng->txt(
"meta_low"));
2327 $this->tpl->setVariable(
"TXT_MEDIUM", $this->lng->txt(
"meta_medium"));
2328 $this->tpl->setVariable(
"TXT_HIGH", $this->lng->txt(
"meta_high"));
2329 $this->tpl->setVariable(
"TXT_VERYHIGH", $this->lng->txt(
"meta_very_high"));
2330 $this->tpl->setVariable(
"TXT_TEACHER", $this->lng->txt(
"meta_teacher"));
2331 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
2332 $this->tpl->setVariable(
"TXT_LEARNER", $this->lng->txt(
"meta_learner"));
2333 $this->tpl->setVariable(
"TXT_MANAGER", $this->lng->txt(
"meta_manager"));
2334 $this->tpl->setVariable(
"TXT_SCHOOL", $this->lng->txt(
"meta_school"));
2335 $this->tpl->setVariable(
"TXT_HIGHEREDUCATION", $this->lng->txt(
"meta_higher_education"));
2336 $this->tpl->setVariable(
"TXT_TRAINING", $this->lng->txt(
"meta_training"));
2337 $this->tpl->setVariable(
"TXT_OTHER", $this->lng->txt(
"meta_other"));
2338 $this->tpl->setVariable(
"TXT_VERYEASY", $this->lng->txt(
"meta_very_easy"));
2339 $this->tpl->setVariable(
"TXT_EASY", $this->lng->txt(
"meta_easy"));
2340 $this->tpl->setVariable(
"TXT_DIFFICULT", $this->lng->txt(
"meta_difficult"));
2341 $this->tpl->setVariable(
"TXT_VERYDIFFICULT", $this->lng->txt(
"meta_very_difficult"));
2342 $this->tpl->setVariable(
"TXT_TYPICALLEARNINGTIME", $this->lng->txt(
"meta_typical_learning_time"));
2346 $tlt = array(0,0,0,0,0);
2349 include_once
'Services/MetaData/classes/class.ilMDUtils.php';
2353 if(strlen($this->md_section->getTypicalLearningTime()))
2355 $tlt = array(0,0,0,0,0);
2360 $this->tpl->setVariable(
"TXT_MONTH",$this->lng->txt(
'md_months'));
2364 $this->tpl->setVariable(
"TXT_DAYS",$this->lng->txt(
'md_days'));
2365 $this->tpl->setVariable(
"TXT_TIME",$this->lng->txt(
'md_time'));
2367 $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME",$this->lng->txt(
'meta_typical_learning_time'));
2369 $tlt[2],$tlt[3],$tlt[4],
2371 $this->tpl->setVariable(
"TLT_HINT",$tlt[4] ?
'(hh:mm:ss)' :
'(hh:mm)');
2375 $this->tpl->setCurrentBlock(
"tlt_not_valid");
2376 $this->tpl->setVariable(
"TXT_CURRENT_VAL",$this->lng->txt(
'meta_current_value'));
2377 $this->tpl->setVariable(
"TLT",$this->md_section->getTypicalLearningTime());
2378 $this->tpl->setVariable(
"INFO_TLT_NOT_VALID",$this->lng->txt(
'meta_info_tlt_not_valid'));
2379 $this->tpl->parseCurrentBlock();
2385 foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
2387 $md_age = $this->md_section->getTypicalAgeRange($id);
2390 if (is_object($md_age))
2395 $this->tpl->setCurrentBlock(
"agerange_head");
2396 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_TYPICALAGERANGE",
2397 $this->lng->txt(
"meta_typical_age_range"));
2398 $this->tpl->setVariable(
"ROWSPAN_AGERANGE", count($ids));
2399 $this->tpl->parseCurrentBlock();
2404 $this->ctrl->setParameter($this,
'meta_index', $id);
2405 $this->ctrl->setParameter($this,
'meta_path',
'educational_typical_age_range');
2407 $this->tpl->setCurrentBlock(
"typicalagerange_delete");
2408 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_ACTION_DELETE",
2409 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2410 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2411 $this->tpl->parseCurrentBlock();
2413 $this->tpl->setCurrentBlock(
"typicalagerange_loop");
2414 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2416 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_NO", $id);
2417 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2418 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_VAL_LANGUAGE",
2420 $md_age->getTypicalAgeRangeLanguageCode()));
2421 $this->ctrl->setParameter($this,
"section_element",
"educational_typical_age_range");
2422 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_ACTION_ADD",
2423 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2424 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2425 $this->tpl->parseCurrentBlock();
2431 foreach($ids = $this->md_section->getDescriptionIds() as $id)
2435 $this->tpl->setCurrentBlock(
"desc_head");
2436 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2437 $this->tpl->setVariable(
"ROWSPAN_DESC", count($ids));
2438 $this->tpl->parseCurrentBlock();
2442 $md_des = $this->md_section->getDescription($id);
2444 $this->ctrl->setParameter($this,
'meta_index', $id);
2445 $this->ctrl->setParameter($this,
'meta_path',
'educational_description');
2447 $this->tpl->setCurrentBlock(
"description_loop");
2448 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $id);
2449 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2451 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2452 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2454 $md_des->getDescriptionLanguageCode()));
2455 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",
2456 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2457 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2458 $this->ctrl->setParameter($this,
"section_element",
"educational_description");
2459 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_ADD",
2460 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2461 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2462 $this->tpl->parseCurrentBlock();
2468 foreach($ids = $this->md_section->getLanguageIds() as $id)
2472 $this->tpl->setCurrentBlock(
"language_head");
2473 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2474 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
2475 $this->tpl->parseCurrentBlock();
2479 $md_lang = $this->md_section->getLanguage($id);
2481 $this->ctrl->setParameter($this,
'meta_index', $id);
2482 $this->ctrl->setParameter($this,
'meta_path',
'educational_language');
2484 $this->tpl->setCurrentBlock(
"language_loop");
2485 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE",
2487 $md_lang->getLanguageCode()));
2489 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",
2490 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2491 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2492 $this->ctrl->setParameter($this,
"section_element",
"educational_language");
2493 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_ADD",
2494 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2495 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2496 $this->tpl->parseCurrentBlock();
2500 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2502 $this->tpl->setCurrentBlock(
"educational");
2503 $this->tpl->parseCurrentBlock();
2509 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2512 $this->md_section = $this->md_obj->getEducational();
2513 $this->md_section->setInteractivityType(
$_POST[
'educational'][
'InteractivityType']);
2514 $this->md_section->setLearningResourceType(
$_POST[
'educational'][
'LearningResourceType']);
2515 $this->md_section->setInteractivityLevel(
$_POST[
'educational'][
'InteractivityLevel']);
2516 $this->md_section->setSemanticDensity(
$_POST[
'educational'][
'SemanticDensity']);
2517 $this->md_section->setIntendedEndUserRole(
$_POST[
'educational'][
'IntendedEndUserRole']);
2518 $this->md_section->setContext(
$_POST[
'educational'][
'Context']);
2519 $this->md_section->setDifficulty(
$_POST[
'educational'][
'Difficulty']);
2527 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
2528 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
2532 $this->md_section->setTypicalLearningTime(
'');
2538 foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
2540 $md_age = $this->md_section->getTypicalAgeRange($id);
2541 $md_age->setTypicalAgeRange(
ilUtil::stripSlashes($_POST[
'educational'][
'TypicalAgeRange'][$id][
'Value']));
2542 $md_age->setTypicalAgeRangeLanguage(
2543 new ilMDLanguageItem($_POST[
'educational'][
'TypicalAgeRange'][$id][
'Language']));
2548 foreach($ids = $this->md_section->getDescriptionIds() as $id)
2550 $md_des = $this->md_section->getDescription($id);
2551 $md_des->setDescription(
ilUtil::stripSlashes($_POST[
'educational'][
'Description'][$id][
'Value']));
2552 $md_des->setDescriptionLanguage(
2553 new ilMDLanguageItem($_POST[
'educational'][
'Description'][$id][
'Language']));
2558 foreach($ids = $this->md_section->getLanguageIds() as $id)
2560 $md_lang = $this->md_section->getLanguage($id);
2561 $md_lang->setLanguage(
2566 $this->md_section->update();
2578 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2580 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_relation.html',
'Services/MetaData');
2582 $rel_ids = $this->md_obj->getRelationIds();
2583 if (!is_array($rel_ids) || count($rel_ids) == 0)
2585 $this->tpl->setCurrentBlock(
"no_relation");
2586 $this->tpl->setVariable(
"TXT_NO_RELATION", $this->lng->txt(
"meta_no_relation"));
2587 $this->tpl->setVariable(
"TXT_ADD_RELATION", $this->lng->txt(
"meta_add"));
2588 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2589 $this->tpl->setVariable(
"ACTION_ADD_RELATION",
2590 $this->ctrl->getLinkTarget($this,
"addSection"));
2591 $this->tpl->parseCurrentBlock();
2595 foreach($rel_ids as $rel_id)
2597 $this->md_section = $this->md_obj->getRelation($rel_id);
2599 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2600 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2603 $res_ids = $this->md_section->getIdentifier_Ids();
2604 foreach ($res_ids as $res_id)
2606 $ident = $this->md_section->getIdentifier_($res_id);
2607 $this->ctrl->setParameter($this,
"meta_index", $res_id);
2609 if (count($res_ids) > 1)
2611 $this->tpl->setCurrentBlock(
"identifier_delete");
2612 $this->ctrl->setParameter($this,
"meta_path",
"relation_resource_identifier");
2613 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",
2614 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2615 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2616 $this->tpl->parseCurrentBlock();
2619 $this->tpl->setCurrentBlock(
"identifier_loop");
2621 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $res_id);
2622 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
2623 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2624 $this->ctrl->setParameter($this,
"section_element",
"relation_resource_identifier");
2625 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_ADD",
2626 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2627 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2628 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
2629 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
2630 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_CATALOG",
2632 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_ENTRY",
2634 $this->tpl->parseCurrentBlock();
2638 $res_dess = $this->md_section->getDescriptionIds();
2639 foreach ($res_dess as $res_des)
2641 $des = $this->md_section->getDescription($res_des);
2642 $this->ctrl->setParameter($this,
"meta_index", $res_des);
2644 if (count($res_dess) > 1)
2646 $this->tpl->setCurrentBlock(
"description_delete");
2647 $this->ctrl->setParameter($this,
"meta_path",
"relation_resource_description");
2648 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",
2649 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2650 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2651 $this->tpl->parseCurrentBlock();
2654 $this->tpl->setCurrentBlock(
"description_loop");
2655 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $res_des);
2656 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2657 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2658 $this->ctrl->setParameter($this,
"section_element",
"relation_resource_description");
2659 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_ADD",
2660 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2661 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2662 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2663 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2664 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL",
2666 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2668 $des->getDescriptionLanguageCode()));
2669 $this->tpl->parseCurrentBlock();
2672 $this->tpl->setCurrentBlock(
"relation_loop");
2673 $this->tpl->setVariable(
"REL_ID", $rel_id);
2674 $this->tpl->setVariable(
"TXT_RELATION", $this->lng->txt(
"meta_relation"));
2675 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2676 $this->tpl->setVariable(
"ACTION_DELETE",
2677 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2678 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2679 $this->tpl->setVariable(
"ACTION_ADD",
2680 $this->ctrl->getLinkTarget($this,
"addSection"));
2681 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2682 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2683 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2684 $this->tpl->setVariable(
"TXT_KIND", $this->lng->txt(
"meta_kind"));
2685 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2686 $this->tpl->setVariable(
"TXT_ISPARTOF", $this->lng->txt(
"meta_is_part_of"));
2687 $this->tpl->setVariable(
"TXT_HASPART", $this->lng->txt(
"meta_has_part"));
2688 $this->tpl->setVariable(
"TXT_ISVERSIONOF", $this->lng->txt(
"meta_is_version_of"));
2689 $this->tpl->setVariable(
"TXT_HASVERSION", $this->lng->txt(
"meta_has_version"));
2690 $this->tpl->setVariable(
"TXT_ISFORMATOF", $this->lng->txt(
"meta_is_format_of"));
2691 $this->tpl->setVariable(
"TXT_HASFORMAT", $this->lng->txt(
"meta_has_format"));
2692 $this->tpl->setVariable(
"TXT_REFERENCES", $this->lng->txt(
"meta_references"));
2693 $this->tpl->setVariable(
"TXT_ISREFERENCEDBY", $this->lng->txt(
"meta_is_referenced_by"));
2694 $this->tpl->setVariable(
"TXT_ISBASEDON", $this->lng->txt(
"meta_is_based_on"));
2695 $this->tpl->setVariable(
"TXT_ISBASISFOR", $this->lng->txt(
"meta_is_basis_for"));
2696 $this->tpl->setVariable(
"TXT_REQUIRES", $this->lng->txt(
"meta_requires"));
2697 $this->tpl->setVariable(
"TXT_ISREQUIREDBY", $this->lng->txt(
"meta_is_required_by"));
2698 $this->tpl->setVariable(
"TXT_RESOURCE", $this->lng->txt(
"meta_resource"));
2699 $this->tpl->setVariable(
"VAL_KIND_" . strtoupper($this->md_section->getKind()),
" selected");
2700 $this->tpl->parseCurrentBlock();
2703 $this->tpl->setCurrentBlock(
"relation");
2704 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2705 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2706 $this->tpl->parseCurrentBlock();
2712 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2715 foreach($ids = $this->md_obj->getRelationIds() as $id)
2718 $relation = $this->md_obj->getRelation($id);
2719 $relation->setKind(
$_POST[
'relation'][$id][
'Kind']);
2721 $relation->update();
2724 $res_idents = $relation->getIdentifier_Ids();
2725 foreach ($res_idents as $res_id)
2727 $ident = $relation->getIdentifier_($res_id);
2734 $res_dess = $relation->getDescriptionIds();
2735 foreach ($res_dess as $res_des)
2737 $des = $relation->getDescription($res_des);
2739 $des->setDescriptionLanguage(
2755 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2757 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_annotation.html',
'Services/MetaData');
2759 $anno_ids = $this->md_obj->getAnnotationIds();
2760 if (!is_array($anno_ids) || count($anno_ids) == 0)
2762 $this->tpl->setCurrentBlock(
"no_annotation");
2763 $this->tpl->setVariable(
"TXT_NO_ANNOTATION", $this->lng->txt(
"meta_no_annotation"));
2764 $this->tpl->setVariable(
"TXT_ADD_ANNOTATION", $this->lng->txt(
"meta_add"));
2765 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2766 $this->tpl->setVariable(
"ACTION_ADD_ANNOTATION",
2767 $this->ctrl->getLinkTarget($this,
"addSection"));
2768 $this->tpl->parseCurrentBlock();
2772 foreach($anno_ids as $anno_id)
2774 $this->ctrl->setParameter($this,
'meta_index', $anno_id);
2775 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2777 $this->md_section = $this->md_obj->getAnnotation($anno_id);
2779 $this->tpl->setCurrentBlock(
"annotation_loop");
2780 $this->tpl->setVariable(
"ANNOTATION_ID", $anno_id);
2781 $this->tpl->setVariable(
"TXT_ANNOTATION", $this->lng->txt(
"meta_annotation"));
2782 $this->ctrl->setParameter($this,
"meta_index", $anno_id);
2783 $this->tpl->setVariable(
"ACTION_DELETE",
2784 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2785 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2786 $this->tpl->setVariable(
"ACTION_ADD",
2787 $this->ctrl->getLinkTarget($this,
"addSection"));
2788 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2789 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2791 $this->tpl->setVariable(
"TXT_ENTITY", $this->lng->txt(
"meta_entity"));
2793 $this->tpl->setVariable(
"TXT_DATE", $this->lng->txt(
"meta_date"));
2797 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2798 $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
2800 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2801 $this->tpl->setVariable(
"VAL_DESCRIPTION_LANGUAGE",
2803 $this->md_section->getDescriptionLanguageCode()));
2805 $this->tpl->parseCurrentBlock();
2808 $this->tpl->setCurrentBlock(
"annotation");
2809 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2810 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2811 $this->tpl->parseCurrentBlock();
2817 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2820 foreach($ids = $this->md_obj->getAnnotationIds() as $id)
2823 $annotation = $this->md_obj->getAnnotation($id);
2827 $annotation->setDescriptionLanguage(
2830 $annotation->update();
2843 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2844 $this->
__setTabs(
'meta_classification');
2845 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_classification.html',
'Services/MetaData');
2847 $class_ids = $this->md_obj->getClassificationIds();
2848 if (!is_array($class_ids) || count($class_ids) == 0)
2850 $this->tpl->setCurrentBlock(
"no_classification");
2851 $this->tpl->setVariable(
"TXT_NO_CLASSIFICATION", $this->lng->txt(
"meta_no_classification"));
2852 $this->tpl->setVariable(
"TXT_ADD_CLASSIFICATION", $this->lng->txt(
"meta_add"));
2853 $this->ctrl->setParameter($this,
"section",
"meta_classification");
2854 $this->tpl->setVariable(
"ACTION_ADD_CLASSIFICATION",
2855 $this->ctrl->getLinkTarget($this,
"addSection"));
2856 $this->tpl->parseCurrentBlock();
2860 foreach($class_ids as $class_id)
2862 $this->md_section = $this->md_obj->getClassification($class_id);
2863 $this->ctrl->setParameter($this,
"section",
"meta_classification");
2866 $tp_ids = $this->md_section->getTaxonPathIds();
2867 foreach ($tp_ids as $tp_id)
2869 $tax_path = $this->md_section->getTaxonPath($tp_id);
2871 $tax_ids = $tax_path->getTaxonIds();
2873 foreach($tax_ids as $tax_id)
2875 $taxon = $tax_path->getTaxon($tax_id);
2877 if (count($tax_ids) > 1)
2879 $this->tpl->setCurrentBlock(
"taxon_delete");
2880 $this->ctrl->setParameter($this,
"meta_index", $tax_id);
2881 $this->ctrl->setParameter($this,
"meta_path",
"classification_taxon");
2882 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_ACTION_DELETE",
2883 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2884 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2885 $this->tpl->parseCurrentBlock();
2888 $this->tpl->setCurrentBlock(
"taxonpath_taxon_loop");
2889 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_NO", $tax_id);
2890 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TAXONPATH_NO", $tp_id);
2891 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_TAXON", $this->lng->txt(
"meta_taxon"));
2892 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2894 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ID", $this->lng->txt(
"meta_id"));
2896 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2897 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_VAL_TAXON_LANGUAGE",
2899 $taxon->getTaxonLanguageCode()));
2901 $this->ctrl->setParameter($this,
"section_element",
"Taxon_".$class_id);
2902 $this->ctrl->setParameter($this,
"meta_index", $tp_id);
2903 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_ACTION_ADD",
2904 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2905 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2906 $this->tpl->parseCurrentBlock();
2909 if (count($tp_ids) > 1)
2911 $this->tpl->setCurrentBlock(
"taxonpath_delete");
2912 $this->ctrl->setParameter($this,
"meta_index", $tp_id);
2913 $this->ctrl->setParameter($this,
"meta_path",
"classification_taxon_path");
2914 $this->tpl->setVariable(
"TAXONPATH_LOOP_ACTION_DELETE",
2915 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2916 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2917 $this->tpl->parseCurrentBlock();
2920 $this->tpl->setCurrentBlock(
"taxonpath_loop");
2921 $this->tpl->setVariable(
"TAXONPATH_LOOP_NO", $tp_id);
2922 $this->tpl->setVariable(
"TAXONPATH_LOOP_ROWSPAN", (3 * count($tax_ids)) + 2);
2923 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
2924 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_SOURCE", $this->lng->txt(
"meta_source"));
2925 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2926 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2928 $this->tpl->setVariable(
"TAXONPATH_LOOP_VAL_SOURCE_LANGUAGE",
2930 $tax_path->getSourceLanguageCode()));
2931 $this->ctrl->setParameter($this,
"section_element",
"TaxonPath_".$class_id);
2932 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2933 $this->tpl->setVariable(
"TAXONPATH_LOOP_ACTION_ADD",
2934 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2935 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2936 $this->tpl->parseCurrentBlock();
2940 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2941 $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
2942 $this->tpl->setVariable(
"VAL_DESCRIPTION",
2944 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2945 $this->tpl->setVariable(
"VAL_DESCRIPTION_LANGUAGE",
2947 $this->md_section->getDescriptionLanguageCode()));
2950 $key_ids = $this->md_section->getKeywordIds();
2951 foreach ($key_ids as $key_id)
2953 if (count($key_ids) > 1)
2955 $this->ctrl->setParameter($this,
"meta_index", $key_id);
2956 $this->ctrl->setParameter($this,
"meta_path",
"classification_keyword");
2957 $this->tpl->setCurrentBlock(
"keyword_delete");
2958 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE",
2959 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2960 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2961 $this->tpl->parseCurrentBlock();
2964 $keyword = $this->md_section->getKeyword($key_id);
2965 $this->tpl->setCurrentBlock(
"keyword_loop");
2966 $this->tpl->setVariable(
"KEYWORD_LOOP_NO", $key_id);
2967 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
2968 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2969 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL",
2971 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2972 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE",
2974 $keyword->getKeywordLanguageCode()));
2975 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2976 $this->ctrl->setParameter($this,
"section_element",
"Keyword_".$class_id);
2977 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_ADD",
2978 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2979 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2980 $this->tpl->parseCurrentBlock();
2983 $this->tpl->setCurrentBlock(
"classification_loop");
2984 $this->tpl->setVariable(
"TXT_CLASSIFICATION", $this->lng->txt(
"meta_classification"));
2985 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2986 $this->tpl->setVariable(
"ACTION_DELETE",
2987 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2988 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2989 $this->tpl->setVariable(
"ACTION_ADD",
2990 $this->ctrl->getLinkTarget($this,
"addSection"));
2991 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2993 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2994 $this->tpl->setVariable(
"TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
2995 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
2996 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2998 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2999 $this->tpl->setVariable(
"CLASS_ID", $class_id);
3000 $this->tpl->setVariable(
"TXT_PURPOSE", $this->lng->txt(
"meta_purpose"));
3001 $this->tpl->setVariable(
"TXT_DISCIPLINE", $this->lng->txt(
"meta_learning_resource_type"));
3002 $this->tpl->setVariable(
"TXT_IDEA", $this->lng->txt(
"meta_idea"));
3003 $this->tpl->setVariable(
"TXT_PREREQUISITE", $this->lng->txt(
"meta_prerequisite"));
3004 $this->tpl->setVariable(
"TXT_EDUCATIONALOBJECTIVE", $this->lng->txt(
"meta_educational_objective"));
3005 $this->tpl->setVariable(
"TXT_ACCESSIBILITYRESTRICTIONS", $this->lng->txt(
"meta_accessibility_restrictions"));
3006 $this->tpl->setVariable(
"TXT_EDUCATIONALLEVEL", $this->lng->txt(
"meta_educational_level"));
3007 $this->tpl->setVariable(
"TXT_SKILLLEVEL", $this->lng->txt(
"meta_skill_level"));
3008 $this->tpl->setVariable(
"TXT_SECURITYLEVEL", $this->lng->txt(
"meta_security_level"));
3009 $this->tpl->setVariable(
"TXT_COMPETENCY", $this->lng->txt(
"meta_competency"));
3010 $this->tpl->setVariable(
"VAL_PURPOSE_" . strtoupper($this->md_section->getPurpose()),
" selected");
3011 $this->tpl->parseCurrentBlock();
3014 $this->tpl->setCurrentBlock(
"classification");
3015 $this->tpl->setVariable(
"EDIT_ACTION",
3016 $this->ctrl->getFormAction($this));
3017 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
3018 $this->tpl->parseCurrentBlock();
3024 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
3027 foreach($ids = $this->md_obj->getClassificationIds() as $id)
3030 $classification = $this->md_obj->getClassification($id);
3031 $classification->setPurpose(
$_POST[
'classification'][$id][
'Purpose']);
3034 $classification->setDescriptionLanguage(
3037 $classification->update();
3039 $key_ids = $classification->getKeywordIds();
3040 foreach ($key_ids as $key_id)
3042 $keyword = $classification->getKeyword($key_id);
3044 $keyword->setKeywordLanguage(
3049 $tp_ids = $classification->getTaxonPathIds();
3050 foreach ($tp_ids as $tp_id)
3052 $tax_path = $classification->getTaxonPath($tp_id);
3054 $tax_path->setSourceLanguage(
3056 $tax_path->update();
3058 $tax_ids = $tax_path->getTaxonIds();
3060 foreach($tax_ids as $tax_id)
3062 $taxon = $tax_path->getTaxon($tax_id);
3064 $taxon->setTaxonLanguage(
3081 include_once
'Services/MetaData/classes/class.ilMDFactory.php';
3084 $md_element->delete();
3093 include_once
'Services/MetaData/classes/class.ilMDFactory.php';
3096 $md_element->delete();
3106 switch(
$_GET[
'section'])
3108 case 'meta_technical':
3109 $this->md_section =& $this->md_obj->addTechnical();
3110 $this->md_section->save();
3114 case 'meta_lifecycle':
3115 $this->md_section =& $this->md_obj->addLifecycle();
3116 $this->md_section->save();
3117 $con =& $this->md_section->addContribute();
3120 $ent =& $con->addEntity();
3124 case 'meta_meta_metadata':
3125 $this->md_section = $this->md_obj->addMetaMetadata();
3126 $this->md_section->save();
3128 $ide =& $this->md_section->addIdentifier();
3131 $con =& $this->md_section->addContribute();
3134 $ent =& $con->addEntity();
3139 $this->md_section = $this->md_obj->addRights();
3140 $this->md_section->save();
3143 case 'meta_educational':
3144 $this->md_section = $this->md_obj->addEducational();
3145 $this->md_section->save();
3148 case 'meta_relation':
3149 $this->md_section = $this->md_obj->addRelation();
3150 $this->md_section->save();
3151 $ident = $this->md_section->addIdentifier_();
3153 $des = $this->md_section->addDescription();
3157 case 'meta_annotation':
3158 $this->md_section = $this->md_obj->addAnnotation();
3159 $this->md_section->save();
3162 case 'meta_classification':
3163 $this->md_section = $this->md_obj->addClassification();
3164 $this->md_section->save();
3166 $taxon_path =& $this->md_section->addTaxonPath();
3167 $taxon_path->save();
3169 $taxon =& $taxon_path->addTaxon();
3172 $key =& $this->md_section->addKeyword();
3184 $section_element = (empty(
$_POST[
'section_element']))
3185 ?
$_GET[
'section_element']
3186 :
$_POST[
'section_element'];
3190 switch(
$_GET[
'section'])
3192 case 'meta_technical':
3193 $this->md_section =& $this->md_obj->getTechnical();
3196 case 'meta_lifecycle':
3197 $this->md_section =& $this->md_obj->getLifecycle();
3200 case 'meta_meta_metadata':
3201 $this->md_section =& $this->md_obj->getMetaMetadata();
3204 case 'meta_general':
3205 $this->md_section = $this->md_obj->getGeneral();
3208 case 'meta_educational':
3209 $this->md_section = $this->md_obj->getEducational();
3212 case 'meta_classification':
3213 $arr = explode(
"_", $section_element);
3214 $section_element = $arr[0];
3215 $this->md_section = $this->md_obj->getClassification($arr[1]);
3220 switch($section_element)
3222 case 'meta_or_composite':
3223 $md_new =& $this->md_section->addOrComposite();
3224 $md_new = $md_new->addRequirement();
3227 case 'meta_requirement':
3228 $md_new =& $this->md_section->addRequirement();
3231 case 'meta_location':
3232 $md_new =& $this->md_section->addLocation();
3236 $md_new = $this->md_section->addFormat();
3240 $md_new = $this->md_section->getContribute((
int)
$_GET[
'meta_index']);
3241 $md_new = $md_new->addEntity();
3244 case 'meta_identifier':
3245 $md_new = $this->md_section->addIdentifier();
3248 case 'meta_contribute':
3249 $md_new =& $this->md_section->addContribute();
3251 $md_new = $md_new->addEntity();
3254 case 'educational_language':
3255 case 'meta_language':
3256 $md_new = $this->md_section->addLanguage();
3259 case 'educational_description':
3260 case 'meta_description':
3261 $md_new = $this->md_section->addDescription();
3265 case 'meta_keyword':
3266 $md_new = $this->md_section->addKeyword();
3269 case 'educational_typical_age_range':
3270 $md_new = $this->md_section->addTypicalAgeRange();
3273 case 'relation_resource_identifier':
3274 $rel = $this->md_obj->getRelation($_GET[
'meta_index']);
3275 $md_new = $rel->addIdentifier_();
3278 case 'relation_resource_description':
3279 $rel = $this->md_obj->getRelation($_GET[
'meta_index']);
3280 $md_new = $rel->addDescription();
3284 $md_new = $this->md_section->addTaxonPath();
3286 $md_new = $md_new->addTaxon();
3290 $tax_path = $this->md_section->getTaxonPath($_GET[
'meta_index']);
3291 $md_new = $tax_path->addTaxon();
3306 case 'meta_general':
3309 case 'meta_lifecycle':
3312 case 'meta_technical':
3315 case 'meta_meta_metadata':
3316 return $this->listMetaMetadata();
3319 return $this->
debug();
3324 case 'meta_educational':
3327 case 'meta_relation':
3330 case 'meta_annotation':
3333 case 'meta_classification':
3337 if($this->md_obj->obj_type==
'sahs'||$this->md_obj->obj_type==
'sco')
3348 if(count($subs = $this->md_section->getPossibleSubelements()))
3352 $this->tpl->setCurrentBlock(
"subelements");
3353 $this->tpl->setVariable(
"SEL_SUBELEMENTS",
ilUtil::formSelect(
'',
'section_element',$subs));
3354 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
3355 $this->tpl->parseCurrentBlock();
3357 $this->tpl->setVariable(
"TXT_ADD",$this->lng->txt(
'meta_add'));
3367 $tabs = array(
'meta_quickedit' =>
'listQuickEdit',
3368 'meta_general' =>
'listGeneral',
3369 'meta_lifecycle' =>
'listLifecycle',
3370 'meta_meta_metadata' =>
'listMetaMetadata',
3371 'meta_technical' =>
'listTechnical',
3372 'meta_educational' =>
'listEducational',
3373 'meta_rights' =>
'listRights',
3374 'meta_relation' =>
'listRelation',
3375 'meta_annotation' =>
'listAnnotation',
3376 'meta_classification' =>
'listClassification');
3380 $tabs[
'debug'] =
'debug';
3383 foreach($tabs as $key => $target)
3385 if($a_active == $key)
3393 $this->ctrl->setParameter($this,
'section',$key);
3394 $this->tabs_gui->addSubTabTarget($key, $this->ctrl->getLinkTarget($this,
'listSection'),
3395 "",
"",
"", $active);
3397 #$this->tpl->setVariable("SUB_TABS", $tab_gui->getHTML()); 3407 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
3409 $tpl =
new ilTemplate(
"tpl.lang_selection.html",
true,
true,
3410 "Services/MetaData");
3414 $tpl->setCurrentBlock(
"lg_option");
3415 $tpl->setVariable(
"VAL_LG", $code);
3416 $tpl->setVariable(
"TXT_LG", $text);
3418 if ($a_value !=
"" &&
3421 $tpl->setVariable(
"SELECTED",
"selected");
3424 $tpl->parseCurrentBlock();
3426 $tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
3427 $tpl->setVariable(
"SEL_NAME", $a_name);
3429 $return = $tpl->get();
3437 for($i = 0;$i <= 24;$i++)
3447 for($i = 0;$i <= 31;$i++)
3459 $this->observers[$a_element][
'class'] =& $a_class;
3460 $this->observers[$a_element][
'method'] =& $a_method;
3466 if(isset($this->observers[$a_element]))
3468 $class =& $this->observers[$a_element][
'class'];
3469 $method = $this->observers[$a_element][
'method'];
3471 return $class->$method($a_element);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
updateQuickEdit_scorm()
update quick edit properties - SCORM customization
__buildDaysSelect($sel_day)
keywordAutocomplete()
Keyword list for autocomplete.
_getOperatingSystemSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta technical os selector.
addObserver(&$a_class, $a_method, $a_element)
_LOMDurationToArray($a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
_getLocationTypeSelect($a_selected, $a_name, $prepend=array())
Prepare a meta location type.
updateGeneral()
update general section
static makeTimeSelect($prefix, $short=true, $hour="", $minute="", $second="", $a_use_default=true, $a_further_options=array())
Creates a combination of HTML selects for time inputs.
_getRoleSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta lifecycle status selector.
static updateKeywords(ilMDGeneral $a_md_section, array $a_keywords)
Update keywords from input array.
static _getInstance()
get instance
static encode($mixed, $suppress_native=false)
if(!is_array($argv)) $options
updateQuickEdit()
update quick edit properties
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
__showLanguageSelect($a_name, $a_value="")
shows language select box
special template class to simplify handling of ITX/PEAR
updateQuickEdit_scorm_propagate($request, $type)
& _getInstance($a_type, $a_index, $a_technical_id=0)
This class represents a text property in a property form.
updateQuickEdit_scorm_prop_expert()
_lookupDescription($a_rbac_id, $a_obj_id)
Lookup description (copyright)
setMaxLength($a_maxlength)
Set Max Length.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
callListeners($a_element)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
_getBrowserSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta technical browser selector.
updateFromMDForm()
Import settings from MD (quick edit) form.
static _getMatchingKeywords($a_query, $a_type, $a_rbac_id=0)
Search for keywords.
updateQuickEdit_scorm_prop_poc()
addToMDForm(ilPropertyFormGUI $a_form)
Add taxonomy selector to MD (quick edit) form.
This class represents a text area property in a property form.
updateQuickEdit_scorm_prop_designer()
ilMDEditorGUI($a_rbac_id, $a_obj_id, $a_obj_type)
initQuickEditForm()
Init quick edit form.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
__buildMonthsSelect($sel_month)
_getStatusSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta lifecycle status selector.