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 if(!$_REQUEST[
"wsp_id"])
555 include_once
"Services/Taxonomy/classes/class.ilTaxMDGUI.php";
556 $tax_gui =
new ilTaxMDGUI($this->md_obj->getRBACId(),$this->md_obj->getObjId(),$this->md_obj->getObjType());
560 $this->form->addCommandButton(
"updateQuickEdit", $lng->txt(
"save"));
561 $this->form->setTitle($this->lng->txt(
"meta_quickedit"));
562 $this->form->setFormAction($ilCtrl->getFormAction($this));
576 include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
578 $this->md_obj->getObjType(), $this->md_obj->getRBACId());
588 $entry =
new stdClass();
594 include_once
'./Services/JSON/classes/class.ilJsonUtil.php';
605 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
607 if(!trim(
$_POST[
'gen_title']))
615 $this->md_section = $this->md_obj->getGeneral();
618 $this->md_section->update();
621 if(is_array(
$_POST[
'gen_language']))
627 $md_lan = $this->md_section->getLanguage($id);
633 $md_lan = $this->md_section->addLanguage();
640 if(is_array(
$_POST[
'gen_description']))
644 $md_des = $this->md_section->getDescription($id);
652 if(is_array(
$_POST[
"keywords"][
"value"]))
654 include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
661 if(
$_POST[
'copyright'][
'sel'] ||
$_POST[
'copyright'][
'ta'])
663 if(!is_object($this->md_section = $this->md_obj->getRights()))
665 $this->md_section = $this->md_obj->addRights();
666 $this->md_section->save();
668 if(
$_POST[
'copyright'][
'sel'])
670 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
671 $this->md_section->setDescription(
'il_copyright_entry__'.IL_INST_ID.
'__'.(
int)
$_POST[
'copyright'][
'sel']);
675 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
678 $this->md_section->update();
682 if(is_object($this->md_section = $this->md_obj->getRights()))
684 $this->md_section->setCopyrightAndOtherRestrictions(
"No");
685 $this->md_section->setDescription(
"");
686 $this->md_section->update();
696 if(!is_object($this->md_section = $this->md_obj->getEducational()))
698 $this->md_section = $this->md_obj->addEducational();
699 $this->md_section->save();
701 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
702 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
703 $this->md_section->update();
707 if(is_object($this->md_section = $this->md_obj->getEducational()))
709 $this->md_section->setPhysicalTypicalLearningTime(0,0,0,0,0);
710 $this->md_section->update();
716 if ($_POST[
"life_authors"] !=
"")
718 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
720 $this->md_section = $this->md_obj->addLifecycle();
721 $this->md_section->save();
725 $auth_arr = explode($this->md_settings->getDelimiter(), $_POST[
"life_authors"]);
726 for($i = 0; $i < count($auth_arr); $i++)
728 $auth_arr[$i] = trim($auth_arr[$i]);
734 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
736 $md_con = $this->md_section->getContribute($con_id);
737 if ($md_con->getRole() ==
"Author")
739 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
741 $md_ent = $md_con->getEntity($ent_id);
744 if (in_array($md_ent->getEntity(), $auth_arr))
746 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
753 $md_con_author = $md_con;
758 if (count($auth_arr) > 0)
760 if (!is_object($md_con_author))
762 $md_con_author = $this->md_section->addContribute();
763 $md_con_author->setRole(
"Author");
764 $md_con_author->save();
766 foreach ($auth_arr as $auth)
768 $md_ent = $md_con_author->addEntity();
776 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
778 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
780 $md_con = $this->md_section->getContribute($con_id);
781 if ($md_con->getRole() ==
"Author")
791 if(!$_REQUEST[
"wsp_id"])
794 include_once
"Services/Taxonomy/classes/class.ilTaxMDGUI.php";
795 $tax_gui =
new ilTaxMDGUI($this->md_obj->getRBACId(),$this->md_obj->getObjId(),$this->md_obj->getObjType());
802 $this->ctrl->redirect($this,
'listSection');
808 $module_id = $this->md_obj->obj_id;
809 if($this->md_obj->obj_type==
'sco')
810 $module_id = $this->md_obj->rbac_id;
811 $tree =
new ilTree($module_id);
812 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
813 $tree->setTreeTablePK(
"slm_id");
814 foreach($tree->getSubTree($tree->getNodeData($tree->getRootId()),
true,
'sco') as $sco)
816 $sco_md =
new ilMD($module_id,$sco[
'obj_id'],
'sco');
817 if (
$_POST[$request] !=
"")
820 if(!is_object($sco_md_section = $sco_md->getLifecycle()))
822 $sco_md_section = $sco_md->addLifecycle();
823 $sco_md_section->save();
826 $auth_arr = explode(
",",
$_POST[$request]);
827 for($i = 0; $i < count($auth_arr); $i++)
829 $auth_arr[$i] = trim($auth_arr[$i]);
835 foreach(($ids = $sco_md_section->getContributeIds()) as $con_id)
837 $md_con = $sco_md_section->getContribute($con_id);
838 if ($md_con->getRole() == $type)
840 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
842 $md_ent = $md_con->getEntity($ent_id);
845 if (in_array($md_ent->getEntity(), $auth_arr))
847 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
854 $md_con_author = $md_con;
859 if (count($auth_arr) > 0)
861 if (!is_object($md_con_author))
863 $md_con_author = $sco_md_section->addContribute();
864 $md_con_author->setRole($type);
865 $md_con_author->save();
867 foreach ($auth_arr as $auth)
869 $md_ent = $md_con_author->addEntity();
877 if(is_object($sco_md_section = $sco_md->getLifecycle()))
879 foreach(($ids = $sco_md_section->getContributeIds()) as $con_id)
881 $md_con = $sco_md_section->getContribute($con_id);
882 if ($md_con->getRole() == $type)
912 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
915 $this->md_section = $this->md_obj->getGeneral();
918 $this->md_section->update();
921 if(is_array(
$_POST[
'gen_language']))
927 $md_lan = $this->md_section->getLanguage($id);
933 $md_lan = $this->md_section->addLanguage();
940 if(is_array(
$_POST[
'gen_description']))
944 $md_des = $this->md_section->getDescription($id);
953 if(is_array(
$_POST[
"keywords"][
"value"]))
955 $new_keywords =
array();
956 foreach(
$_POST[
"keywords"][
"value"] as
$lang => $keywords)
959 $keywords = explode(
",", $keywords);
960 foreach($keywords as $keyword)
962 $new_keywords[$language][] = trim($keyword);
967 foreach($ids = $this->md_section->getKeywordIds() as $id)
969 $md_key = $this->md_section->getKeyword($id);
971 $lang = $md_key->getKeywordLanguageCode();
974 if (is_array($new_keywords[
$lang]) &&
975 in_array($md_key->getKeyword(), $new_keywords[
$lang]))
977 unset($new_keywords[$lang]
978 [array_search($md_key->getKeyword(), $new_keywords[
$lang])]);
987 foreach ($new_keywords as
$lang => $key_arr)
989 foreach($key_arr as $keyword)
993 $md_key = $this->md_section->addKeyword();
1007 if(!is_object($this->md_section = $this->md_obj->getRights()))
1009 $this->md_section = $this->md_obj->addRights();
1010 $this->md_section->save();
1012 if($_POST[
'copyright_id'])
1014 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
1015 $this->md_section->setDescription(
'il_copyright_entry__'.IL_INST_ID.
'__'.(
int) $_POST[
'copyright_id']);
1019 $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
1022 $this->md_section->update();
1026 if(is_object($this->md_section = $this->md_obj->getRights()))
1028 $this->md_section->setCopyrightAndOtherRestrictions(
"No");
1029 $this->md_section->setDescription(
"");
1030 $this->md_section->update();
1037 if($_POST[
'tlt'][
'mo']
or $_POST[
'tlt'][
'd']
or 1038 $_POST[
"tlt"][
'h']
or $_POST[
'tlt'][
'm']
or $_POST[
'tlt'][
's'])
1040 if(!is_object($this->md_section = $this->md_obj->getEducational()))
1042 $this->md_section = $this->md_obj->addEducational();
1043 $this->md_section->save();
1045 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
1046 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
1047 $this->md_section->update();
1051 if(is_object($this->md_section = $this->md_obj->getEducational()))
1053 $this->md_section->setPhysicalTypicalLearningTime(0,0,0,0,0);
1054 $this->md_section->update();
1060 if ($_POST[
"life_experts"] !=
"")
1062 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1064 $this->md_section = $this->md_obj->addLifecycle();
1065 $this->md_section->save();
1069 $auth_arr = explode(
",", $_POST[
"life_experts"]);
1070 for($i = 0; $i < count($auth_arr); $i++)
1072 $auth_arr[$i] = trim($auth_arr[$i]);
1075 $md_con_author =
"";
1078 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1080 $md_con = $this->md_section->getContribute($con_id);
1081 if ($md_con->getRole() ==
"SubjectMatterExpert")
1083 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1085 $md_ent = $md_con->getEntity($ent_id);
1088 if (in_array($md_ent->getEntity(), $auth_arr))
1090 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1097 $md_con_author = $md_con;
1102 if (count($auth_arr) > 0)
1104 if (!is_object($md_con_author))
1106 $md_con_author = $this->md_section->addContribute();
1107 $md_con_author->setRole(
"SubjectMatterExpert");
1108 $md_con_author->save();
1110 foreach ($auth_arr as $auth)
1112 $md_ent = $md_con_author->addEntity();
1120 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1122 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1124 $md_con = $this->md_section->getContribute($con_id);
1125 if ($md_con->getRole() ==
"SubjectMatterExpert")
1135 if ($_POST[
"life_designers"] !=
"")
1137 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1139 $this->md_section = $this->md_obj->addLifecycle();
1140 $this->md_section->save();
1144 $auth_arr = explode(
",", $_POST[
"life_designers"]);
1145 for($i = 0; $i < count($auth_arr); $i++)
1147 $auth_arr[$i] = trim($auth_arr[$i]);
1150 $md_con_author =
"";
1153 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1155 $md_con = $this->md_section->getContribute($con_id);
1156 if ($md_con->getRole() ==
"InstructionalDesigner")
1158 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1160 $md_ent = $md_con->getEntity($ent_id);
1163 if (in_array($md_ent->getEntity(), $auth_arr))
1165 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1172 $md_con_author = $md_con;
1177 if (count($auth_arr) > 0)
1179 if (!is_object($md_con_author))
1181 $md_con_author = $this->md_section->addContribute();
1182 $md_con_author->setRole(
"InstructionalDesigner");
1183 $md_con_author->save();
1185 foreach ($auth_arr as $auth)
1187 $md_ent = $md_con_author->addEntity();
1195 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1197 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1199 $md_con = $this->md_section->getContribute($con_id);
1200 if ($md_con->getRole() ==
"InstructionalDesigner")
1210 if ($_POST[
"life_poc"] !=
"")
1212 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1214 $this->md_section = $this->md_obj->addLifecycle();
1215 $this->md_section->save();
1219 $auth_arr = explode(
",", $_POST[
"life_poc"]);
1220 for($i = 0; $i < count($auth_arr); $i++)
1222 $auth_arr[$i] = trim($auth_arr[$i]);
1225 $md_con_author =
"";
1228 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1230 $md_con = $this->md_section->getContribute($con_id);
1231 if ($md_con->getRole() ==
"PointOfContact")
1233 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1235 $md_ent = $md_con->getEntity($ent_id);
1238 if (in_array($md_ent->getEntity(), $auth_arr))
1240 unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
1247 $md_con_author = $md_con;
1252 if (count($auth_arr) > 0)
1254 if (!is_object($md_con_author))
1256 $md_con_author = $this->md_section->addContribute();
1257 $md_con_author->setRole(
"PointOfContact");
1258 $md_con_author->save();
1260 foreach ($auth_arr as $auth)
1262 $md_ent = $md_con_author->addEntity();
1270 if(is_object($this->md_section = $this->md_obj->getLifecycle()))
1272 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1274 $md_con = $this->md_section->getContribute($con_id);
1275 if ($md_con->getRole() ==
"PointOfContact")
1284 $this->md_section = $this->md_obj->getLifecycle();
1285 $this->md_section->setVersionLanguage(
new ilMDLanguageItem($_POST[
'lif_language']));
1287 $this->md_section->setStatus($_POST[
'lif_status']);
1288 $this->md_section->update();
1296 $this->ctrl->redirect($this,
'listSection');
1304 if(!is_object($this->md_section = $this->md_obj->getGeneral()))
1306 $this->md_section = $this->md_obj->addGeneral();
1307 $this->md_section->save();
1310 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1314 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_general.html',
'Services/MetaData');
1316 $this->ctrl->setReturn($this,
'listGeneral');
1317 $this->ctrl->setParameter($this,
'section',
'meta_general');
1318 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1322 $this->tpl->setVariable(
"TXT_GENERAL", $this->lng->txt(
"meta_general"));
1323 $this->tpl->setVariable(
"TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
1324 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1325 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
1326 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
1327 $this->tpl->setVariable(
"TXT_STRUCTURE", $this->lng->txt(
"meta_structure"));
1328 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
1329 $this->tpl->setVariable(
"TXT_ATOMIC", $this->lng->txt(
"meta_atomic"));
1330 $this->tpl->setVariable(
"TXT_COLLECTION", $this->lng->txt(
"meta_collection"));
1331 $this->tpl->setVariable(
"TXT_NETWORKED", $this->lng->txt(
"meta_networked"));
1332 $this->tpl->setVariable(
"TXT_HIERARCHICAL", $this->lng->txt(
"meta_hierarchical"));
1333 $this->tpl->setVariable(
"TXT_LINEAR", $this->lng->txt(
"meta_linear"));
1336 $this->tpl->setVariable(
"STRUCTURE_VAL_".strtoupper($this->md_section->getStructure()),
" selected=selected");
1340 foreach($ids = $this->md_section->getIdentifierIds() as $id)
1342 $md_ide = $this->md_section->getIdentifier($id);
1347 $this->tpl->setCurrentBlock(
"id_head");
1348 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
1349 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
1350 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
1351 $this->tpl->setVariable(
"ROWSPAN_ID", count($ids));
1352 $this->tpl->parseCurrentBlock();
1358 $this->ctrl->setParameter($this,
'meta_index',$id);
1359 $this->ctrl->setParameter($this,
'meta_path',
'meta_identifier');
1361 if ($md_ide->getCatalog() !=
"ILIAS")
1363 $this->tpl->setCurrentBlock(
"identifier_delete");
1364 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1365 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1366 $this->tpl->parseCurrentBlock();
1370 $this->tpl->setCurrentBlock(
"identifier_loop");
1371 if ($md_ide->getCatalog() ==
"ILIAS")
1373 $this->tpl->setVariable(
"DISABLE_IDENT",
' disabled="disabled" ');
1375 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $id);
1376 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
1378 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
1380 $this->tpl->parseCurrentBlock();
1386 foreach($ids = $this->md_section->getLanguageIds() as $id)
1388 $md_lan = $this->md_section->getLanguage($id);
1392 $this->tpl->setCurrentBlock(
"language_head");
1393 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
1394 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1395 $this->tpl->parseCurrentBlock();
1399 if (count($ids) > 1)
1401 $this->ctrl->setParameter($this,
'meta_index',$id);
1402 $this->ctrl->setParameter($this,
'meta_path',
'meta_language');
1404 $this->tpl->setCurrentBlock(
"language_delete");
1405 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1406 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1407 $this->tpl->parseCurrentBlock();
1409 $this->tpl->setCurrentBlock(
"language_loop");
1410 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
'gen_language['.$id.
'][language]',
1411 $md_lan->getLanguageCode()));
1412 $this->tpl->parseCurrentBlock();
1416 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
1419 $this->md_section->getTitleLanguageCode()));
1423 foreach($ids = $this->md_section->getDescriptionIds() as $id)
1425 $md_des = $this->md_section->getDescription($id);
1427 if (count($ids) > 1)
1429 $this->ctrl->setParameter($this,
'meta_index',$id);
1430 $this->ctrl->setParameter($this,
'meta_path',
'meta_description');
1432 $this->tpl->setCurrentBlock(
"description_delete");
1433 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1434 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1435 $this->tpl->parseCurrentBlock();
1438 $this->tpl->setCurrentBlock(
"description_loop");
1439 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO",$id);
1440 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
1441 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
1443 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1444 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_description[".$id.
'][language]',
1445 $md_des->getDescriptionLanguageCode()));
1446 $this->tpl->parseCurrentBlock();
1451 foreach($ids = $this->md_section->getKeywordIds() as $id)
1453 $md_key = $this->md_section->getKeyword($id);
1457 $this->tpl->setCurrentBlock(
"keyword_head");
1458 $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($ids));
1459 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
1460 $this->tpl->parseCurrentBlock();
1467 $this->ctrl->setParameter($this,
'meta_index',$id);
1468 $this->ctrl->setParameter($this,
'meta_path',
'meta_keyword');
1470 $this->tpl->setCurrentBlock(
"keyword_delete");
1471 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1472 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
1473 $this->tpl->parseCurrentBlock();
1476 $this->tpl->setCurrentBlock(
"keyword_loop");
1477 $this->tpl->setVariable(
"KEYWORD_LOOP_NO",$id);
1478 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
1480 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
1481 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE", $this->
__showLanguageSelect(
"gen_keyword[".$id.
'][language]',
1482 $md_key->getKeywordLanguageCode()));
1484 $this->tpl->parseCurrentBlock();
1488 $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_COVERAGE",$this->lng->txt(
'meta_coverage'));
1490 $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1491 $this->tpl->setVariable(
"COVERAGE_LOOP_VAL_LANGUAGE",$this->
__showLanguageSelect(
'gen_coverage_language',
1492 $this->md_section->getCoverageLanguageCode()));
1494 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1502 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1504 if(!strlen(trim(
$_POST[
'gen_title'])))
1512 $this->md_section = $this->md_obj->getGeneral();
1513 $this->md_section->setStructure(
$_POST[
'gen_structure']);
1518 $this->md_section->update();
1521 if(is_array(
$_POST[
'gen_identifier']))
1525 $md_ide = $this->md_section->getIdentifier($id);
1533 if(is_array(
$_POST[
'gen_language']))
1537 $md_lan = $this->md_section->getLanguage($id);
1543 if(is_array(
$_POST[
'gen_description']))
1545 foreach(
$_POST[
'gen_description'] as $id =>
$data)
1547 $md_des = $this->md_section->getDescription($id);
1554 if(is_array(
$_POST[
'gen_keyword']))
1558 $md_key = $this->md_section->getKeyword($id);
1569 $this->ctrl->setParameter($this,
"section",
"meta_general");
1571 $this->ctrl->redirect($this,
'listSection');
1576 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1579 $this->md_section = $this->md_obj->getTechnical();
1586 $this->md_section->update();
1589 if(is_array(
$_POST[
'met_format']))
1593 $md_for = $this->md_section->getFormat($id);
1599 if(is_array(
$_POST[
'met_location']))
1603 $md_loc = $this->md_section->getLocation($id);
1609 if(is_array(
$_POST[
'met_re']))
1614 $md_re = $this->md_section->getRequirement($id);
1635 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1637 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_technical.html',
'Services/MetaData');
1640 $this->ctrl->setParameter($this,
"section",
"meta_technical");
1641 if(!is_object($this->md_section = $this->md_obj->getTechnical()))
1643 $this->tpl->setCurrentBlock(
"no_technical");
1644 $this->tpl->setVariable(
"TXT_NO_TECHNICAL", $this->lng->txt(
"meta_no_technical"));
1645 $this->tpl->setVariable(
"TXT_ADD_TECHNICAL", $this->lng->txt(
"meta_add"));
1646 $this->tpl->setVariable(
"ACTION_ADD_TECHNICAL",$this->ctrl->getLinkTarget($this,
"addSection"));
1647 $this->tpl->parseCurrentBlock();
1651 $this->ctrl->setReturn($this,
'listTechnical');
1652 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
1654 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1655 $this->tpl->setVariable(
"TXT_TECHNICAL",$this->lng->txt(
'meta_technical'));
1658 $this->tpl->setVariable(
"ACTION_DELETE",
1659 $this->ctrl->getLinkTarget($this,
"deleteSection"));
1660 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
1666 foreach($ids = $this->md_section->getFormatIds() as $id)
1668 $md_for =& $this->md_section->getFormat($id);
1670 $this->tpl->setCurrentBlock(
"format_loop");
1672 $this->ctrl->setParameter($this,
'meta_index',$id);
1673 $this->ctrl->setParameter($this,
'meta_path',
'meta_format');
1674 $this->tpl->setVariable(
"FORMAT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1675 $this->tpl->setVariable(
"FORMAT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1677 $this->tpl->setVariable(
"FORMAT_LOOP_NO",$id);
1678 $this->tpl->setVariable(
"FORMAT_LOOP_TXT_FORMAT",$this->lng->txt(
'meta_format'));
1681 $this->tpl->parseCurrentBlock();
1684 $this->tpl->setVariable(
"SIZE_TXT_SIZE",$this->lng->txt(
'meta_size'));
1688 foreach($ids = $this->md_section->getLocationIds() as $id)
1690 $md_loc =& $this->md_section->getLocation($id);
1692 $this->tpl->setCurrentBlock(
"location_loop");
1694 $this->ctrl->setParameter($this,
'meta_index',$id);
1695 $this->ctrl->setParameter($this,
'meta_path',
'meta_location');
1696 $this->tpl->setVariable(
"LOCATION_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1697 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1699 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_LOCATION",$this->lng->txt(
'meta_location'));
1700 $this->tpl->setVariable(
"LOCATION_LOOP_NO",$id);
1701 $this->tpl->setVariable(
"LOCATION_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1704 $this->tpl->setVariable(
"SEL_LOCATION_TYPE",
1706 "met_location[".$id.
"][Type]",
1707 array(0 => $this->lng->txt(
'meta_please_select'))));
1708 $this->tpl->parseCurrentBlock();
1711 foreach($ids = $this->md_section->getRequirementIds() as $id)
1713 $md_re =& $this->md_section->getRequirement($id);
1715 $this->tpl->setCurrentBlock(
"requirement_loop");
1717 $this->ctrl->setParameter($this,
'meta_index',$id);
1718 $this->ctrl->setParameter($this,
'meta_path',
'meta_requirement');
1719 $this->tpl->setVariable(
"REQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1720 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1722 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt(
'meta_requirement'));
1723 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1724 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt(
'meta_operating_system'));
1725 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt(
'meta_browser'));
1726 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_NAME",$this->lng->txt(
'meta_name'));
1727 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt(
'meta_minimum_version'));
1728 $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt(
'meta_maximum_version'));
1730 $this->tpl->setVariable(
"REQUIREMENT_LOOP_NO",$id);
1731 $this->tpl->setVariable(
"REQUIREMENT_SEL_OS_NAME",
1733 "met_re[".$id.
"][os][name]",
1734 array(0 => $this->lng->txt(
'meta_please_select'))));
1735 $this->tpl->setVariable(
"REQUIREMENT_SEL_BROWSER_NAME",
1737 "met_re[".$id.
"][browser][name]",
1738 array(0 => $this->lng->txt(
'meta_please_select'))));
1740 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
1743 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
1746 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
1749 $this->tpl->setVariable(
"REQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
1751 $this->tpl->parseCurrentBlock();
1755 foreach($ids = $this->md_section->getOrCompositeIds() as $or_id)
1757 $md_or =& $this->md_section->getOrComposite($or_id);
1758 foreach($ids = $md_or->getRequirementIds() as $id)
1760 $md_re =& $this->md_section->getRequirement($id);
1762 $this->tpl->setCurrentBlock(
"orrequirement_loop");
1764 $this->ctrl->setParameter($this,
'meta_index',$id);
1765 $this->ctrl->setParameter($this,
'meta_path',
'meta_requirement');
1766 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1767 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1769 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_REQUIREMENT",$this->lng->txt(
'meta_requirement'));
1770 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_TYPE",$this->lng->txt(
'meta_type'));
1771 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_OPERATINGSYSTEM",$this->lng->txt(
'meta_operating_system'));
1772 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_BROWSER",$this->lng->txt(
'meta_browser'));
1773 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_NAME",$this->lng->txt(
'meta_name'));
1774 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MINIMUMVERSION",$this->lng->txt(
'meta_minimum_version'));
1775 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MAXIMUMVERSION",$this->lng->txt(
'meta_maximum_version'));
1777 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_NO",$id);
1778 $this->tpl->setVariable(
"ORREQUIREMENT_SEL_OS_NAME",
1780 "met_re[".$id.
"][os][name]",
1781 array(0 => $this->lng->txt(
'meta_please_select'))));
1782 $this->tpl->setVariable(
"ORREQUIREMENT_SEL_BROWSER_NAME",
1784 "met_re[".$id.
"][browser][name]",
1785 array(0 => $this->lng->txt(
'meta_please_select'))));
1787 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
1790 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
1793 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
1796 $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
1798 $this->tpl->parseCurrentBlock();
1800 $this->tpl->setCurrentBlock(
"orcomposite_loop");
1802 $this->ctrl->setParameter($this,
'meta_index',$or_id);
1803 $this->ctrl->setParameter($this,
'meta_path',
'meta_or_composite');
1804 $this->ctrl->setParameter($this,
'meta_technical',$this->md_section->getMetaId());
1805 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1806 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1808 $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_ORCOMPOSITE",$this->lng->txt(
'meta_or_composite'));
1809 $this->tpl->parseCurrentBlock();
1813 $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_INSTALLATIONREMARKS",$this->lng->txt(
'meta_installation_remarks'));
1814 $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1816 $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL",
ilUtil::prepareFormOutput($this->md_section->getInstallationRemarks()));
1817 $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL_LANGUAGE",
1819 $this->md_section->getInstallationRemarksLanguageCode()));
1822 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_OTHERPLATTFORMREQUIREMENTS",
1823 $this->lng->txt(
'meta_other_plattform_requirements'));
1824 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1826 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_VAL",
1828 $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_VAL_LANGUAGE",
1830 $this->md_section->getOtherPlatformRequirementsLanguageCode()));
1833 $this->tpl->setVariable(
"DURATION_TXT_DURATION",$this->lng->txt(
'meta_duration'));
1836 $this->tpl->setCurrentBlock(
"technical");
1837 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1838 $this->tpl->parseCurrentBlock();
1845 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
1847 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_lifecycle.html',
'Services/MetaData');
1850 $this->ctrl->setParameter($this,
"section",
"meta_lifecycle");
1851 if(!is_object($this->md_section = $this->md_obj->getLifecycle()))
1853 $this->tpl->setCurrentBlock(
"no_lifecycle");
1854 $this->tpl->setVariable(
"TXT_NO_LIFECYCLE", $this->lng->txt(
"meta_no_lifecycle"));
1855 $this->tpl->setVariable(
"TXT_ADD_LIFECYCLE", $this->lng->txt(
"meta_add"));
1856 $this->tpl->setVariable(
"ACTION_ADD_LIFECYCLE",$this->ctrl->getLinkTarget($this,
"addSection"));
1857 $this->tpl->parseCurrentBlock();
1861 $this->ctrl->setReturn($this,
'listLifecycle');
1862 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
1864 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
1865 $this->tpl->setVariable(
"TXT_LIFECYCLE",$this->lng->txt(
'meta_lifecycle'));
1868 $this->tpl->setVariable(
"ACTION_DELETE",
1869 $this->ctrl->getLinkTarget($this,
"deleteSection"));
1870 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
1876 $this->tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'meta_status'));
1879 array(0 => $this->lng->txt(
'meta_please_select'))));
1881 $this->tpl->setVariable(
"TXT_VERSION",$this->lng->txt(
'meta_version'));
1884 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
1886 $this->md_section->getVersionLanguageCode()));
1889 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
1891 $md_con = $this->md_section->getContribute($con_id);
1895 $this->ctrl->setParameter($this,
'meta_index',$con_id);
1896 $this->ctrl->setParameter($this,
'meta_path',
'meta_contribute');
1898 $this->tpl->setCurrentBlock(
"contribute_delete");
1899 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1900 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1901 $this->tpl->parseCurrentBlock();
1904 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
1906 $md_ent = $md_con->getEntity($ent_id);
1908 $this->ctrl->setParameter($this,
'meta_path',
'meta_entity');
1910 if(count($ent_ids) > 1)
1912 $this->tpl->setCurrentBlock(
"contribute_entity_delete");
1914 $this->ctrl->setParameter($this,
'meta_index',$ent_id);
1915 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
1916 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
1917 $this->tpl->parseCurrentBlock();
1920 $this->tpl->setCurrentBlock(
"contribute_entity_loop");
1922 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
1923 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
1925 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt(
'meta_entity'));
1926 $this->tpl->parseCurrentBlock();
1928 $this->tpl->setCurrentBlock(
"contribute_loop");
1930 $this->ctrl->setParameter($this,
'section_element',
'meta_entity');
1931 $this->ctrl->setParameter($this,
'meta_index',$con_id);
1932 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,
'addSectionElement'));
1933 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD",
1934 $this->lng->txt(
'add').
" ".$this->lng->txt(
'meta_entity'));
1936 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
1937 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt(
'meta_contribute'));
1938 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt(
'meta_role'));
1940 "met_contribute[".$con_id.
"][Role]",
1941 array(0 => $this->lng->txt(
'meta_please_select'))));
1942 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt(
'meta_date'));
1943 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO",$con_id);
1946 $this->tpl->parseCurrentBlock();
1948 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
1954 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
1957 $this->md_section = $this->md_obj->getLifecycle();
1960 $this->md_section->setStatus(
$_POST[
'lif_status']);
1961 $this->md_section->update();
1964 if(is_array(
$_POST[
'met_identifier']))
1968 $md_ide = $this->md_section->getIdentifier($id);
1975 if(is_array(
$_POST[
'met_contribute']))
1979 $md_con =& $this->md_section->getContribute($id);
1984 if(is_array(
$_POST[
'met_entity'][$id]))
1986 foreach(
$_POST[
'met_entity'][$id] as $ent_id =>
$data)
1988 $md_ent =& $md_con->getEntity($ent_id);
2007 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2009 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_meta_metadata.html',
'Services/MetaData');
2012 $this->ctrl->setParameter($this,
"section",
"meta_meta_metadata");
2013 if(!is_object($this->md_section = $this->md_obj->getMetaMetadata()))
2015 $this->tpl->setCurrentBlock(
"no_meta_meta");
2016 $this->tpl->setVariable(
"TXT_NO_META_META", $this->lng->txt(
"meta_no_meta_metadata"));
2017 $this->tpl->setVariable(
"TXT_ADD_META_META", $this->lng->txt(
"meta_add"));
2018 $this->tpl->setVariable(
"ACTION_ADD_META_META",$this->ctrl->getLinkTarget($this,
"addSection"));
2019 $this->tpl->parseCurrentBlock();
2023 $this->ctrl->setReturn($this,
'listMetaMetaData');
2024 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2026 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2027 $this->tpl->setVariable(
"TXT_META_METADATA",$this->lng->txt(
'meta_meta_metadata'));
2030 $this->tpl->setVariable(
"ACTION_DELETE",
2031 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2032 $this->tpl->setVariable(
"TXT_DELETE",$this->lng->txt(
'delete'));
2037 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
'meta_language'));
2039 $this->tpl->setVariable(
"VAL_LANGUAGE",$this->
__showLanguageSelect(
'met_language',$this->md_section->getLanguageCode()));
2040 $this->tpl->setVariable(
"TXT_METADATASCHEME",$this->lng->txt(
'meta_metadatascheme'));
2041 $this->tpl->setVariable(
"VAL_METADATASCHEME",$this->md_section->getMetaDataScheme());
2045 foreach($ids = $this->md_section->getIdentifierIds() as $id)
2047 $md_ide = $this->md_section->getIdentifier($id);
2051 $this->ctrl->setParameter($this,
'meta_index',$id);
2052 $this->ctrl->setParameter($this,
'meta_path',
'meta_identifier');
2054 $this->tpl->setCurrentBlock(
"identifier_delete");
2055 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2056 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2057 $this->tpl->parseCurrentBlock();
2060 $this->tpl->setCurrentBlock(
"identifier_loop");
2061 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $id);
2062 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
2063 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
2064 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
2066 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
2067 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
2069 $this->tpl->parseCurrentBlock();
2073 foreach(($ids = $this->md_section->getContributeIds()) as $con_id)
2075 $md_con = $this->md_section->getContribute($con_id);
2079 $this->ctrl->setParameter($this,
'meta_index',$con_id);
2080 $this->ctrl->setParameter($this,
'meta_path',
'meta_contribute');
2082 $this->tpl->setCurrentBlock(
"contribute_delete");
2083 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2084 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2085 $this->tpl->parseCurrentBlock();
2088 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
2090 $md_ent = $md_con->getEntity($ent_id);
2092 $this->ctrl->setParameter($this,
'meta_path',
'meta_entity');
2094 if(count($ent_ids) > 1)
2096 $this->tpl->setCurrentBlock(
"contribute_entity_delete");
2098 $this->ctrl->setParameter($this,
'meta_index',$ent_id);
2099 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE",$this->ctrl->getLinkTarget($this,
'deleteElement'));
2100 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE",$this->lng->txt(
'delete'));
2101 $this->tpl->parseCurrentBlock();
2104 $this->tpl->setCurrentBlock(
"contribute_entity_loop");
2106 $this->ctrl->setParameter($this,
'section_element',
'meta_entity');
2107 $this->ctrl->setParameter($this,
'meta_index',$con_id);
2108 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD",$this->ctrl->getLinkTarget($this,
'addSectionElement'));
2109 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD",$this->lng->txt(
'add'));
2112 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO",$con_id);
2113 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO",$ent_id);
2115 $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY",$this->lng->txt(
'meta_entity'));
2116 $this->tpl->parseCurrentBlock();
2118 $this->tpl->setCurrentBlock(
"contribute_loop");
2119 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN",2 + count($ent_ids));
2120 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE",$this->lng->txt(
'meta_contribute'));
2121 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE",$this->lng->txt(
'meta_role'));
2123 "met_contribute[".$con_id.
"][Role]",
2124 array(0 => $this->lng->txt(
'meta_please_select'))));
2125 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE",$this->lng->txt(
'meta_date'));
2126 $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO",$con_id);
2129 $this->tpl->parseCurrentBlock();
2131 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
2137 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2140 $this->md_section = $this->md_obj->getMetaMetadata();
2142 $this->md_section->update();
2145 if(is_array(
$_POST[
'met_identifier']))
2149 $md_ide = $this->md_section->getIdentifier($id);
2156 if(is_array(
$_POST[
'met_contribute']))
2160 $md_con =& $this->md_section->getContribute($id);
2165 if(is_array(
$_POST[
'met_entity'][$id]))
2167 foreach(
$_POST[
'met_entity'][$id] as $ent_id =>
$data)
2169 $md_ent =& $md_con->getEntity($ent_id);
2188 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2190 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_rights.html',
'Services/MetaData');
2192 if(!is_object($this->md_section = $this->md_obj->getRights()))
2194 $this->tpl->setCurrentBlock(
"no_rights");
2195 $this->tpl->setVariable(
"TXT_NO_RIGHTS", $this->lng->txt(
"meta_no_rights"));
2196 $this->tpl->setVariable(
"TXT_ADD_RIGHTS", $this->lng->txt(
"meta_add"));
2197 $this->ctrl->setParameter($this,
"section",
"meta_rights");
2198 $this->tpl->setVariable(
"ACTION_ADD_RIGHTS",
2199 $this->ctrl->getLinkTarget($this,
"addSection"));
2200 $this->tpl->parseCurrentBlock();
2205 $this->ctrl->setReturn($this,
'listRights');
2206 $this->ctrl->setParameter($this,
'section',
'meta_rights');
2207 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2209 $this->tpl->setVariable(
"TXT_RIGHTS", $this->lng->txt(
"meta_rights"));
2210 $this->tpl->setVariable(
"TXT_COST", $this->lng->txt(
"meta_cost"));
2211 $this->tpl->setVariable(
"TXT_COPYRIGHTANDOTHERRESTRICTIONS", $this->lng->txt(
"meta_copyright_and_other_restrictions"));
2212 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2213 $this->tpl->setVariable(
"TXT_YES", $this->lng->txt(
"meta_yes"));
2214 $this->tpl->setVariable(
"TXT_NO", $this->lng->txt(
"meta_no"));
2216 $this->ctrl->setParameter($this,
"section",
"meta_rights");
2217 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2218 $this->tpl->setVariable(
"ACTION_DELETE",
2219 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2221 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2223 $this->tpl->setVariable(
"VAL_COST_".strtoupper($this->md_section->getCosts()),
" selected");
2224 $this->tpl->setVariable(
"VAL_COPYRIGHTANDOTHERRESTRICTIONS_".
2225 strtoupper($this->md_section->getCopyrightAndOtherRestrictions()),
" selected");
2227 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2228 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2230 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2231 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2233 $this->md_section->getDescriptionLanguageCode()));
2235 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2237 $this->tpl->setCurrentBlock(
"rights");
2238 $this->tpl->parseCurrentBlock();
2245 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2248 $this->md_section = $this->md_obj->getRights();
2249 $this->md_section->setCosts(
$_POST[
'rights'][
'Cost']);
2250 $this->md_section->setCopyrightAndOtherRestrictions(
$_POST[
'rights'][
'CopyrightAndOtherRestrictions']);
2251 $this->md_section->setDescriptionLanguage(
new ilMDLanguageItem(
$_POST[
'rights'][
'DescriptionLanguage']));
2253 $this->md_section->update();
2265 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2267 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_educational.html',
'Services/MetaData');
2269 if(!is_object($this->md_section = $this->md_obj->getEducational()))
2271 $this->tpl->setCurrentBlock(
"no_educational");
2272 $this->tpl->setVariable(
"TXT_NO_EDUCATIONAL", $this->lng->txt(
"meta_no_educational"));
2273 $this->tpl->setVariable(
"TXT_ADD_EDUCATIONAL", $this->lng->txt(
"meta_add"));
2274 $this->ctrl->setParameter($this,
"section",
"meta_educational");
2275 $this->tpl->setVariable(
"ACTION_ADD_EDUCATIONAL",
2276 $this->ctrl->getLinkTarget($this,
"addSection"));
2277 $this->tpl->parseCurrentBlock();
2281 $this->ctrl->setReturn($this,
'listEducational');
2282 $this->ctrl->setParameter($this,
'section',
'meta_educational');
2283 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2285 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2286 $this->tpl->setVariable(
"ACTION_DELETE",
2287 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2289 $this->tpl->setVariable(
"TXT_EDUCATIONAL", $this->lng->txt(
"meta_educational"));
2290 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2291 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2292 $this->tpl->setVariable(
"TXT_TYPICALAGERANGE", $this->lng->txt(
"meta_typical_age_range"));
2293 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2294 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2295 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2296 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2298 $this->tpl->setVariable(
"TXT_INTERACTIVITYTYPE", $this->lng->txt(
"meta_interactivity_type"));
2299 $this->tpl->setVariable(
"TXT_LEARNINGRESOURCETYPE", $this->lng->txt(
"meta_learning_resource_type"));
2300 $this->tpl->setVariable(
"TXT_INTERACTIVITYLEVEL", $this->lng->txt(
"meta_interactivity_level"));
2301 $this->tpl->setVariable(
"TXT_SEMANTICDENSITY", $this->lng->txt(
"meta_semantic_density"));
2302 $this->tpl->setVariable(
"TXT_INTENDEDENDUSERROLE", $this->lng->txt(
"meta_intended_end_user_role"));
2303 $this->tpl->setVariable(
"TXT_CONTEXT", $this->lng->txt(
"meta_context"));
2304 $this->tpl->setVariable(
"TXT_DIFFICULTY", $this->lng->txt(
"meta_difficulty"));
2306 $this->tpl->setVariable(
"VAL_INTERACTIVITYTYPE_" . strtoupper($this->md_section->getInteractivityType()),
" selected");
2307 $this->tpl->setVariable(
"VAL_LEARNINGRESOURCETYPE_" . strtoupper($this->md_section->getLearningResourceType()),
" selected");
2308 $this->tpl->setVariable(
"VAL_INTERACTIVITYLEVEL_" . strtoupper($this->md_section->getInteractivityLevel()),
" selected");
2309 $this->tpl->setVariable(
"VAL_SEMANTICDENSITY_" . strtoupper($this->md_section->getSemanticDensity()),
" selected");
2310 $this->tpl->setVariable(
"VAL_INTENDEDENDUSERROLE_" . strtoupper($this->md_section->getIntendedEndUserRole()),
" selected");
2311 $this->tpl->setVariable(
"VAL_CONTEXT_" . strtoupper($this->md_section->getContext()),
" selected");
2312 $this->tpl->setVariable(
"VAL_DIFFICULTY_" . strtoupper($this->md_section->getDifficulty()),
" selected");
2313 #$this->tpl->setVariable("VAL_TYPICALLEARNINGTIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime())); 2315 $this->tpl->setVariable(
"TXT_ACTIVE", $this->lng->txt(
"meta_active"));
2316 $this->tpl->setVariable(
"TXT_EXPOSITIVE", $this->lng->txt(
"meta_expositive"));
2317 $this->tpl->setVariable(
"TXT_MIXED", $this->lng->txt(
"meta_mixed"));
2318 $this->tpl->setVariable(
"TXT_EXERCISE", $this->lng->txt(
"meta_exercise"));
2319 $this->tpl->setVariable(
"TXT_SIMULATION", $this->lng->txt(
"meta_simulation"));
2320 $this->tpl->setVariable(
"TXT_QUESTIONNAIRE", $this->lng->txt(
"meta_questionnaire"));
2321 $this->tpl->setVariable(
"TXT_DIAGRAMM", $this->lng->txt(
"meta_diagramm"));
2322 $this->tpl->setVariable(
"TXT_FIGURE", $this->lng->txt(
"meta_figure"));
2323 $this->tpl->setVariable(
"TXT_GRAPH", $this->lng->txt(
"meta_graph"));
2324 $this->tpl->setVariable(
"TXT_INDEX", $this->lng->txt(
"meta_index"));
2325 $this->tpl->setVariable(
"TXT_SLIDE", $this->lng->txt(
"meta_slide"));
2326 $this->tpl->setVariable(
"TXT_TABLE", $this->lng->txt(
"meta_table"));
2327 $this->tpl->setVariable(
"TXT_NARRATIVETEXT", $this->lng->txt(
"meta_narrative_text"));
2328 $this->tpl->setVariable(
"TXT_EXAM", $this->lng->txt(
"meta_exam"));
2329 $this->tpl->setVariable(
"TXT_EXPERIMENT", $this->lng->txt(
"meta_experiment"));
2330 $this->tpl->setVariable(
"TXT_PROBLEMSTATEMENT", $this->lng->txt(
"meta_problem_statement"));
2331 $this->tpl->setVariable(
"TXT_SELFASSESSMENT", $this->lng->txt(
"meta_self_assessment"));
2332 $this->tpl->setVariable(
"TXT_LECTURE", $this->lng->txt(
"meta_lecture"));
2333 $this->tpl->setVariable(
"TXT_VERYLOW", $this->lng->txt(
"meta_very_low"));
2334 $this->tpl->setVariable(
"TXT_LOW", $this->lng->txt(
"meta_low"));
2335 $this->tpl->setVariable(
"TXT_MEDIUM", $this->lng->txt(
"meta_medium"));
2336 $this->tpl->setVariable(
"TXT_HIGH", $this->lng->txt(
"meta_high"));
2337 $this->tpl->setVariable(
"TXT_VERYHIGH", $this->lng->txt(
"meta_very_high"));
2338 $this->tpl->setVariable(
"TXT_TEACHER", $this->lng->txt(
"meta_teacher"));
2339 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
2340 $this->tpl->setVariable(
"TXT_LEARNER", $this->lng->txt(
"meta_learner"));
2341 $this->tpl->setVariable(
"TXT_MANAGER", $this->lng->txt(
"meta_manager"));
2342 $this->tpl->setVariable(
"TXT_SCHOOL", $this->lng->txt(
"meta_school"));
2343 $this->tpl->setVariable(
"TXT_HIGHEREDUCATION", $this->lng->txt(
"meta_higher_education"));
2344 $this->tpl->setVariable(
"TXT_TRAINING", $this->lng->txt(
"meta_training"));
2345 $this->tpl->setVariable(
"TXT_OTHER", $this->lng->txt(
"meta_other"));
2346 $this->tpl->setVariable(
"TXT_VERYEASY", $this->lng->txt(
"meta_very_easy"));
2347 $this->tpl->setVariable(
"TXT_EASY", $this->lng->txt(
"meta_easy"));
2348 $this->tpl->setVariable(
"TXT_DIFFICULT", $this->lng->txt(
"meta_difficult"));
2349 $this->tpl->setVariable(
"TXT_VERYDIFFICULT", $this->lng->txt(
"meta_very_difficult"));
2350 $this->tpl->setVariable(
"TXT_TYPICALLEARNINGTIME", $this->lng->txt(
"meta_typical_learning_time"));
2354 $tlt =
array(0,0,0,0,0);
2357 include_once
'Services/MetaData/classes/class.ilMDUtils.php';
2361 if(strlen($this->md_section->getTypicalLearningTime()))
2363 $tlt =
array(0,0,0,0,0);
2368 $this->tpl->setVariable(
"TXT_MONTH",$this->lng->txt(
'md_months'));
2372 $this->tpl->setVariable(
"TXT_DAYS",$this->lng->txt(
'md_days'));
2373 $this->tpl->setVariable(
"TXT_TIME",$this->lng->txt(
'md_time'));
2375 $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME",$this->lng->txt(
'meta_typical_learning_time'));
2377 $tlt[2],$tlt[3],$tlt[4],
2379 $this->tpl->setVariable(
"TLT_HINT",$tlt[4] ?
'(hh:mm:ss)' :
'(hh:mm)');
2383 $this->tpl->setCurrentBlock(
"tlt_not_valid");
2384 $this->tpl->setVariable(
"TXT_CURRENT_VAL",$this->lng->txt(
'meta_current_value'));
2385 $this->tpl->setVariable(
"TLT",$this->md_section->getTypicalLearningTime());
2386 $this->tpl->setVariable(
"INFO_TLT_NOT_VALID",$this->lng->txt(
'meta_info_tlt_not_valid'));
2387 $this->tpl->parseCurrentBlock();
2393 foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
2395 $md_age = $this->md_section->getTypicalAgeRange($id);
2398 if (is_object($md_age))
2403 $this->tpl->setCurrentBlock(
"agerange_head");
2404 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_TYPICALAGERANGE",
2405 $this->lng->txt(
"meta_typical_age_range"));
2406 $this->tpl->setVariable(
"ROWSPAN_AGERANGE", count($ids));
2407 $this->tpl->parseCurrentBlock();
2412 $this->ctrl->setParameter($this,
'meta_index', $id);
2413 $this->ctrl->setParameter($this,
'meta_path',
'educational_typical_age_range');
2415 $this->tpl->setCurrentBlock(
"typicalagerange_delete");
2416 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_ACTION_DELETE",
2417 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2418 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2419 $this->tpl->parseCurrentBlock();
2421 $this->tpl->setCurrentBlock(
"typicalagerange_loop");
2422 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2424 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_NO", $id);
2425 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2426 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_VAL_LANGUAGE",
2428 $md_age->getTypicalAgeRangeLanguageCode()));
2429 $this->ctrl->setParameter($this,
"section_element",
"educational_typical_age_range");
2430 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_ACTION_ADD",
2431 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2432 $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2433 $this->tpl->parseCurrentBlock();
2439 foreach($ids = $this->md_section->getDescriptionIds() as $id)
2443 $this->tpl->setCurrentBlock(
"desc_head");
2444 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2445 $this->tpl->setVariable(
"ROWSPAN_DESC", count($ids));
2446 $this->tpl->parseCurrentBlock();
2450 $md_des = $this->md_section->getDescription($id);
2452 $this->ctrl->setParameter($this,
'meta_index', $id);
2453 $this->ctrl->setParameter($this,
'meta_path',
'educational_description');
2455 $this->tpl->setCurrentBlock(
"description_loop");
2456 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $id);
2457 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2459 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2460 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2462 $md_des->getDescriptionLanguageCode()));
2463 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",
2464 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2465 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2466 $this->ctrl->setParameter($this,
"section_element",
"educational_description");
2467 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_ADD",
2468 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2469 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2470 $this->tpl->parseCurrentBlock();
2476 foreach($ids = $this->md_section->getLanguageIds() as $id)
2480 $this->tpl->setCurrentBlock(
"language_head");
2481 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2482 $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
2483 $this->tpl->parseCurrentBlock();
2487 $md_lang = $this->md_section->getLanguage($id);
2489 $this->ctrl->setParameter($this,
'meta_index', $id);
2490 $this->ctrl->setParameter($this,
'meta_path',
'educational_language');
2492 $this->tpl->setCurrentBlock(
"language_loop");
2493 $this->tpl->setVariable(
"LANGUAGE_LOOP_VAL_LANGUAGE",
2495 $md_lang->getLanguageCode()));
2497 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE",
2498 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2499 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2500 $this->ctrl->setParameter($this,
"section_element",
"educational_language");
2501 $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_ADD",
2502 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2503 $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2504 $this->tpl->parseCurrentBlock();
2508 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2510 $this->tpl->setCurrentBlock(
"educational");
2511 $this->tpl->parseCurrentBlock();
2517 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2520 $this->md_section = $this->md_obj->getEducational();
2521 $this->md_section->setInteractivityType(
$_POST[
'educational'][
'InteractivityType']);
2522 $this->md_section->setLearningResourceType(
$_POST[
'educational'][
'LearningResourceType']);
2523 $this->md_section->setInteractivityLevel(
$_POST[
'educational'][
'InteractivityLevel']);
2524 $this->md_section->setSemanticDensity(
$_POST[
'educational'][
'SemanticDensity']);
2525 $this->md_section->setIntendedEndUserRole(
$_POST[
'educational'][
'IntendedEndUserRole']);
2526 $this->md_section->setContext(
$_POST[
'educational'][
'Context']);
2527 $this->md_section->setDifficulty(
$_POST[
'educational'][
'Difficulty']);
2535 $this->md_section->setPhysicalTypicalLearningTime((
int)$_POST[
'tlt'][
'mo'],(
int)$_POST[
'tlt'][
'd'],
2536 (
int)$_POST[
'tlt'][
'h'],(
int)$_POST[
'tlt'][
'm'],(
int)$_POST[
'tlt'][
's']);
2540 $this->md_section->setTypicalLearningTime(
'');
2546 foreach($ids = $this->md_section->getTypicalAgeRangeIds() as $id)
2548 $md_age = $this->md_section->getTypicalAgeRange($id);
2549 $md_age->setTypicalAgeRange(
ilUtil::stripSlashes($_POST[
'educational'][
'TypicalAgeRange'][$id][
'Value']));
2550 $md_age->setTypicalAgeRangeLanguage(
2551 new ilMDLanguageItem($_POST[
'educational'][
'TypicalAgeRange'][$id][
'Language']));
2556 foreach($ids = $this->md_section->getDescriptionIds() as $id)
2558 $md_des = $this->md_section->getDescription($id);
2559 $md_des->setDescription(
ilUtil::stripSlashes($_POST[
'educational'][
'Description'][$id][
'Value']));
2560 $md_des->setDescriptionLanguage(
2561 new ilMDLanguageItem($_POST[
'educational'][
'Description'][$id][
'Language']));
2566 foreach($ids = $this->md_section->getLanguageIds() as $id)
2568 $md_lang = $this->md_section->getLanguage($id);
2569 $md_lang->setLanguage(
2574 $this->md_section->update();
2586 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2588 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_relation.html',
'Services/MetaData');
2590 $rel_ids = $this->md_obj->getRelationIds();
2591 if (!is_array($rel_ids) || count($rel_ids) == 0)
2593 $this->tpl->setCurrentBlock(
"no_relation");
2594 $this->tpl->setVariable(
"TXT_NO_RELATION", $this->lng->txt(
"meta_no_relation"));
2595 $this->tpl->setVariable(
"TXT_ADD_RELATION", $this->lng->txt(
"meta_add"));
2596 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2597 $this->tpl->setVariable(
"ACTION_ADD_RELATION",
2598 $this->ctrl->getLinkTarget($this,
"addSection"));
2599 $this->tpl->parseCurrentBlock();
2603 foreach($rel_ids as $rel_id)
2605 $this->md_section = $this->md_obj->getRelation($rel_id);
2607 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2608 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2611 $res_ids = $this->md_section->getIdentifier_Ids();
2612 foreach ($res_ids as $res_id)
2614 $ident = $this->md_section->getIdentifier_($res_id);
2615 $this->ctrl->setParameter($this,
"meta_index", $res_id);
2617 if (count($res_ids) > 1)
2619 $this->tpl->setCurrentBlock(
"identifier_delete");
2620 $this->ctrl->setParameter($this,
"meta_path",
"relation_resource_identifier");
2621 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE",
2622 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2623 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2624 $this->tpl->parseCurrentBlock();
2627 $this->tpl->setCurrentBlock(
"identifier_loop");
2629 $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $res_id);
2630 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
2631 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2632 $this->ctrl->setParameter($this,
"section_element",
"relation_resource_identifier");
2633 $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_ADD",
2634 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2635 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2636 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
2637 $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
2638 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_CATALOG",
2640 $this->tpl->setVariable(
"IDENTIFIER_LOOP_VAL_ENTRY",
2642 $this->tpl->parseCurrentBlock();
2646 $res_dess = $this->md_section->getDescriptionIds();
2647 foreach ($res_dess as $res_des)
2649 $des = $this->md_section->getDescription($res_des);
2650 $this->ctrl->setParameter($this,
"meta_index", $res_des);
2652 if (count($res_dess) > 1)
2654 $this->tpl->setCurrentBlock(
"description_delete");
2655 $this->ctrl->setParameter($this,
"meta_path",
"relation_resource_description");
2656 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE",
2657 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2658 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2659 $this->tpl->parseCurrentBlock();
2662 $this->tpl->setCurrentBlock(
"description_loop");
2663 $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $res_des);
2664 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2665 $this->ctrl->setParameter($this,
'meta_index', $rel_id);
2666 $this->ctrl->setParameter($this,
"section_element",
"relation_resource_description");
2667 $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_ADD",
2668 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2669 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2670 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2671 $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2672 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL",
2674 $this->tpl->setVariable(
"DESCRIPTION_LOOP_VAL_LANGUAGE",
2676 $des->getDescriptionLanguageCode()));
2677 $this->tpl->parseCurrentBlock();
2680 $this->tpl->setCurrentBlock(
"relation_loop");
2681 $this->tpl->setVariable(
"REL_ID", $rel_id);
2682 $this->tpl->setVariable(
"TXT_RELATION", $this->lng->txt(
"meta_relation"));
2683 $this->ctrl->setParameter($this,
"meta_index", $this->md_section->getMetaId());
2684 $this->tpl->setVariable(
"ACTION_DELETE",
2685 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2686 $this->ctrl->setParameter($this,
"section",
"meta_relation");
2687 $this->tpl->setVariable(
"ACTION_ADD",
2688 $this->ctrl->getLinkTarget($this,
"addSection"));
2689 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2690 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2691 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
2692 $this->tpl->setVariable(
"TXT_KIND", $this->lng->txt(
"meta_kind"));
2693 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
2694 $this->tpl->setVariable(
"TXT_ISPARTOF", $this->lng->txt(
"meta_is_part_of"));
2695 $this->tpl->setVariable(
"TXT_HASPART", $this->lng->txt(
"meta_has_part"));
2696 $this->tpl->setVariable(
"TXT_ISVERSIONOF", $this->lng->txt(
"meta_is_version_of"));
2697 $this->tpl->setVariable(
"TXT_HASVERSION", $this->lng->txt(
"meta_has_version"));
2698 $this->tpl->setVariable(
"TXT_ISFORMATOF", $this->lng->txt(
"meta_is_format_of"));
2699 $this->tpl->setVariable(
"TXT_HASFORMAT", $this->lng->txt(
"meta_has_format"));
2700 $this->tpl->setVariable(
"TXT_REFERENCES", $this->lng->txt(
"meta_references"));
2701 $this->tpl->setVariable(
"TXT_ISREFERENCEDBY", $this->lng->txt(
"meta_is_referenced_by"));
2702 $this->tpl->setVariable(
"TXT_ISBASEDON", $this->lng->txt(
"meta_is_based_on"));
2703 $this->tpl->setVariable(
"TXT_ISBASISFOR", $this->lng->txt(
"meta_is_basis_for"));
2704 $this->tpl->setVariable(
"TXT_REQUIRES", $this->lng->txt(
"meta_requires"));
2705 $this->tpl->setVariable(
"TXT_ISREQUIREDBY", $this->lng->txt(
"meta_is_required_by"));
2706 $this->tpl->setVariable(
"TXT_RESOURCE", $this->lng->txt(
"meta_resource"));
2707 $this->tpl->setVariable(
"VAL_KIND_" . strtoupper($this->md_section->getKind()),
" selected");
2708 $this->tpl->parseCurrentBlock();
2711 $this->tpl->setCurrentBlock(
"relation");
2712 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2713 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2714 $this->tpl->parseCurrentBlock();
2720 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2723 foreach($ids = $this->md_obj->getRelationIds() as $id)
2726 $relation = $this->md_obj->getRelation($id);
2727 $relation->setKind(
$_POST[
'relation'][$id][
'Kind']);
2729 $relation->update();
2732 $res_idents = $relation->getIdentifier_Ids();
2733 foreach ($res_idents as $res_id)
2735 $ident = $relation->getIdentifier_($res_id);
2742 $res_dess = $relation->getDescriptionIds();
2743 foreach ($res_dess as $res_des)
2745 $des = $relation->getDescription($res_des);
2747 $des->setDescriptionLanguage(
2763 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2765 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_annotation.html',
'Services/MetaData');
2767 $anno_ids = $this->md_obj->getAnnotationIds();
2768 if (!is_array($anno_ids) || count($anno_ids) == 0)
2770 $this->tpl->setCurrentBlock(
"no_annotation");
2771 $this->tpl->setVariable(
"TXT_NO_ANNOTATION", $this->lng->txt(
"meta_no_annotation"));
2772 $this->tpl->setVariable(
"TXT_ADD_ANNOTATION", $this->lng->txt(
"meta_add"));
2773 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2774 $this->tpl->setVariable(
"ACTION_ADD_ANNOTATION",
2775 $this->ctrl->getLinkTarget($this,
"addSection"));
2776 $this->tpl->parseCurrentBlock();
2780 foreach($anno_ids as $anno_id)
2782 $this->ctrl->setParameter($this,
'meta_index', $anno_id);
2783 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2785 $this->md_section = $this->md_obj->getAnnotation($anno_id);
2787 $this->tpl->setCurrentBlock(
"annotation_loop");
2788 $this->tpl->setVariable(
"ANNOTATION_ID", $anno_id);
2789 $this->tpl->setVariable(
"TXT_ANNOTATION", $this->lng->txt(
"meta_annotation"));
2790 $this->ctrl->setParameter($this,
"meta_index", $anno_id);
2791 $this->tpl->setVariable(
"ACTION_DELETE",
2792 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2793 $this->ctrl->setParameter($this,
"section",
"meta_annotation");
2794 $this->tpl->setVariable(
"ACTION_ADD",
2795 $this->ctrl->getLinkTarget($this,
"addSection"));
2796 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2797 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
2799 $this->tpl->setVariable(
"TXT_ENTITY", $this->lng->txt(
"meta_entity"));
2801 $this->tpl->setVariable(
"TXT_DATE", $this->lng->txt(
"meta_date"));
2805 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2806 $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
2808 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2809 $this->tpl->setVariable(
"VAL_DESCRIPTION_LANGUAGE",
2811 $this->md_section->getDescriptionLanguageCode()));
2813 $this->tpl->parseCurrentBlock();
2816 $this->tpl->setCurrentBlock(
"annotation");
2817 $this->tpl->setVariable(
"EDIT_ACTION",$this->ctrl->getFormAction($this));
2818 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
2819 $this->tpl->parseCurrentBlock();
2825 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
2828 foreach($ids = $this->md_obj->getAnnotationIds() as $id)
2831 $annotation = $this->md_obj->getAnnotation($id);
2835 $annotation->setDescriptionLanguage(
2838 $annotation->update();
2851 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.md_editor.html',
'Services/MetaData');
2852 $this->
__setTabs(
'meta_classification');
2853 $this->tpl->addBlockFile(
'MD_CONTENT',
'md_content',
'tpl.md_classification.html',
'Services/MetaData');
2855 $class_ids = $this->md_obj->getClassificationIds();
2856 if (!is_array($class_ids) || count($class_ids) == 0)
2858 $this->tpl->setCurrentBlock(
"no_classification");
2859 $this->tpl->setVariable(
"TXT_NO_CLASSIFICATION", $this->lng->txt(
"meta_no_classification"));
2860 $this->tpl->setVariable(
"TXT_ADD_CLASSIFICATION", $this->lng->txt(
"meta_add"));
2861 $this->ctrl->setParameter($this,
"section",
"meta_classification");
2862 $this->tpl->setVariable(
"ACTION_ADD_CLASSIFICATION",
2863 $this->ctrl->getLinkTarget($this,
"addSection"));
2864 $this->tpl->parseCurrentBlock();
2868 foreach($class_ids as $class_id)
2870 $this->md_section = $this->md_obj->getClassification($class_id);
2871 $this->ctrl->setParameter($this,
"section",
"meta_classification");
2874 $tp_ids = $this->md_section->getTaxonPathIds();
2875 foreach ($tp_ids as $tp_id)
2877 $tax_path = $this->md_section->getTaxonPath($tp_id);
2879 $tax_ids = $tax_path->getTaxonIds();
2881 foreach($tax_ids as $tax_id)
2883 $taxon = $tax_path->getTaxon($tax_id);
2885 if (count($tax_ids) > 1)
2887 $this->tpl->setCurrentBlock(
"taxon_delete");
2888 $this->ctrl->setParameter($this,
"meta_index", $tax_id);
2889 $this->ctrl->setParameter($this,
"meta_path",
"classification_taxon");
2890 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_ACTION_DELETE",
2891 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2892 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2893 $this->tpl->parseCurrentBlock();
2896 $this->tpl->setCurrentBlock(
"taxonpath_taxon_loop");
2897 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_NO", $tax_id);
2898 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TAXONPATH_NO", $tp_id);
2899 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_TAXON", $this->lng->txt(
"meta_taxon"));
2900 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2902 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ID", $this->lng->txt(
"meta_id"));
2904 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2905 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_VAL_TAXON_LANGUAGE",
2907 $taxon->getTaxonLanguageCode()));
2909 $this->ctrl->setParameter($this,
"section_element",
"Taxon_".$class_id);
2910 $this->ctrl->setParameter($this,
"meta_index", $tp_id);
2911 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_ACTION_ADD",
2912 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2913 $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2914 $this->tpl->parseCurrentBlock();
2917 if (count($tp_ids) > 1)
2919 $this->tpl->setCurrentBlock(
"taxonpath_delete");
2920 $this->ctrl->setParameter($this,
"meta_index", $tp_id);
2921 $this->ctrl->setParameter($this,
"meta_path",
"classification_taxon_path");
2922 $this->tpl->setVariable(
"TAXONPATH_LOOP_ACTION_DELETE",
2923 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2924 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2925 $this->tpl->parseCurrentBlock();
2928 $this->tpl->setCurrentBlock(
"taxonpath_loop");
2929 $this->tpl->setVariable(
"TAXONPATH_LOOP_NO", $tp_id);
2930 $this->tpl->setVariable(
"TAXONPATH_LOOP_ROWSPAN", (3 * count($tax_ids)) + 2);
2931 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
2932 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_SOURCE", $this->lng->txt(
"meta_source"));
2933 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2934 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2936 $this->tpl->setVariable(
"TAXONPATH_LOOP_VAL_SOURCE_LANGUAGE",
2938 $tax_path->getSourceLanguageCode()));
2939 $this->ctrl->setParameter($this,
"section_element",
"TaxonPath_".$class_id);
2940 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2941 $this->tpl->setVariable(
"TAXONPATH_LOOP_ACTION_ADD",
2942 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2943 $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2944 $this->tpl->parseCurrentBlock();
2948 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
2949 $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
2950 $this->tpl->setVariable(
"VAL_DESCRIPTION",
2952 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2953 $this->tpl->setVariable(
"VAL_DESCRIPTION_LANGUAGE",
2955 $this->md_section->getDescriptionLanguageCode()));
2958 $key_ids = $this->md_section->getKeywordIds();
2959 foreach ($key_ids as $key_id)
2961 if (count($key_ids) > 1)
2963 $this->ctrl->setParameter($this,
"meta_index", $key_id);
2964 $this->ctrl->setParameter($this,
"meta_path",
"classification_keyword");
2965 $this->tpl->setCurrentBlock(
"keyword_delete");
2966 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE",
2967 $this->ctrl->getLinkTarget($this,
"deleteElement"));
2968 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
2969 $this->tpl->parseCurrentBlock();
2972 $keyword = $this->md_section->getKeyword($key_id);
2973 $this->tpl->setCurrentBlock(
"keyword_loop");
2974 $this->tpl->setVariable(
"KEYWORD_LOOP_NO", $key_id);
2975 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
2976 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
2977 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL",
2979 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
2980 $this->tpl->setVariable(
"KEYWORD_LOOP_VAL_LANGUAGE",
2982 $keyword->getKeywordLanguageCode()));
2983 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2984 $this->ctrl->setParameter($this,
"section_element",
"Keyword_".$class_id);
2985 $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_ADD",
2986 $this->ctrl->getLinkTarget($this,
"addSectionElement"));
2987 $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
2988 $this->tpl->parseCurrentBlock();
2991 $this->tpl->setCurrentBlock(
"classification_loop");
2992 $this->tpl->setVariable(
"TXT_CLASSIFICATION", $this->lng->txt(
"meta_classification"));
2993 $this->ctrl->setParameter($this,
"meta_index", $class_id);
2994 $this->tpl->setVariable(
"ACTION_DELETE",
2995 $this->ctrl->getLinkTarget($this,
"deleteSection"));
2996 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
2997 $this->tpl->setVariable(
"ACTION_ADD",
2998 $this->ctrl->getLinkTarget($this,
"addSection"));
2999 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
3001 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
3002 $this->tpl->setVariable(
"TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
3003 $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
3004 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
3006 $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
3007 $this->tpl->setVariable(
"CLASS_ID", $class_id);
3008 $this->tpl->setVariable(
"TXT_PURPOSE", $this->lng->txt(
"meta_purpose"));
3009 $this->tpl->setVariable(
"TXT_DISCIPLINE", $this->lng->txt(
"meta_learning_resource_type"));
3010 $this->tpl->setVariable(
"TXT_IDEA", $this->lng->txt(
"meta_idea"));
3011 $this->tpl->setVariable(
"TXT_PREREQUISITE", $this->lng->txt(
"meta_prerequisite"));
3012 $this->tpl->setVariable(
"TXT_EDUCATIONALOBJECTIVE", $this->lng->txt(
"meta_educational_objective"));
3013 $this->tpl->setVariable(
"TXT_ACCESSIBILITYRESTRICTIONS", $this->lng->txt(
"meta_accessibility_restrictions"));
3014 $this->tpl->setVariable(
"TXT_EDUCATIONALLEVEL", $this->lng->txt(
"meta_educational_level"));
3015 $this->tpl->setVariable(
"TXT_SKILLLEVEL", $this->lng->txt(
"meta_skill_level"));
3016 $this->tpl->setVariable(
"TXT_SECURITYLEVEL", $this->lng->txt(
"meta_security_level"));
3017 $this->tpl->setVariable(
"TXT_COMPETENCY", $this->lng->txt(
"meta_competency"));
3018 $this->tpl->setVariable(
"VAL_PURPOSE_" . strtoupper($this->md_section->getPurpose()),
" selected");
3019 $this->tpl->parseCurrentBlock();
3022 $this->tpl->setCurrentBlock(
"classification");
3023 $this->tpl->setVariable(
"EDIT_ACTION",
3024 $this->ctrl->getFormAction($this));
3025 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
3026 $this->tpl->parseCurrentBlock();
3032 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
3035 foreach($ids = $this->md_obj->getClassificationIds() as $id)
3038 $classification = $this->md_obj->getClassification($id);
3039 $classification->setPurpose(
$_POST[
'classification'][$id][
'Purpose']);
3042 $classification->setDescriptionLanguage(
3045 $classification->update();
3047 $key_ids = $classification->getKeywordIds();
3048 foreach ($key_ids as $key_id)
3050 $keyword = $classification->getKeyword($key_id);
3052 $keyword->setKeywordLanguage(
3057 $tp_ids = $classification->getTaxonPathIds();
3058 foreach ($tp_ids as $tp_id)
3060 $tax_path = $classification->getTaxonPath($tp_id);
3062 $tax_path->setSourceLanguage(
3064 $tax_path->update();
3066 $tax_ids = $tax_path->getTaxonIds();
3068 foreach($tax_ids as $tax_id)
3070 $taxon = $tax_path->getTaxon($tax_id);
3072 $taxon->setTaxonLanguage(
3089 include_once
'Services/MetaData/classes/class.ilMDFactory.php';
3092 $md_element->delete();
3101 include_once
'Services/MetaData/classes/class.ilMDFactory.php';
3104 $md_element->delete();
3114 switch(
$_GET[
'section'])
3116 case 'meta_technical':
3117 $this->md_section =& $this->md_obj->addTechnical();
3118 $this->md_section->save();
3122 case 'meta_lifecycle':
3123 $this->md_section =& $this->md_obj->addLifecycle();
3124 $this->md_section->save();
3125 $con =& $this->md_section->addContribute();
3128 $ent =& $con->addEntity();
3132 case 'meta_meta_metadata':
3133 $this->md_section = $this->md_obj->addMetaMetadata();
3134 $this->md_section->save();
3136 $ide =& $this->md_section->addIdentifier();
3139 $con =& $this->md_section->addContribute();
3142 $ent =& $con->addEntity();
3147 $this->md_section = $this->md_obj->addRights();
3148 $this->md_section->save();
3151 case 'meta_educational':
3152 $this->md_section = $this->md_obj->addEducational();
3153 $this->md_section->save();
3156 case 'meta_relation':
3157 $this->md_section = $this->md_obj->addRelation();
3158 $this->md_section->save();
3159 $ident = $this->md_section->addIdentifier_();
3161 $des = $this->md_section->addDescription();
3165 case 'meta_annotation':
3166 $this->md_section = $this->md_obj->addAnnotation();
3167 $this->md_section->save();
3170 case 'meta_classification':
3171 $this->md_section = $this->md_obj->addClassification();
3172 $this->md_section->save();
3174 $taxon_path =& $this->md_section->addTaxonPath();
3175 $taxon_path->save();
3177 $taxon =& $taxon_path->addTaxon();
3180 $key =& $this->md_section->addKeyword();
3192 $section_element = (empty(
$_POST[
'section_element']))
3193 ?
$_GET[
'section_element']
3194 :
$_POST[
'section_element'];
3198 switch(
$_GET[
'section'])
3200 case 'meta_technical':
3201 $this->md_section =& $this->md_obj->getTechnical();
3204 case 'meta_lifecycle':
3205 $this->md_section =& $this->md_obj->getLifecycle();
3208 case 'meta_meta_metadata':
3209 $this->md_section =& $this->md_obj->getMetaMetadata();
3212 case 'meta_general':
3213 $this->md_section = $this->md_obj->getGeneral();
3216 case 'meta_educational':
3217 $this->md_section = $this->md_obj->getEducational();
3220 case 'meta_classification':
3221 $arr = explode(
"_", $section_element);
3222 $section_element = $arr[0];
3223 $this->md_section = $this->md_obj->getClassification($arr[1]);
3228 switch($section_element)
3230 case 'meta_or_composite':
3231 $md_new =& $this->md_section->addOrComposite();
3232 $md_new = $md_new->addRequirement();
3235 case 'meta_requirement':
3236 $md_new =& $this->md_section->addRequirement();
3239 case 'meta_location':
3240 $md_new =& $this->md_section->addLocation();
3244 $md_new = $this->md_section->addFormat();
3248 $md_new = $this->md_section->getContribute((
int)
$_GET[
'meta_index']);
3249 $md_new = $md_new->addEntity();
3252 case 'meta_identifier':
3253 $md_new = $this->md_section->addIdentifier();
3256 case 'meta_contribute':
3257 $md_new =& $this->md_section->addContribute();
3259 $md_new = $md_new->addEntity();
3262 case 'educational_language':
3263 case 'meta_language':
3264 $md_new = $this->md_section->addLanguage();
3267 case 'educational_description':
3268 case 'meta_description':
3269 $md_new = $this->md_section->addDescription();
3273 case 'meta_keyword':
3274 $md_new = $this->md_section->addKeyword();
3277 case 'educational_typical_age_range':
3278 $md_new = $this->md_section->addTypicalAgeRange();
3281 case 'relation_resource_identifier':
3282 $rel = $this->md_obj->getRelation($_GET[
'meta_index']);
3283 $md_new = $rel->addIdentifier_();
3286 case 'relation_resource_description':
3287 $rel = $this->md_obj->getRelation($_GET[
'meta_index']);
3288 $md_new = $rel->addDescription();
3292 $md_new = $this->md_section->addTaxonPath();
3294 $md_new = $md_new->addTaxon();
3298 $tax_path = $this->md_section->getTaxonPath($_GET[
'meta_index']);
3299 $md_new = $tax_path->addTaxon();
3312 switch($_REQUEST[
'section'])
3314 case 'meta_general':
3317 case 'meta_lifecycle':
3320 case 'meta_technical':
3323 case 'meta_meta_metadata':
3324 return $this->listMetaMetadata();
3327 return $this->
debug();
3332 case 'meta_educational':
3335 case 'meta_relation':
3338 case 'meta_annotation':
3341 case 'meta_classification':
3345 if($this->md_obj->obj_type==
'sahs'||$this->md_obj->obj_type==
'sco')
3356 if(count($subs = $this->md_section->getPossibleSubelements()))
3360 $this->tpl->setCurrentBlock(
"subelements");
3361 $this->tpl->setVariable(
"SEL_SUBELEMENTS",
ilUtil::formSelect(
'',
'section_element',$subs));
3362 $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
3363 $this->tpl->parseCurrentBlock();
3365 $this->tpl->setVariable(
"TXT_ADD",$this->lng->txt(
'meta_add'));
3377 $tabs =
array(
'meta_quickedit' =>
'listQuickEdit',
3378 'meta_general' =>
'listGeneral',
3379 'meta_lifecycle' =>
'listLifecycle',
3380 'meta_meta_metadata' =>
'listMetaMetadata',
3381 'meta_technical' =>
'listTechnical',
3382 'meta_educational' =>
'listEducational',
3383 'meta_rights' =>
'listRights',
3384 'meta_relation' =>
'listRelation',
3385 'meta_annotation' =>
'listAnnotation',
3386 'meta_classification' =>
'listClassification');
3390 $tabs[
'debug'] =
'debug';
3393 include_once
'Services/Form/classes/class.ilSelectInputGUI.php';
3397 foreach(array_keys($tabs) as $key)
3399 $options[$key]= $this->lng->txt($key);
3404 $ilToolbar->addStickyItem(
$section,
true);
3406 include_once
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
3408 $button->setCaption(
"show");
3409 $button->setCommand(
"listSection");
3410 $ilToolbar->addStickyItem($button);
3412 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
"listSection"));
3423 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
3425 $tpl =
new ilTemplate(
"tpl.lang_selection.html",
true,
true,
3426 "Services/MetaData");
3430 $tpl->setCurrentBlock(
"lg_option");
3431 $tpl->setVariable(
"VAL_LG",
$code);
3432 $tpl->setVariable(
"TXT_LG",
$text);
3434 if ($a_value !=
"" &&
3437 $tpl->setVariable(
"SELECTED",
"selected");
3440 $tpl->parseCurrentBlock();
3442 $tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
3443 $tpl->setVariable(
"SEL_NAME", $a_name);
3445 $return = $tpl->get();
3453 for($i = 0;$i <= 24;$i++)
3463 for($i = 0;$i <= 31;$i++)
3475 $this->observers[$a_element][
'class'] =& $a_class;
3476 $this->observers[$a_element][
'method'] =& $a_method;
3482 if(isset($this->observers[$a_element]))
3484 $class =& $this->observers[$a_element][
'class'];
3485 $method = $this->observers[$a_element][
'method'];
3487 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.
static _getInstance($a_type, $a_index, $a_technical_id=0)
static _getLocationTypeSelect($a_selected, $a_name, $prepend=array())
Prepare a meta location type.
addObserver(&$a_class, $a_method, $a_element)
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.
static _LOMDurationToArray($a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
static _getStatusSelect($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 _lookupDescription($a_rbac_id, $a_obj_id)
Lookup description (copyright)
static encode($mixed, $suppress_native=false)
static _getBrowserSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta technical browser selector.
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)
This class represents a text property in a property form.
updateQuickEdit_scorm_prop_expert()
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)
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
updateFromMDForm()
Import settings from MD (quick edit) form.
static _getOperatingSystemSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta technical os selector.
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.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
updateQuickEdit_scorm_prop_designer()
initQuickEditForm()
Init quick edit form.
static _getRoleSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta lifecycle status selector.
__construct($a_rbac_id, $a_obj_id, $a_obj_type)
__buildMonthsSelect($sel_month)