5define(
'IL_TLT_MAX_HOURS', 99);
 
   30    public function __construct($a_rbac_id, $a_obj_id, $a_obj_type)
 
   34        $this->lng = 
$DIC->language();
 
   35        $this->tpl = 
$DIC[
'tpl'];
 
   36        $this->tabs_gui = 
$DIC->tabs();
 
   37        $this->ctrl = 
$DIC->ctrl();
 
   39        $this->ui_factory = 
$DIC->ui()->factory();
 
   40        $this->ui_renderer = 
$DIC->ui()->renderer();
 
   42        $this->md_obj = 
new ilMD($a_rbac_id, $a_obj_id, $a_obj_type);
 
   44        $this->lng->loadLanguageModule(
'meta');
 
   46        include_once(
'Services/MetaData/classes/class.ilMDSettings.php');
 
   54        $rbacsystem = 
$DIC[
'rbacsystem'];
 
   56        $next_class = $this->ctrl->getNextClass($this);
 
   58        $cmd = $this->ctrl->getCmd();
 
   59        switch ($next_class) {
 
   60            case 'ilformpropertydispatchgui':
 
   62                include_once 
'./Services/Form/classes/class.ilFormPropertyDispatchGUI.php';
 
   65                $item = $this->getFilterItemByPostVar(
$_GET[
"postvar"]);
 
   66                $form_prop_dispatch->setItem($item);
 
   67                return $this->ctrl->forwardCommand($form_prop_dispatch);
 
   82        include_once 
'Services/MetaData/classes/class.ilMD2XML.php';
 
   85        $xml_writer = 
new ilMD2XML($this->md_obj->getRBACId(), $this->md_obj->getObjId(), $this->md_obj->getObjType());
 
   86        $xml_writer->startExport();
 
   88        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
   92        $this->tpl->setVariable(
"MD_CONTENT", htmlentities($xml_writer->getXML()));
 
  105        if (!is_object($this->md_section = $this->md_obj->getGeneral())) {
 
  106            $this->md_section = $this->md_obj->addGeneral();
 
  107            $this->md_section->save();
 
  110        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
  114        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_quick_edit_scorm.html', 
'Services/MetaData');
 
  116        $this->ctrl->setReturn($this, 
'listGeneral');
 
  117        $this->ctrl->setParameter($this, 
'section', 
'meta_general');
 
  118        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
  120        $this->tpl->setVariable(
"TXT_QUICK_EDIT", $this->lng->txt(
"meta_quickedit"));
 
  121        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  122        $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
  123        $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
  124        $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
  128        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
  129            $md_lan = $this->md_section->getLanguage(
$id);
 
  132                $this->tpl->setCurrentBlock(
"language_head");
 
  133                $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
 
  134                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  135                $this->tpl->parseCurrentBlock();
 
  139            if (count($ids) > 1) {
 
  140                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
  141                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_language');
 
  143                $this->tpl->setCurrentBlock(
"language_delete");
 
  144                $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
  145                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
  146                $this->tpl->parseCurrentBlock();
 
  148            $this->tpl->setCurrentBlock(
"language_loop");
 
  150                'gen_language[' . $id . 
'][language]',
 
  151                $md_lan->getLanguageCode()
 
  153            $this->tpl->parseCurrentBlock();
 
  157            $this->tpl->setCurrentBlock(
"language_head");
 
  158            $this->tpl->setVariable(
"ROWSPAN_LANG", 1);
 
  159            $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  160            $this->tpl->parseCurrentBlock();
 
  161            $this->tpl->setCurrentBlock(
"language_loop");
 
  163                'gen_language[][language]',
 
  166            $this->tpl->parseCurrentBlock();
 
  170        $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
'title'));
 
  173            'gen_title_language',
 
  174            $this->md_section->getTitleLanguageCode()
 
  178        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
  179            $md_des = $this->md_section->getDescription(
$id);
 
  181            if (count($ids) > 1) {
 
  182                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
  183                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_description');
 
  185                $this->tpl->setCurrentBlock(
"description_delete");
 
  186                $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
  187                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
  188                $this->tpl->parseCurrentBlock();
 
  191            $this->tpl->setCurrentBlock(
"description_loop");
 
  192            $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", 
$id);
 
  193            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
  194            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
  196            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  198                "gen_description[" . $id . 
'][language]',
 
  199                $md_des->getDescriptionLanguageCode()
 
  201            $this->tpl->parseCurrentBlock();
 
  207        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) {
 
  215                $this->tpl->setCurrentBlock(
"keyword_head");
 
  216                $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($keywords));
 
  217                $this->tpl->setVariable(
"TXT_COMMA_SEP2", $this->lng->txt(
'comma_separated'));
 
  218                $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"keywords"));
 
  219                $this->tpl->parseCurrentBlock();
 
  223            $this->tpl->setCurrentBlock(
"keyword_loop");
 
  225                implode(
", ", $keyword_set)
 
  227            $this->tpl->setVariable(
"LANG", 
$lang);
 
  229                "keyword[language][$lang]",
 
  232            $this->tpl->parseCurrentBlock();
 
  235        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");
 
  243                "keyword[language][$lang]",
 
  250        $this->tpl->setVariable(
"TXT_EXPERTS", 
$lng->txt(
'meta_subjectmatterexpert'));
 
  251        $this->tpl->setVariable(
"TXT_COMMA_SEP", $this->lng->txt(
'comma_separated'));
 
  252        $this->tpl->setVariable(
"TXT_SCOPROP_EXPERT", $this->lng->txt(
'sco_propagate'));
 
  253        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  254            $sep = $ent_str = 
"";
 
  255            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  256                $md_con = $this->md_section->getContribute($con_id);
 
  257                if ($md_con->getRole() == 
"SubjectMatterExpert") {
 
  258                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  259                        $md_ent = $md_con->getEntity($ent_id);
 
  260                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  268        $this->tpl->setVariable(
"TXT_DESIGNERS", 
$lng->txt(
'meta_instructionaldesigner'));
 
  269        $this->tpl->setVariable(
"TXT_SCOPROP_DESIGNERS", $this->lng->txt(
'sco_propagate'));
 
  270        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  271            $sep = $ent_str = 
"";
 
  272            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  273                $md_con = $this->md_section->getContribute($con_id);
 
  274                if ($md_con->getRole() == 
"InstructionalDesigner") {
 
  275                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  276                        $md_ent = $md_con->getEntity($ent_id);
 
  277                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  285        $this->tpl->setVariable(
"TXT_POC", 
$lng->txt(
'meta_pointofcontact'));
 
  286        $this->tpl->setVariable(
"TXT_SCOPROP_POC", $this->lng->txt(
'sco_propagate'));
 
  287        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  288            $sep = $ent_str = 
"";
 
  289            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  290                $md_con = $this->md_section->getContribute($con_id);
 
  291                if ($md_con->getRole() == 
"PointOfContact") {
 
  292                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  293                        $md_ent = $md_con->getEntity($ent_id);
 
  294                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  302        $this->tpl->setVariable(
"TXT_STATUS", $this->lng->txt(
'meta_status'));
 
  303        if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  304            $this->md_section = $this->md_obj->addLifecycle();
 
  305            $this->md_section->save();
 
  307        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  309                $this->md_section->getStatus(),
 
  311                array(0 => $this->lng->txt(
'meta_please_select'))
 
  319        $tlt = array(0,0,0,0,0);
 
  321        if (is_object($this->md_section = $this->md_obj->getEducational())) {
 
  322            include_once 
'Services/MetaData/classes/class.ilMDUtils.php';
 
  325                if (strlen($this->md_section->getTypicalLearningTime())) {
 
  326                    $tlt = array(0,0,0,0,0);
 
  331        $this->tpl->setVariable(
"TXT_MONTH", $this->lng->txt(
'md_months'));
 
  335        $this->tpl->setVariable(
"TXT_DAYS", $this->lng->txt(
'md_days'));
 
  336        $this->tpl->setVariable(
"TXT_TIME", $this->lng->txt(
'md_time'));
 
  338        $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME", $this->lng->txt(
'meta_typical_learning_time'));
 
  341            $tlt[4] ? 
false : 
true,
 
  347        $this->tpl->setVariable(
"TLT_HINT", $tlt[4] ? 
'(hh:mm:ss)' : 
'(hh:mm)');
 
  350            $this->tpl->setCurrentBlock(
"tlt_not_valid");
 
  351            $this->tpl->setVariable(
"TXT_CURRENT_VAL", $this->lng->txt(
'meta_current_value'));
 
  352            $this->tpl->setVariable(
"TLT", $this->md_section->getTypicalLearningTime());
 
  353            $this->tpl->setVariable(
"INFO_TLT_NOT_VALID", $this->lng->txt(
'meta_info_tlt_not_valid'));
 
  354            $this->tpl->parseCurrentBlock();
 
  358        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
  367        if (!is_object($this->md_section = $this->md_obj->getGeneral())) {
 
  368            $this->md_section = $this->md_obj->addGeneral();
 
  369            $this->md_section->save();
 
  376        $interruptive_signal = 
'';
 
  378        if ($interruptive_modal != 
null) {
 
  379            $interruptive_signal = $interruptive_modal->getShowSignal();
 
  380            $modal_content = $this->ui_renderer->render($interruptive_modal);
 
  385            $modal_content . 
$form->getHTML()
 
  400        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  402        $this->form->setId(
'ilquickeditform');
 
  403        $this->form->setShowTopButtons(
false);
 
  407        $ti->setMaxLength(200);
 
  409        if ($this->md_obj->getObjType() != 
'sess') {
 
  410            $ti->setRequired(
true);
 
  412        $ti->setValue($this->md_section->getTitle());
 
  413        $this->form->addItem($ti);
 
  416        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
  417            $md_des = $this->md_section->getDescription(
$id);
 
  419            $ta = 
new ilTextAreaInputGUI($this->lng->txt(
"meta_description"), 
"gen_description[" . 
$id . 
"][description]");
 
  422            $ta->setValue($md_des->getDescription());
 
  423            if (count($ids) > 1) {
 
  424                $ta->setInfo($this->lng->txt(
"meta_l_" . $md_des->getDescriptionLanguageCode()));
 
  427            $this->form->addItem($ta);
 
  433        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
  434            $md_lan = $this->md_section->getLanguage(
$id);
 
  435            $first_lang = $md_lan->getLanguageCode();
 
  438            $si->setValue($md_lan->getLanguageCode());
 
  439            $this->form->addItem(
$si);
 
  445            $this->form->addItem(
$si);
 
  451        foreach ($ids = $this->md_section->getKeywordIds() as 
$id) {
 
  452            $md_key = $this->md_section->getKeyword(
$id);
 
  453            if (trim($md_key->getKeyword()) != 
"") {
 
  454                $keywords[$md_key->getKeywordLanguageCode()][]
 
  455                    = $md_key->getKeyword();
 
  458        foreach ($keywords as 
$lang => $keyword_set) {
 
  460                $this->lng->txt(
"keywords"),
 
  461                "keywords[value][" . 
$lang . 
"]" 
  463            $kw->setDataSource($this->ctrl->getLinkTarget($this, 
"keywordAutocomplete", 
"", 
true));
 
  464            $kw->setMaxLength(200);
 
  467            if (count($keywords) > 1) {
 
  468                $kw->setInfo($this->lng->txt(
"meta_l_" . 
$lang));
 
  470            $this->form->addItem($kw);
 
  472            $kw->setValue($keyword_set);
 
  474        if (count($keywords) == 0) {
 
  476                $this->lng->txt(
"keywords"),
 
  477                "keywords[value][" . $first_lang . 
"]" 
  479            $kw->setDataSource($this->ctrl->getLinkTarget($this, 
"keywordAutocomplete", 
"", 
true));
 
  480            $kw->setMaxLength(200);
 
  483            $this->form->addItem($kw);
 
  489            $this->lng->txt(
'authors') . 
"<br />" .
 
  490            "(" . sprintf($this->lng->txt(
'md_separated_by'), $this->md_settings->getDelimiter()) . 
")",
 
  495        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  496            $sep = $ent_str = 
"";
 
  497            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  498                $md_con = $this->md_section->getContribute($con_id);
 
  499                if ($md_con->getRole() == 
"Author") {
 
  500                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  501                        $md_ent = $md_con->getEntity($ent_id);
 
  502                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  503                        $sep = $this->md_settings->getDelimiter() . 
" ";
 
  507            $ta->setValue($ent_str);
 
  509        $this->form->addItem($ta);
 
  516        include_once(
"./Services/MetaData/classes/class.ilTypicalLearningTimeInputGUI.php");
 
  518        $edu = $this->md_obj->getEducational();
 
  519        if (is_object($edu)) {
 
  520            $tlt->setValueByLOMDuration($edu->getTypicalLearningTime());
 
  522        $this->form->addItem($tlt);
 
  524        $this->form->addCommandButton(
"updateQuickEdit", 
$lng->txt(
"save"), 
'button_ilquickeditform');
 
  525        $this->form->setTitle($this->lng->txt(
"meta_quickedit"));
 
  526        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  530            $DIC->ui()->mainTemplate()->addJavaScript(
 
  531                'Services/MetaData/js/ilMetaCopyrightListener.js' 
  533            $DIC->ui()->mainTemplate()->addOnLoadCode(
 
  534                'il.MetaDataCopyrightListener.init("' .
 
  535                $a_signal_id . 
'","copyright","form_ilquickeditform","button_ilquickeditform");' 
  555            $this->md_obj->getRBACId(),
 
  556            $this->md_obj->getObjId()
 
  568            !$this->md_settings->isCopyrightSelectionActive() ||
 
  575        $copyright->setValue($current_id);
 
  578        foreach ($cp_entries as $copyright_entry) {
 
  580                $copyright_entry->getTitle(),
 
  581                $copyright_entry->getEntryId(),
 
  582                $copyright_entry->getDescription()
 
  585            if ($copyright_entry->getOutdated()) {
 
  586                $radio_entry->setTitle(
"(" . $this->lng->txt(
'meta_copyright_outdated') . 
") " . $radio_entry->getTitle());
 
  587                $radio_entry->setDisabled(
true);
 
  591                $oer_settings->supportsHarvesting($this->md_obj->getObjType()) &&
 
  592                $oer_settings->isActiveCopyrightTemplate($copyright_entry->getEntryId())
 
  596                    $this->lng->txt(
'meta_oer_blocked'),
 
  597                    'copyright_oer_blocked_' . $copyright_entry->getEntryId()
 
  599                $blocked->setInfo($this->lng->txt(
'meta_oer_blocked_info'));
 
  600                $blocked->setValue(1);
 
  602                if ($status->isBlocked()) {
 
  603                    $blocked->setChecked(
true);
 
  605                $radio_entry->addSubItem($blocked);
 
  609            $copyright->addOption($radio_entry);
 
  614            $this->lng->txt(
'meta_cp_own'),
 
  617        $own_selection->setValue(0);
 
  624        if ($current_id == 0) {
 
  627        $own_selection->addSubItem($own_copyright);
 
  628        $copyright->addOption($own_selection);
 
  629        $form->addItem($copyright);
 
  640        include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
 
  643            $this->md_obj->getObjType(),
 
  644            $this->md_obj->getRBACId()
 
  653            $entry = 
new stdClass();
 
  659        include_once 
'./Services/JSON/classes/class.ilJsonUtil.php';
 
  673        if (!trim(
$_POST[
'gen_title'])) {
 
  674            if ($this->md_obj->getObjType() != 
'sess') {
 
  682        $this->md_section = $this->md_obj->getGeneral();
 
  685        $this->md_section->update();
 
  688        if (is_array(
$_POST[
'gen_language'])) {
 
  691                    $md_lan = $this->md_section->getLanguage(
$id);
 
  695                    $md_lan = $this->md_section->addLanguage();
 
  702        if (is_array(
$_POST[
'gen_description'])) {
 
  704                $md_des = $this->md_section->getDescription(
$id);
 
  712        if (is_array(
$_POST[
"keywords"][
"value"])) {
 
  713            include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
 
  720            if (!is_object($this->md_section = $this->md_obj->getRights())) {
 
  721                $this->md_section = $this->md_obj->addRights();
 
  722                $this->md_section->save();
 
  724            if (
$_POST[
'copyright'] > 0) {
 
  725                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
  726                $this->md_section->setDescription(
'il_copyright_entry__' . IL_INST_ID . 
'__' . (
int) 
$_POST[
'copyright']);
 
  728                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
  731            $this->md_section->update();
 
  736            if ($oer_settings->supportsHarvesting($this->md_obj->getObjType())) {
 
  737                $chosen_copyright = (int) 
$_POST[
'copyright'];
 
  740                $status->setBlocked((
int) 
$_POST[
'copyright_oer_blocked_' . $chosen_copyright] ? 
true : 
false);
 
  744            if (is_object($this->md_section = $this->md_obj->getRights())) {
 
  745                $this->md_section->setCopyrightAndOtherRestrictions(
"No");
 
  746                $this->md_section->setDescription(
"");
 
  747                $this->md_section->update();
 
  756            if (!is_object($this->md_section = $this->md_obj->getEducational())) {
 
  757                $this->md_section = $this->md_obj->addEducational();
 
  758                $this->md_section->save();
 
  760            $this->md_section->setPhysicalTypicalLearningTime(
 
  761                (
int) 
$_POST[
'tlt'][
'mo'],
 
  767            $this->md_section->update();
 
  769            if (is_object($this->md_section = $this->md_obj->getEducational())) {
 
  770                $this->md_section->setPhysicalTypicalLearningTime(0, 0, 0, 0, 0);
 
  771                $this->md_section->update();
 
  777        if ($_POST[
"life_authors"] != 
"") {
 
  778            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  779                $this->md_section = $this->md_obj->addLifecycle();
 
  780                $this->md_section->save();
 
  784            $auth_arr = explode($this->md_settings->getDelimiter(), 
$_POST[
"life_authors"]);
 
  785            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
  786                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
  792            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  793                $md_con = $this->md_section->getContribute($con_id);
 
  794                if ($md_con->getRole() == 
"Author") {
 
  795                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  796                        $md_ent = $md_con->getEntity($ent_id);
 
  799                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
  800                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
  805                    $md_con_author = $md_con;
 
  810            if (count($auth_arr) > 0) {
 
  811                if (!is_object($md_con_author)) {
 
  812                    $md_con_author = $this->md_section->addContribute();
 
  813                    $md_con_author->setRole(
"Author");
 
  814                    $md_con_author->save();
 
  816                foreach ($auth_arr as 
$auth) {
 
  817                    $md_ent = $md_con_author->addEntity();
 
  823            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  824                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  825                    $md_con = $this->md_section->getContribute($con_id);
 
  826                    if ($md_con->getRole() == 
"Author") {
 
  846        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"), 
true);
 
  847        $this->ctrl->redirect($this, 
'listSection');
 
  852        $module_id = $this->md_obj->obj_id;
 
  853        if ($this->md_obj->obj_type == 
'sco') {
 
  854            $module_id = $this->md_obj->rbac_id;
 
  857        $tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
  858        $tree->setTreeTablePK(
"slm_id");
 
  859        foreach (
$tree->getSubTree(
$tree->getNodeData(
$tree->getRootId()), 
true, 
'sco') as $sco) {
 
  860            $sco_md = 
new ilMD($module_id, $sco[
'obj_id'], 
'sco');
 
  863                if (!is_object($sco_md_section = $sco_md->getLifecycle())) {
 
  864                    $sco_md_section = $sco_md->addLifecycle();
 
  865                    $sco_md_section->save();
 
  869                for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
  870                    $auth_arr[
$i] = trim($auth_arr[
$i]);
 
  876                foreach (($ids = $sco_md_section->getContributeIds()) as $con_id) {
 
  877                    $md_con = $sco_md_section->getContribute($con_id);
 
  878                    if ($md_con->getRole() == 
$type) {
 
  879                        foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  880                            $md_ent = $md_con->getEntity($ent_id);
 
  883                            if (in_array($md_ent->getEntity(), $auth_arr)) {
 
  884                                unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
  889                        $md_con_author = $md_con;
 
  894                if (count($auth_arr) > 0) {
 
  895                    if (!is_object($md_con_author)) {
 
  896                        $md_con_author = $sco_md_section->addContribute();
 
  897                        $md_con_author->setRole(
$type);
 
  898                        $md_con_author->save();
 
  900                    foreach ($auth_arr as 
$auth) {
 
  901                        $md_ent = $md_con_author->addEntity();
 
  907                if (is_object($sco_md_section = $sco_md->getLifecycle())) {
 
  908                    foreach (($ids = $sco_md_section->getContributeIds()) as $con_id) {
 
  909                        $md_con = $sco_md_section->getContribute($con_id);
 
  910                        if ($md_con->getRole() == 
$type) {
 
  938        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
  941        $this->md_section = $this->md_obj->getGeneral();
 
  944        $this->md_section->update();
 
  947        if (is_array(
$_POST[
'gen_language'])) {
 
  950                    $md_lan = $this->md_section->getLanguage(
$id);
 
  954                    $md_lan = $this->md_section->addLanguage();
 
  961        if (is_array(
$_POST[
'gen_description'])) {
 
  963                $md_des = $this->md_section->getDescription(
$id);
 
  972        if (is_array(
$_POST[
"keywords"][
"value"])) {
 
  973            $new_keywords = array();
 
  974            foreach (
$_POST[
"keywords"][
"value"] as 
$lang => $keywords) {
 
  976                $keywords = explode(
",", $keywords);
 
  977                foreach ($keywords as $keyword) {
 
  978                    $new_keywords[
$language][] = trim($keyword);
 
  983            foreach ($ids = $this->md_section->getKeywordIds() as 
$id) {
 
  984                $md_key = $this->md_section->getKeyword(
$id);
 
  986                $lang = $md_key->getKeywordLanguageCode();
 
  989                if (is_array($new_keywords[
$lang]) &&
 
  990                    in_array($md_key->getKeyword(), $new_keywords[
$lang])) {
 
  991                    unset($new_keywords[
$lang]
 
  992                        [array_search($md_key->getKeyword(), $new_keywords[
$lang])]);
 
  999            foreach ($new_keywords as 
$lang => $key_arr) {
 
 1000                foreach ($key_arr as $keyword) {
 
 1001                    if ($keyword != 
"") {
 
 1002                        $md_key = $this->md_section->addKeyword();
 
 1013        if (
$_POST[
'copyright_id'] or 
$_POST[
'rights_copyright']) {
 
 1014            if (!is_object($this->md_section = $this->md_obj->getRights())) {
 
 1015                $this->md_section = $this->md_obj->addRights();
 
 1016                $this->md_section->save();
 
 1018            if (
$_POST[
'copyright_id']) {
 
 1019                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
 1020                $this->md_section->setDescription(
'il_copyright_entry__' . IL_INST_ID . 
'__' . (
int) 
$_POST[
'copyright_id']);
 
 1022                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
 1025            $this->md_section->update();
 
 1027            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
 
 1039            if (!is_object($this->md_section = $this->md_obj->getEducational())) {
 
 1040                $this->md_section = $this->md_obj->addEducational();
 
 1041                $this->md_section->save();
 
 1043            $this->md_section->setPhysicalTypicalLearningTime(
 
 1044                (
int) 
$_POST[
'tlt'][
'mo'],
 
 1045                (
int) 
$_POST[
'tlt'][
'd'],
 
 1046                (
int) 
$_POST[
'tlt'][
'h'],
 
 1047                (
int) 
$_POST[
'tlt'][
'm'],
 
 1050            $this->md_section->update();
 
 1052            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"] != 
"") {
 
 1061            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1062                $this->md_section = $this->md_obj->addLifecycle();
 
 1063                $this->md_section->save();
 
 1067            $auth_arr = explode(
",", 
$_POST[
"life_experts"]);
 
 1068            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
 1069                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
 1072            $md_con_author = 
"";
 
 1075            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1076                $md_con = $this->md_section->getContribute($con_id);
 
 1077                if ($md_con->getRole() == 
"SubjectMatterExpert") {
 
 1078                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1079                        $md_ent = $md_con->getEntity($ent_id);
 
 1082                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
 1083                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
 1088                    $md_con_author = $md_con;
 
 1093            if (count($auth_arr) > 0) {
 
 1094                if (!is_object($md_con_author)) {
 
 1095                    $md_con_author = $this->md_section->addContribute();
 
 1096                    $md_con_author->setRole(
"SubjectMatterExpert");
 
 1097                    $md_con_author->save();
 
 1099                foreach ($auth_arr as 
$auth) {
 
 1100                    $md_ent = $md_con_author->addEntity();
 
 1106            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1107                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1108                    $md_con = $this->md_section->getContribute($con_id);
 
 1109                    if ($md_con->getRole() == 
"SubjectMatterExpert") {
 
 1117        if (
$_POST[
"life_designers"] != 
"") {
 
 1118            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1119                $this->md_section = $this->md_obj->addLifecycle();
 
 1120                $this->md_section->save();
 
 1124            $auth_arr = explode(
",", 
$_POST[
"life_designers"]);
 
 1125            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
 1126                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
 1129            $md_con_author = 
"";
 
 1132            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1133                $md_con = $this->md_section->getContribute($con_id);
 
 1134                if ($md_con->getRole() == 
"InstructionalDesigner") {
 
 1135                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1136                        $md_ent = $md_con->getEntity($ent_id);
 
 1139                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
 1140                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
 1145                    $md_con_author = $md_con;
 
 1150            if (count($auth_arr) > 0) {
 
 1151                if (!is_object($md_con_author)) {
 
 1152                    $md_con_author = $this->md_section->addContribute();
 
 1153                    $md_con_author->setRole(
"InstructionalDesigner");
 
 1154                    $md_con_author->save();
 
 1156                foreach ($auth_arr as 
$auth) {
 
 1157                    $md_ent = $md_con_author->addEntity();
 
 1163            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1164                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1165                    $md_con = $this->md_section->getContribute($con_id);
 
 1166                    if ($md_con->getRole() == 
"InstructionalDesigner") {
 
 1174        if (
$_POST[
"life_poc"] != 
"") {
 
 1175            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1176                $this->md_section = $this->md_obj->addLifecycle();
 
 1177                $this->md_section->save();
 
 1181            $auth_arr = explode(
",", 
$_POST[
"life_poc"]);
 
 1182            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
 1183                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
 1186            $md_con_author = 
"";
 
 1189            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1190                $md_con = $this->md_section->getContribute($con_id);
 
 1191                if ($md_con->getRole() == 
"PointOfContact") {
 
 1192                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1193                        $md_ent = $md_con->getEntity($ent_id);
 
 1196                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
 1197                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
 1202                    $md_con_author = $md_con;
 
 1207            if (count($auth_arr) > 0) {
 
 1208                if (!is_object($md_con_author)) {
 
 1209                    $md_con_author = $this->md_section->addContribute();
 
 1210                    $md_con_author->setRole(
"PointOfContact");
 
 1211                    $md_con_author->save();
 
 1213                foreach ($auth_arr as 
$auth) {
 
 1214                    $md_ent = $md_con_author->addEntity();
 
 1220            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1221                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1222                    $md_con = $this->md_section->getContribute($con_id);
 
 1223                    if ($md_con->getRole() == 
"PointOfContact") {
 
 1230        $this->md_section = $this->md_obj->getLifecycle();
 
 1233        $this->md_section->setStatus(
$_POST[
'lif_status']);
 
 1234        $this->md_section->update();
 
 1241        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"), 
true);
 
 1242        $this->ctrl->redirect($this, 
'listSection');
 
 1250        if (!is_object($this->md_section = $this->md_obj->getGeneral())) {
 
 1251            $this->md_section = $this->md_obj->addGeneral();
 
 1252            $this->md_section->save();
 
 1255        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1259        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_general.html', 
'Services/MetaData');
 
 1261        $this->ctrl->setReturn($this, 
'listGeneral');
 
 1262        $this->ctrl->setParameter($this, 
'section', 
'meta_general');
 
 1263        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1267        $this->tpl->setVariable(
"TXT_GENERAL", $this->lng->txt(
"meta_general"));
 
 1268        $this->tpl->setVariable(
"TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 1269        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1270        $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 1271        $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 1272        $this->tpl->setVariable(
"TXT_STRUCTURE", $this->lng->txt(
"meta_structure"));
 
 1273        $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 1274        $this->tpl->setVariable(
"TXT_ATOMIC", $this->lng->txt(
"meta_atomic"));
 
 1275        $this->tpl->setVariable(
"TXT_COLLECTION", $this->lng->txt(
"meta_collection"));
 
 1276        $this->tpl->setVariable(
"TXT_NETWORKED", $this->lng->txt(
"meta_networked"));
 
 1277        $this->tpl->setVariable(
"TXT_HIERARCHICAL", $this->lng->txt(
"meta_hierarchical"));
 
 1278        $this->tpl->setVariable(
"TXT_LINEAR", $this->lng->txt(
"meta_linear"));
 
 1281        $this->tpl->setVariable(
"STRUCTURE_VAL_" . strtoupper($this->md_section->getStructure()), 
" selected=selected");
 
 1285        foreach ($ids = $this->md_section->getIdentifierIds() as 
$id) {
 
 1286            $md_ide = $this->md_section->getIdentifier(
$id);
 
 1290                $this->tpl->setCurrentBlock(
"id_head");
 
 1291                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 1292                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
 
 1293                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
 
 1294                $this->tpl->setVariable(
"ROWSPAN_ID", count($ids));
 
 1295                $this->tpl->parseCurrentBlock();
 
 1299            if (count($ids) > 1) {
 
 1300                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1301                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_identifier');
 
 1303                if ($md_ide->getCatalog() != 
"ILIAS") {
 
 1304                    $this->tpl->setCurrentBlock(
"identifier_delete");
 
 1305                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1306                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1307                    $this->tpl->parseCurrentBlock();
 
 1311            $this->tpl->setCurrentBlock(
"identifier_loop");
 
 1312            if ($md_ide->getCatalog() == 
"ILIAS") {
 
 1313                $this->tpl->setVariable(
"DISABLE_IDENT", 
' disabled="disabled" ');
 
 1315            $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", 
$id);
 
 1316            $this->tpl->setVariable(
 
 1317                "IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
 
 1320            $this->tpl->setVariable(
 
 1321                "IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
 
 1324            $this->tpl->parseCurrentBlock();
 
 1330        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
 1331            $md_lan = $this->md_section->getLanguage(
$id);
 
 1334                $this->tpl->setCurrentBlock(
"language_head");
 
 1335                $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
 
 1336                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1337                $this->tpl->parseCurrentBlock();
 
 1341            if (count($ids) > 1) {
 
 1342                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1343                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_language');
 
 1345                $this->tpl->setCurrentBlock(
"language_delete");
 
 1346                $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1347                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 1348                $this->tpl->parseCurrentBlock();
 
 1350            $this->tpl->setCurrentBlock(
"language_loop");
 
 1352                'gen_language[' . $id . 
'][language]',
 
 1353                $md_lan->getLanguageCode()
 
 1355            $this->tpl->parseCurrentBlock();
 
 1359        $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
'title'));
 
 1362            'gen_title_language',
 
 1363            $this->md_section->getTitleLanguageCode()
 
 1368        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
 1369            $md_des = $this->md_section->getDescription(
$id);
 
 1371            if (count($ids) > 1) {
 
 1372                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1373                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_description');
 
 1375                $this->tpl->setCurrentBlock(
"description_delete");
 
 1376                $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1377                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 1378                $this->tpl->parseCurrentBlock();
 
 1381            $this->tpl->setCurrentBlock(
"description_loop");
 
 1382            $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", 
$id);
 
 1383            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 1384            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 1386            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1388                "gen_description[" . $id . 
'][language]',
 
 1389                $md_des->getDescriptionLanguageCode()
 
 1391            $this->tpl->parseCurrentBlock();
 
 1396        foreach ($ids = $this->md_section->getKeywordIds() as 
$id) {
 
 1397            $md_key = $this->md_section->getKeyword(
$id);
 
 1400                $this->tpl->setCurrentBlock(
"keyword_head");
 
 1401                $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($ids));
 
 1402                $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 1403                $this->tpl->parseCurrentBlock();
 
 1408            if (count($ids) > 1) {
 
 1409                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1410                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_keyword');
 
 1412                $this->tpl->setCurrentBlock(
"keyword_delete");
 
 1413                $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1414                $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 1415                $this->tpl->parseCurrentBlock();
 
 1418            $this->tpl->setCurrentBlock(
"keyword_loop");
 
 1419            $this->tpl->setVariable(
"KEYWORD_LOOP_NO", 
$id);
 
 1420            $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 1422            $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1424                "gen_keyword[" . $id . 
'][language]',
 
 1425                $md_key->getKeywordLanguageCode()
 
 1428            $this->tpl->parseCurrentBlock();
 
 1432        $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_COVERAGE", $this->lng->txt(
'meta_coverage'));
 
 1434        $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1436            'gen_coverage_language',
 
 1437            $this->md_section->getCoverageLanguageCode()
 
 1440        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 1448        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 1450        if (!strlen(trim(
$_POST[
'gen_title']))) {
 
 1451            if ($this->md_obj->getObjType() != 
'sess') {
 
 1459        $this->md_section = $this->md_obj->getGeneral();
 
 1460        $this->md_section->setStructure(
$_POST[
'gen_structure']);
 
 1465        $this->md_section->update();
 
 1468        if (is_array(
$_POST[
'gen_identifier'])) {
 
 1470                $md_ide = $this->md_section->getIdentifier(
$id);
 
 1478        if (is_array(
$_POST[
'gen_language'])) {
 
 1480                $md_lan = $this->md_section->getLanguage(
$id);
 
 1486        if (is_array(
$_POST[
'gen_description'])) {
 
 1488                $md_des = $this->md_section->getDescription(
$id);
 
 1495        if (is_array(
$_POST[
'gen_keyword'])) {
 
 1497                $md_key = $this->md_section->getKeyword(
$id);
 
 1508        $this->ctrl->setParameter($this, 
"section", 
"meta_general");
 
 1509        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"), 
true);
 
 1510        $this->ctrl->redirect($this, 
'listSection');
 
 1515        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 1518        $this->md_section = $this->md_obj->getTechnical();
 
 1525        $this->md_section->update();
 
 1528        if (is_array(
$_POST[
'met_format'])) {
 
 1530                $md_for = $this->md_section->getFormat(
$id);
 
 1536        if (is_array(
$_POST[
'met_location'])) {
 
 1538                $md_loc = $this->md_section->getLocation(
$id);
 
 1544        if (is_array(
$_POST[
'met_re'])) {
 
 1546                $md_re = $this->md_section->getRequirement(
$id);
 
 1558        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 1567        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1569        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_technical.html', 
'Services/MetaData');
 
 1572        $this->ctrl->setParameter($this, 
"section", 
"meta_technical");
 
 1573        if (!is_object($this->md_section = $this->md_obj->getTechnical())) {
 
 1574            $this->tpl->setCurrentBlock(
"no_technical");
 
 1575            $this->tpl->setVariable(
"TXT_NO_TECHNICAL", $this->lng->txt(
"meta_no_technical"));
 
 1576            $this->tpl->setVariable(
"TXT_ADD_TECHNICAL", $this->lng->txt(
"meta_add"));
 
 1577            $this->tpl->setVariable(
"ACTION_ADD_TECHNICAL", $this->ctrl->getLinkTarget($this, 
"addSection"));
 
 1578            $this->tpl->parseCurrentBlock();
 
 1582        $this->ctrl->setReturn($this, 
'listTechnical');
 
 1583        $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 1585        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1586        $this->tpl->setVariable(
"TXT_TECHNICAL", $this->lng->txt(
'meta_technical'));
 
 1589        $this->tpl->setVariable(
 
 1591            $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 1593        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
'delete'));
 
 1599        foreach ($ids = $this->md_section->getFormatIds() as 
$id) {
 
 1600            $md_for = &$this->md_section->getFormat(
$id);
 
 1602            $this->tpl->setCurrentBlock(
"format_loop");
 
 1604            $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1605            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_format');
 
 1606            $this->tpl->setVariable(
"FORMAT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1607            $this->tpl->setVariable(
"FORMAT_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1609            $this->tpl->setVariable(
"FORMAT_LOOP_NO", 
$id);
 
 1610            $this->tpl->setVariable(
"FORMAT_LOOP_TXT_FORMAT", $this->lng->txt(
'meta_format'));
 
 1613            $this->tpl->parseCurrentBlock();
 
 1616        $this->tpl->setVariable(
"SIZE_TXT_SIZE", $this->lng->txt(
'meta_size'));
 
 1620        foreach ($ids = $this->md_section->getLocationIds() as 
$id) {
 
 1621            $md_loc = &$this->md_section->getLocation(
$id);
 
 1623            $this->tpl->setCurrentBlock(
"location_loop");
 
 1625            $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1626            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_location');
 
 1627            $this->tpl->setVariable(
"LOCATION_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1628            $this->tpl->setVariable(
"LOCATION_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1630            $this->tpl->setVariable(
"LOCATION_LOOP_TXT_LOCATION", $this->lng->txt(
'meta_location'));
 
 1631            $this->tpl->setVariable(
"LOCATION_LOOP_NO", 
$id);
 
 1632            $this->tpl->setVariable(
"LOCATION_LOOP_TXT_TYPE", $this->lng->txt(
'meta_type'));
 
 1635            $this->tpl->setVariable(
 
 1636                "SEL_LOCATION_TYPE",
 
 1638                    $md_loc->getLocationType(),
 
 1639                    "met_location[" . 
$id . 
"][Type]",
 
 1640                    array(0 => $this->lng->txt(
'meta_please_select'))
 
 1643            $this->tpl->parseCurrentBlock();
 
 1646        foreach ($ids = $this->md_section->getRequirementIds() as 
$id) {
 
 1647            $md_re = &$this->md_section->getRequirement(
$id);
 
 1649            $this->tpl->setCurrentBlock(
"requirement_loop");
 
 1651            $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1652            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_requirement');
 
 1653            $this->tpl->setVariable(
"REQUIREMENT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1654            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1656            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_REQUIREMENT", $this->lng->txt(
'meta_requirement'));
 
 1657            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_TYPE", $this->lng->txt(
'meta_type'));
 
 1658            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_OPERATINGSYSTEM", $this->lng->txt(
'meta_operating_system'));
 
 1659            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_BROWSER", $this->lng->txt(
'meta_browser'));
 
 1660            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_NAME", $this->lng->txt(
'meta_name'));
 
 1661            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MINIMUMVERSION", $this->lng->txt(
'meta_minimum_version'));
 
 1662            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MAXIMUMVERSION", $this->lng->txt(
'meta_maximum_version'));
 
 1664            $this->tpl->setVariable(
"REQUIREMENT_LOOP_NO", 
$id);
 
 1665            $this->tpl->setVariable(
 
 1666                "REQUIREMENT_SEL_OS_NAME",
 
 1668                    $md_re->getOperatingSystemName(),
 
 1669                    "met_re[" . 
$id . 
"][os][name]",
 
 1670                    array(0 => $this->lng->txt(
'meta_please_select'))
 
 1673            $this->tpl->setVariable(
 
 1674                "REQUIREMENT_SEL_BROWSER_NAME",
 
 1676                    $md_re->getBrowserName(),
 
 1677                    "met_re[" . 
$id . 
"][browser][name]",
 
 1678                    array(0 => $this->lng->txt(
'meta_please_select'))
 
 1682            $this->tpl->setVariable(
 
 1683                "REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
 
 1687            $this->tpl->setVariable(
 
 1688                "REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
 
 1692            $this->tpl->setVariable(
 
 1693                "REQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
 
 1697            $this->tpl->setVariable(
 
 1698                "REQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
 
 1701            $this->tpl->parseCurrentBlock();
 
 1704        foreach ($ids = $this->md_section->getOrCompositeIds() as $or_id) {
 
 1705            $md_or = &$this->md_section->getOrComposite($or_id);
 
 1706            foreach ($ids = $md_or->getRequirementIds() as 
$id) {
 
 1707                $md_re = &$this->md_section->getRequirement(
$id);
 
 1709                $this->tpl->setCurrentBlock(
"orrequirement_loop");
 
 1711                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1712                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_requirement');
 
 1713                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1714                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1716                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_REQUIREMENT", $this->lng->txt(
'meta_requirement'));
 
 1717                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_TYPE", $this->lng->txt(
'meta_type'));
 
 1718                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_OPERATINGSYSTEM", $this->lng->txt(
'meta_operating_system'));
 
 1719                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_BROWSER", $this->lng->txt(
'meta_browser'));
 
 1720                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_NAME", $this->lng->txt(
'meta_name'));
 
 1721                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MINIMUMVERSION", $this->lng->txt(
'meta_minimum_version'));
 
 1722                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MAXIMUMVERSION", $this->lng->txt(
'meta_maximum_version'));
 
 1724                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_NO", 
$id);
 
 1725                $this->tpl->setVariable(
 
 1726                    "ORREQUIREMENT_SEL_OS_NAME",
 
 1728                        $md_re->getOperatingSystemName(),
 
 1729                        "met_re[" . 
$id . 
"][os][name]",
 
 1730                        array(0 => $this->lng->txt(
'meta_please_select'))
 
 1733                $this->tpl->setVariable(
 
 1734                    "ORREQUIREMENT_SEL_BROWSER_NAME",
 
 1736                        $md_re->getBrowserName(),
 
 1737                        "met_re[" . 
$id . 
"][browser][name]",
 
 1738                        array(0 => $this->lng->txt(
'meta_please_select'))
 
 1742                $this->tpl->setVariable(
 
 1743                    "ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
 
 1747                $this->tpl->setVariable(
 
 1748                    "ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
 
 1752                $this->tpl->setVariable(
 
 1753                    "ORREQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
 
 1757                $this->tpl->setVariable(
 
 1758                    "ORREQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
 
 1761                $this->tpl->parseCurrentBlock();
 
 1763            $this->tpl->setCurrentBlock(
"orcomposite_loop");
 
 1765            $this->ctrl->setParameter($this, 
'meta_index', $or_id);
 
 1766            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_or_composite');
 
 1767            $this->ctrl->setParameter($this, 
'meta_technical', $this->md_section->getMetaId());
 
 1768            $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1769            $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1771            $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_ORCOMPOSITE", $this->lng->txt(
'meta_or_composite'));
 
 1772            $this->tpl->parseCurrentBlock();
 
 1776        $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_INSTALLATIONREMARKS", $this->lng->txt(
'meta_installation_remarks'));
 
 1777        $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1779        $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL", 
ilUtil::prepareFormOutput($this->md_section->getInstallationRemarks()));
 
 1780        $this->tpl->setVariable(
 
 1781            "INSTALLATIONREMARKS_VAL_LANGUAGE",
 
 1784                $this->md_section->getInstallationRemarksLanguageCode()
 
 1789        $this->tpl->setVariable(
 
 1790            "OTHERPLATTFORMREQUIREMENTS_TXT_OTHERPLATTFORMREQUIREMENTS",
 
 1791            $this->lng->txt(
'meta_other_plattform_requirements')
 
 1793        $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1795        $this->tpl->setVariable(
 
 1796            "OTHERPLATTFORMREQUIREMENTS_VAL",
 
 1799        $this->tpl->setVariable(
 
 1800            "OTHERPLATTFORMREQUIREMENTS_VAL_LANGUAGE",
 
 1803                $this->md_section->getOtherPlatformRequirementsLanguageCode()
 
 1808        $this->tpl->setVariable(
"DURATION_TXT_DURATION", $this->lng->txt(
'meta_duration'));
 
 1811        $this->tpl->setCurrentBlock(
"technical");
 
 1812        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 1813        $this->tpl->parseCurrentBlock();
 
 1820        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1822        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_lifecycle.html', 
'Services/MetaData');
 
 1825        $this->ctrl->setParameter($this, 
"section", 
"meta_lifecycle");
 
 1826        if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1827            $this->tpl->setCurrentBlock(
"no_lifecycle");
 
 1828            $this->tpl->setVariable(
"TXT_NO_LIFECYCLE", $this->lng->txt(
"meta_no_lifecycle"));
 
 1829            $this->tpl->setVariable(
"TXT_ADD_LIFECYCLE", $this->lng->txt(
"meta_add"));
 
 1830            $this->tpl->setVariable(
"ACTION_ADD_LIFECYCLE", $this->ctrl->getLinkTarget($this, 
"addSection"));
 
 1831            $this->tpl->parseCurrentBlock();
 
 1835        $this->ctrl->setReturn($this, 
'listLifecycle');
 
 1836        $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 1838        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1839        $this->tpl->setVariable(
"TXT_LIFECYCLE", $this->lng->txt(
'meta_lifecycle'));
 
 1842        $this->tpl->setVariable(
 
 1844            $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 1846        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
'delete'));
 
 1852        $this->tpl->setVariable(
"TXT_STATUS", $this->lng->txt(
'meta_status'));
 
 1854            $this->md_section->getStatus(),
 
 1856            array(0 => $this->lng->txt(
'meta_please_select'))
 
 1859        $this->tpl->setVariable(
"TXT_VERSION", $this->lng->txt(
'meta_version'));
 
 1862        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1865            $this->md_section->getVersionLanguageCode()
 
 1869        foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1870            $md_con = $this->md_section->getContribute($con_id);
 
 1872            if (count($ids) > 1) {
 
 1873                $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 1874                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_contribute');
 
 1876                $this->tpl->setCurrentBlock(
"contribute_delete");
 
 1877                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1878                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1879                $this->tpl->parseCurrentBlock();
 
 1882            foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1883                $md_ent = $md_con->getEntity($ent_id);
 
 1885                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_entity');
 
 1887                if (count($ent_ids) > 1) {
 
 1888                    $this->tpl->setCurrentBlock(
"contribute_entity_delete");
 
 1890                    $this->ctrl->setParameter($this, 
'meta_index', $ent_id);
 
 1891                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1892                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1893                    $this->tpl->parseCurrentBlock();
 
 1896                $this->tpl->setCurrentBlock(
"contribute_entity_loop");
 
 1898                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO", $con_id);
 
 1899                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO", $ent_id);
 
 1901                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY", $this->lng->txt(
'meta_entity'));
 
 1902                $this->tpl->parseCurrentBlock();
 
 1904            $this->tpl->setCurrentBlock(
"contribute_loop");
 
 1906            $this->ctrl->setParameter($this, 
'section_element', 
'meta_entity');
 
 1907            $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 1908            $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD", $this->ctrl->getLinkTarget($this, 
'addSectionElement'));
 
 1909            $this->tpl->setVariable(
 
 1910                "CONTRIBUTE_ENTITY_LOOP_TXT_ADD",
 
 1911                $this->lng->txt(
'add') . 
" " . $this->lng->txt(
'meta_entity')
 
 1914            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN", 2 + count($ent_ids));
 
 1915            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE", $this->lng->txt(
'meta_contribute'));
 
 1916            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE", $this->lng->txt(
'meta_role'));
 
 1919                "met_contribute[" . $con_id . 
"][Role]",
 
 1920                array(0 => $this->lng->txt(
'meta_please_select'))
 
 1922            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE", $this->lng->txt(
'meta_date'));
 
 1923            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO", $con_id);
 
 1926            $this->tpl->parseCurrentBlock();
 
 1928        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 1933        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 1936        $this->md_section = $this->md_obj->getLifecycle();
 
 1939        $this->md_section->setStatus(
$_POST[
'lif_status']);
 
 1940        $this->md_section->update();
 
 1943        if (is_array(
$_POST[
'met_identifier'])) {
 
 1945                $md_ide = $this->md_section->getIdentifier(
$id);
 
 1952        if (is_array(
$_POST[
'met_contribute'])) {
 
 1954                $md_con = &$this->md_section->getContribute(
$id);
 
 1959                if (is_array(
$_POST[
'met_entity'][
$id])) {
 
 1961                        $md_ent = &$md_con->getEntity($ent_id);
 
 1969        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 1980        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1982        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_meta_metadata.html', 
'Services/MetaData');
 
 1985        $this->ctrl->setParameter($this, 
"section", 
"meta_meta_metadata");
 
 1986        if (!is_object($this->md_section = $this->md_obj->getMetaMetadata())) {
 
 1987            $this->tpl->setCurrentBlock(
"no_meta_meta");
 
 1988            $this->tpl->setVariable(
"TXT_NO_META_META", $this->lng->txt(
"meta_no_meta_metadata"));
 
 1989            $this->tpl->setVariable(
"TXT_ADD_META_META", $this->lng->txt(
"meta_add"));
 
 1990            $this->tpl->setVariable(
"ACTION_ADD_META_META", $this->ctrl->getLinkTarget($this, 
"addSection"));
 
 1991            $this->tpl->parseCurrentBlock();
 
 1995        $this->ctrl->setReturn($this, 
'listMetaMetaData');
 
 1996        $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 1998        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1999        $this->tpl->setVariable(
"TXT_META_METADATA", $this->lng->txt(
'meta_meta_metadata'));
 
 2002        $this->tpl->setVariable(
 
 2004            $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2006        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
'delete'));
 
 2011        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 2013        $this->tpl->setVariable(
"VAL_LANGUAGE", $this->
__showLanguageSelect(
'met_language', $this->md_section->getLanguageCode()));
 
 2014        $this->tpl->setVariable(
"TXT_METADATASCHEME", $this->lng->txt(
'meta_metadatascheme'));
 
 2015        $this->tpl->setVariable(
"VAL_METADATASCHEME", $this->md_section->getMetaDataScheme());
 
 2019        foreach ($ids = $this->md_section->getIdentifierIds() as 
$id) {
 
 2020            $md_ide = $this->md_section->getIdentifier(
$id);
 
 2022            if (count($ids) > 1) {
 
 2023                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 2024                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_identifier');
 
 2026                $this->tpl->setCurrentBlock(
"identifier_delete");
 
 2027                $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 2028                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 2029                $this->tpl->parseCurrentBlock();
 
 2032            $this->tpl->setCurrentBlock(
"identifier_loop");
 
 2033            $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", 
$id);
 
 2034            $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 2035            $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
 
 2036            $this->tpl->setVariable(
 
 2037                "IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
 
 2040            $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
 
 2041            $this->tpl->setVariable(
 
 2042                "IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
 
 2045            $this->tpl->parseCurrentBlock();
 
 2049        foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 2050            $md_con = $this->md_section->getContribute($con_id);
 
 2052            if (count($ids) > 1) {
 
 2053                $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 2054                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_contribute');
 
 2056                $this->tpl->setCurrentBlock(
"contribute_delete");
 
 2057                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 2058                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 2059                $this->tpl->parseCurrentBlock();
 
 2062            foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 2063                $md_ent = $md_con->getEntity($ent_id);
 
 2065                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_entity');
 
 2067                if (count($ent_ids) > 1) {
 
 2068                    $this->tpl->setCurrentBlock(
"contribute_entity_delete");
 
 2070                    $this->ctrl->setParameter($this, 
'meta_index', $ent_id);
 
 2071                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 2072                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 2073                    $this->tpl->parseCurrentBlock();
 
 2076                $this->tpl->setCurrentBlock(
"contribute_entity_loop");
 
 2078                $this->ctrl->setParameter($this, 
'section_element', 
'meta_entity');
 
 2079                $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 2080                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD", $this->ctrl->getLinkTarget($this, 
'addSectionElement'));
 
 2081                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD", $this->lng->txt(
'add'));
 
 2084                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO", $con_id);
 
 2085                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO", $ent_id);
 
 2087                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY", $this->lng->txt(
'meta_entity'));
 
 2088                $this->tpl->parseCurrentBlock();
 
 2090            $this->tpl->setCurrentBlock(
"contribute_loop");
 
 2091            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN", 2 + count($ent_ids));
 
 2092            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE", $this->lng->txt(
'meta_contribute'));
 
 2093            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE", $this->lng->txt(
'meta_role'));
 
 2096                "met_contribute[" . $con_id . 
"][Role]",
 
 2097                array(0 => $this->lng->txt(
'meta_please_select'))
 
 2099            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE", $this->lng->txt(
'meta_date'));
 
 2100            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO", $con_id);
 
 2103            $this->tpl->parseCurrentBlock();
 
 2105        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 2111        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2114        $this->md_section = $this->md_obj->getMetaMetadata();
 
 2116        $this->md_section->update();
 
 2119        if (is_array(
$_POST[
'met_identifier'])) {
 
 2121                $md_ide = $this->md_section->getIdentifier(
$id);
 
 2128        if (is_array(
$_POST[
'met_contribute'])) {
 
 2130                $md_con = &$this->md_section->getContribute(
$id);
 
 2135                if (is_array(
$_POST[
'met_entity'][
$id])) {
 
 2137                        $md_ent = &$md_con->getEntity($ent_id);
 
 2145        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 2156        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2158        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_rights.html', 
'Services/MetaData');
 
 2160        if (!is_object($this->md_section = $this->md_obj->getRights())) {
 
 2161            $this->tpl->setCurrentBlock(
"no_rights");
 
 2162            $this->tpl->setVariable(
"TXT_NO_RIGHTS", $this->lng->txt(
"meta_no_rights"));
 
 2163            $this->tpl->setVariable(
"TXT_ADD_RIGHTS", $this->lng->txt(
"meta_add"));
 
 2164            $this->ctrl->setParameter($this, 
"section", 
"meta_rights");
 
 2165            $this->tpl->setVariable(
 
 2166                "ACTION_ADD_RIGHTS",
 
 2167                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2169            $this->tpl->parseCurrentBlock();
 
 2171            $this->ctrl->setReturn($this, 
'listRights');
 
 2172            $this->ctrl->setParameter($this, 
'section', 
'meta_rights');
 
 2173            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2175            $this->tpl->setVariable(
"TXT_RIGHTS", $this->lng->txt(
"meta_rights"));
 
 2176            $this->tpl->setVariable(
"TXT_COST", $this->lng->txt(
"meta_cost"));
 
 2177            $this->tpl->setVariable(
"TXT_COPYRIGHTANDOTHERRESTRICTIONS", $this->lng->txt(
"meta_copyright_and_other_restrictions"));
 
 2178            $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 2179            $this->tpl->setVariable(
"TXT_YES", $this->lng->txt(
"meta_yes"));
 
 2180            $this->tpl->setVariable(
"TXT_NO", $this->lng->txt(
"meta_no"));
 
 2182            $this->ctrl->setParameter($this, 
"section", 
"meta_rights");
 
 2183            $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 2184            $this->tpl->setVariable(
 
 2186                $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2189            $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2191            $this->tpl->setVariable(
"VAL_COST_" . strtoupper($this->md_section->getCosts()), 
" selected");
 
 2192            $this->tpl->setVariable(
"VAL_COPYRIGHTANDOTHERRESTRICTIONS_" .
 
 2193                strtoupper($this->md_section->getCopyrightAndOtherRestrictions()), 
" selected");
 
 2195            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2196            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2198            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2199            $this->tpl->setVariable(
 
 2200                "DESCRIPTION_LOOP_VAL_LANGUAGE",
 
 2202                    'rights[DescriptionLanguage]',
 
 2203                    $this->md_section->getDescriptionLanguageCode()
 
 2207            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2209            $this->tpl->setCurrentBlock(
"rights");
 
 2210            $this->tpl->parseCurrentBlock();
 
 2216        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2219        $this->md_section = $this->md_obj->getRights();
 
 2220        $this->md_section->setCosts(
$_POST[
'rights'][
'Cost']);
 
 2221        $this->md_section->setCopyrightAndOtherRestrictions(
$_POST[
'rights'][
'CopyrightAndOtherRestrictions']);
 
 2222        $this->md_section->setDescriptionLanguage(
new ilMDLanguageItem(
$_POST[
'rights'][
'DescriptionLanguage']));
 
 2224        $this->md_section->update();
 
 2227        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 2236        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2238        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_educational.html', 
'Services/MetaData');
 
 2240        if (!is_object($this->md_section = $this->md_obj->getEducational())) {
 
 2241            $this->tpl->setCurrentBlock(
"no_educational");
 
 2242            $this->tpl->setVariable(
"TXT_NO_EDUCATIONAL", $this->lng->txt(
"meta_no_educational"));
 
 2243            $this->tpl->setVariable(
"TXT_ADD_EDUCATIONAL", $this->lng->txt(
"meta_add"));
 
 2244            $this->ctrl->setParameter($this, 
"section", 
"meta_educational");
 
 2245            $this->tpl->setVariable(
 
 2246                "ACTION_ADD_EDUCATIONAL",
 
 2247                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2249            $this->tpl->parseCurrentBlock();
 
 2251            $this->ctrl->setReturn($this, 
'listEducational');
 
 2252            $this->ctrl->setParameter($this, 
'section', 
'meta_educational');
 
 2253            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2255            $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 2256            $this->tpl->setVariable(
 
 2258                $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2261            $this->tpl->setVariable(
"TXT_EDUCATIONAL", $this->lng->txt(
"meta_educational"));
 
 2262            $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2263            $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 2264            $this->tpl->setVariable(
"TXT_TYPICALAGERANGE", $this->lng->txt(
"meta_typical_age_range"));
 
 2265            $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2266            $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2267            $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2268            $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 2270            $this->tpl->setVariable(
"TXT_INTERACTIVITYTYPE", $this->lng->txt(
"meta_interactivity_type"));
 
 2271            $this->tpl->setVariable(
"TXT_LEARNINGRESOURCETYPE", $this->lng->txt(
"meta_learning_resource_type"));
 
 2272            $this->tpl->setVariable(
"TXT_INTERACTIVITYLEVEL", $this->lng->txt(
"meta_interactivity_level"));
 
 2273            $this->tpl->setVariable(
"TXT_SEMANTICDENSITY", $this->lng->txt(
"meta_semantic_density"));
 
 2274            $this->tpl->setVariable(
"TXT_INTENDEDENDUSERROLE", $this->lng->txt(
"meta_intended_end_user_role"));
 
 2275            $this->tpl->setVariable(
"TXT_CONTEXT", $this->lng->txt(
"meta_context"));
 
 2276            $this->tpl->setVariable(
"TXT_DIFFICULTY", $this->lng->txt(
"meta_difficulty"));
 
 2278            $this->tpl->setVariable(
"VAL_INTERACTIVITYTYPE_" . strtoupper($this->md_section->getInteractivityType()), 
" selected");
 
 2279            $this->tpl->setVariable(
"VAL_LEARNINGRESOURCETYPE_" . strtoupper($this->md_section->getLearningResourceType()), 
" selected");
 
 2280            $this->tpl->setVariable(
"VAL_INTERACTIVITYLEVEL_" . strtoupper($this->md_section->getInteractivityLevel()), 
" selected");
 
 2281            $this->tpl->setVariable(
"VAL_SEMANTICDENSITY_" . strtoupper($this->md_section->getSemanticDensity()), 
" selected");
 
 2282            $this->tpl->setVariable(
"VAL_INTENDEDENDUSERROLE_" . strtoupper($this->md_section->getIntendedEndUserRole()), 
" selected");
 
 2283            $this->tpl->setVariable(
"VAL_CONTEXT_" . strtoupper($this->md_section->getContext()), 
" selected");
 
 2284            $this->tpl->setVariable(
"VAL_DIFFICULTY_" . strtoupper($this->md_section->getDifficulty()), 
" selected");
 
 2285            #$this->tpl->setVariable("VAL_TYPICALLEARNINGTIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime()));
 
 2287            $this->tpl->setVariable(
"TXT_ACTIVE", $this->lng->txt(
"meta_active"));
 
 2288            $this->tpl->setVariable(
"TXT_EXPOSITIVE", $this->lng->txt(
"meta_expositive"));
 
 2289            $this->tpl->setVariable(
"TXT_MIXED", $this->lng->txt(
"meta_mixed"));
 
 2290            $this->tpl->setVariable(
"TXT_EXERCISE", $this->lng->txt(
"meta_exercise"));
 
 2291            $this->tpl->setVariable(
"TXT_SIMULATION", $this->lng->txt(
"meta_simulation"));
 
 2292            $this->tpl->setVariable(
"TXT_QUESTIONNAIRE", $this->lng->txt(
"meta_questionnaire"));
 
 2293            $this->tpl->setVariable(
"TXT_DIAGRAMM", $this->lng->txt(
"meta_diagramm"));
 
 2294            $this->tpl->setVariable(
"TXT_FIGURE", $this->lng->txt(
"meta_figure"));
 
 2295            $this->tpl->setVariable(
"TXT_GRAPH", $this->lng->txt(
"meta_graph"));
 
 2296            $this->tpl->setVariable(
"TXT_INDEX", $this->lng->txt(
"meta_index"));
 
 2297            $this->tpl->setVariable(
"TXT_SLIDE", $this->lng->txt(
"meta_slide"));
 
 2298            $this->tpl->setVariable(
"TXT_TABLE", $this->lng->txt(
"meta_table"));
 
 2299            $this->tpl->setVariable(
"TXT_NARRATIVETEXT", $this->lng->txt(
"meta_narrative_text"));
 
 2300            $this->tpl->setVariable(
"TXT_EXAM", $this->lng->txt(
"meta_exam"));
 
 2301            $this->tpl->setVariable(
"TXT_EXPERIMENT", $this->lng->txt(
"meta_experiment"));
 
 2302            $this->tpl->setVariable(
"TXT_PROBLEMSTATEMENT", $this->lng->txt(
"meta_problem_statement"));
 
 2303            $this->tpl->setVariable(
"TXT_SELFASSESSMENT", $this->lng->txt(
"meta_self_assessment"));
 
 2304            $this->tpl->setVariable(
"TXT_LECTURE", $this->lng->txt(
"meta_lecture"));
 
 2305            $this->tpl->setVariable(
"TXT_VERYLOW", $this->lng->txt(
"meta_very_low"));
 
 2306            $this->tpl->setVariable(
"TXT_LOW", $this->lng->txt(
"meta_low"));
 
 2307            $this->tpl->setVariable(
"TXT_MEDIUM", $this->lng->txt(
"meta_medium"));
 
 2308            $this->tpl->setVariable(
"TXT_HIGH", $this->lng->txt(
"meta_high"));
 
 2309            $this->tpl->setVariable(
"TXT_VERYHIGH", $this->lng->txt(
"meta_very_high"));
 
 2310            $this->tpl->setVariable(
"TXT_TEACHER", $this->lng->txt(
"meta_teacher"));
 
 2311            $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
 
 2312            $this->tpl->setVariable(
"TXT_LEARNER", $this->lng->txt(
"meta_learner"));
 
 2313            $this->tpl->setVariable(
"TXT_MANAGER", $this->lng->txt(
"meta_manager"));
 
 2314            $this->tpl->setVariable(
"TXT_SCHOOL", $this->lng->txt(
"meta_school"));
 
 2315            $this->tpl->setVariable(
"TXT_HIGHEREDUCATION", $this->lng->txt(
"meta_higher_education"));
 
 2316            $this->tpl->setVariable(
"TXT_TRAINING", $this->lng->txt(
"meta_training"));
 
 2317            $this->tpl->setVariable(
"TXT_OTHER", $this->lng->txt(
"meta_other"));
 
 2318            $this->tpl->setVariable(
"TXT_VERYEASY", $this->lng->txt(
"meta_very_easy"));
 
 2319            $this->tpl->setVariable(
"TXT_EASY", $this->lng->txt(
"meta_easy"));
 
 2320            $this->tpl->setVariable(
"TXT_DIFFICULT", $this->lng->txt(
"meta_difficult"));
 
 2321            $this->tpl->setVariable(
"TXT_VERYDIFFICULT", $this->lng->txt(
"meta_very_difficult"));
 
 2322            $this->tpl->setVariable(
"TXT_TYPICALLEARNINGTIME", $this->lng->txt(
"meta_typical_learning_time"));
 
 2326            $tlt = array(0,0,0,0,0);
 
 2329            include_once 
'Services/MetaData/classes/class.ilMDUtils.php';
 
 2332                if (strlen($this->md_section->getTypicalLearningTime())) {
 
 2333                    $tlt = array(0,0,0,0,0);
 
 2338            $this->tpl->setVariable(
"TXT_MONTH", $this->lng->txt(
'md_months'));
 
 2342            $this->tpl->setVariable(
"TXT_DAYS", $this->lng->txt(
'md_days'));
 
 2343            $this->tpl->setVariable(
"TXT_TIME", $this->lng->txt(
'md_time'));
 
 2345            $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME", $this->lng->txt(
'meta_typical_learning_time'));
 
 2348                $tlt[4] ? 
false : 
true,
 
 2354            $this->tpl->setVariable(
"TLT_HINT", $tlt[4] ? 
'(hh:mm:ss)' : 
'(hh:mm)');
 
 2357                $this->tpl->setCurrentBlock(
"tlt_not_valid");
 
 2358                $this->tpl->setVariable(
"TXT_CURRENT_VAL", $this->lng->txt(
'meta_current_value'));
 
 2359                $this->tpl->setVariable(
"TLT", $this->md_section->getTypicalLearningTime());
 
 2360                $this->tpl->setVariable(
"INFO_TLT_NOT_VALID", $this->lng->txt(
'meta_info_tlt_not_valid'));
 
 2361                $this->tpl->parseCurrentBlock();
 
 2367            foreach ($ids = $this->md_section->getTypicalAgeRangeIds() as 
$id) {
 
 2368                $md_age = $this->md_section->getTypicalAgeRange(
$id);
 
 2371                if (is_object($md_age)) {
 
 2373                        $this->tpl->setCurrentBlock(
"agerange_head");
 
 2374                        $this->tpl->setVariable(
 
 2375                            "TYPICALAGERANGE_LOOP_TXT_TYPICALAGERANGE",
 
 2376                            $this->lng->txt(
"meta_typical_age_range")
 
 2378                        $this->tpl->setVariable(
"ROWSPAN_AGERANGE", count($ids));
 
 2379                        $this->tpl->parseCurrentBlock();
 
 2384                    $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 2385                    $this->ctrl->setParameter($this, 
'meta_path', 
'educational_typical_age_range');
 
 2387                    $this->tpl->setCurrentBlock(
"typicalagerange_delete");
 
 2388                    $this->tpl->setVariable(
 
 2389                        "TYPICALAGERANGE_LOOP_ACTION_DELETE",
 
 2390                        $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2392                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2393                    $this->tpl->parseCurrentBlock();
 
 2395                    $this->tpl->setCurrentBlock(
"typicalagerange_loop");
 
 2396                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2398                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_NO", 
$id);
 
 2399                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2400                    $this->tpl->setVariable(
 
 2401                        "TYPICALAGERANGE_LOOP_VAL_LANGUAGE",
 
 2403                            'educational[TypicalAgeRange][' . $id . 
'][Language]',
 
 2404                            $md_age->getTypicalAgeRangeLanguageCode()
 
 2407                    $this->ctrl->setParameter($this, 
"section_element", 
"educational_typical_age_range");
 
 2408                    $this->tpl->setVariable(
 
 2409                        "TYPICALAGERANGE_LOOP_ACTION_ADD",
 
 2410                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2412                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2413                    $this->tpl->parseCurrentBlock();
 
 2419            foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
 2421                    $this->tpl->setCurrentBlock(
"desc_head");
 
 2422                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2423                    $this->tpl->setVariable(
"ROWSPAN_DESC", count($ids));
 
 2424                    $this->tpl->parseCurrentBlock();
 
 2428                $md_des = $this->md_section->getDescription(
$id);
 
 2430                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 2431                $this->ctrl->setParameter($this, 
'meta_path', 
'educational_description');
 
 2433                $this->tpl->setCurrentBlock(
"description_loop");
 
 2434                $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", 
$id);
 
 2435                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2437                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2438                $this->tpl->setVariable(
 
 2439                    "DESCRIPTION_LOOP_VAL_LANGUAGE",
 
 2441                        'educational[Description][' . $id . 
'][Language]',
 
 2442                        $md_des->getDescriptionLanguageCode()
 
 2445                $this->tpl->setVariable(
 
 2446                    "DESCRIPTION_LOOP_ACTION_DELETE",
 
 2447                    $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2449                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2450                $this->ctrl->setParameter($this, 
"section_element", 
"educational_description");
 
 2451                $this->tpl->setVariable(
 
 2452                    "DESCRIPTION_LOOP_ACTION_ADD",
 
 2453                    $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2455                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2456                $this->tpl->parseCurrentBlock();
 
 2462            foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
 2464                    $this->tpl->setCurrentBlock(
"language_head");
 
 2465                    $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2466                    $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
 
 2467                    $this->tpl->parseCurrentBlock();
 
 2471                $md_lang = $this->md_section->getLanguage(
$id);
 
 2473                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 2474                $this->ctrl->setParameter($this, 
'meta_path', 
'educational_language');
 
 2476                $this->tpl->setCurrentBlock(
"language_loop");
 
 2477                $this->tpl->setVariable(
 
 2478                    "LANGUAGE_LOOP_VAL_LANGUAGE",
 
 2480                        'educational[Language][' . $id . 
']',
 
 2481                        $md_lang->getLanguageCode()
 
 2485                $this->tpl->setVariable(
 
 2486                    "LANGUAGE_LOOP_ACTION_DELETE",
 
 2487                    $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2489                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2490                $this->ctrl->setParameter($this, 
"section_element", 
"educational_language");
 
 2491                $this->tpl->setVariable(
 
 2492                    "LANGUAGE_LOOP_ACTION_ADD",
 
 2493                    $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2495                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2496                $this->tpl->parseCurrentBlock();
 
 2499            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2501            $this->tpl->setCurrentBlock(
"educational");
 
 2502            $this->tpl->parseCurrentBlock();
 
 2508        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2511        $this->md_section = $this->md_obj->getEducational();
 
 2512        $this->md_section->setInteractivityType(
$_POST[
'educational'][
'InteractivityType']);
 
 2513        $this->md_section->setLearningResourceType(
$_POST[
'educational'][
'LearningResourceType']);
 
 2514        $this->md_section->setInteractivityLevel(
$_POST[
'educational'][
'InteractivityLevel']);
 
 2515        $this->md_section->setSemanticDensity(
$_POST[
'educational'][
'SemanticDensity']);
 
 2516        $this->md_section->setIntendedEndUserRole(
$_POST[
'educational'][
'IntendedEndUserRole']);
 
 2517        $this->md_section->setContext(
$_POST[
'educational'][
'Context']);
 
 2518        $this->md_section->setDifficulty(
$_POST[
'educational'][
'Difficulty']);
 
 2525            $this->md_section->setPhysicalTypicalLearningTime(
 
 2526                (
int) 
$_POST[
'tlt'][
'mo'],
 
 2527                (
int) 
$_POST[
'tlt'][
'd'],
 
 2528                (
int) 
$_POST[
'tlt'][
'h'],
 
 2529                (
int) 
$_POST[
'tlt'][
'm'],
 
 2533            $this->md_section->setTypicalLearningTime(
'');
 
 2539        foreach ($ids = $this->md_section->getTypicalAgeRangeIds() as 
$id) {
 
 2540            $md_age = $this->md_section->getTypicalAgeRange(
$id);
 
 2542            $md_age->setTypicalAgeRangeLanguage(
 
 2549        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
 2550            $md_des = $this->md_section->getDescription(
$id);
 
 2552            $md_des->setDescriptionLanguage(
 
 2559        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
 2560            $md_lang = $this->md_section->getLanguage(
$id);
 
 2561            $md_lang->setLanguage(
 
 2567        $this->md_section->update();
 
 2570        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 2579        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2581        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_relation.html', 
'Services/MetaData');
 
 2583        $rel_ids = $this->md_obj->getRelationIds();
 
 2584        if (!is_array($rel_ids) || count($rel_ids) == 0) {
 
 2585            $this->tpl->setCurrentBlock(
"no_relation");
 
 2586            $this->tpl->setVariable(
"TXT_NO_RELATION", $this->lng->txt(
"meta_no_relation"));
 
 2587            $this->tpl->setVariable(
"TXT_ADD_RELATION", $this->lng->txt(
"meta_add"));
 
 2588            $this->ctrl->setParameter($this, 
"section", 
"meta_relation");
 
 2589            $this->tpl->setVariable(
 
 2590                "ACTION_ADD_RELATION",
 
 2591                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2593            $this->tpl->parseCurrentBlock();
 
 2595            foreach ($rel_ids as $rel_id) {
 
 2596                $this->md_section = $this->md_obj->getRelation($rel_id);
 
 2598                $this->ctrl->setParameter($this, 
'meta_index', $rel_id);
 
 2599                $this->ctrl->setParameter($this, 
"section", 
"meta_relation");
 
 2602                $res_ids = $this->md_section->getIdentifier_Ids();
 
 2603                foreach ($res_ids as $res_id) {
 
 2604                    $ident = $this->md_section->getIdentifier_($res_id);
 
 2605                    $this->ctrl->setParameter($this, 
"meta_index", $res_id);
 
 2607                    if (count($res_ids) > 1) {
 
 2608                        $this->tpl->setCurrentBlock(
"identifier_delete");
 
 2609                        $this->ctrl->setParameter($this, 
"meta_path", 
"relation_resource_identifier");
 
 2610                        $this->tpl->setVariable(
 
 2611                            "IDENTIFIER_LOOP_ACTION_DELETE",
 
 2612                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2614                        $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2615                        $this->tpl->parseCurrentBlock();
 
 2618                    $this->tpl->setCurrentBlock(
"identifier_loop");
 
 2620                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $res_id);
 
 2621                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 2622                    $this->ctrl->setParameter($this, 
'meta_index', $rel_id);
 
 2623                    $this->ctrl->setParameter($this, 
"section_element", 
"relation_resource_identifier");
 
 2624                    $this->tpl->setVariable(
 
 2625                        "IDENTIFIER_LOOP_ACTION_ADD",
 
 2626                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2628                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2629                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
 
 2630                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
 
 2631                    $this->tpl->setVariable(
 
 2632                        "IDENTIFIER_LOOP_VAL_CATALOG",
 
 2635                    $this->tpl->setVariable(
 
 2636                        "IDENTIFIER_LOOP_VAL_ENTRY",
 
 2639                    $this->tpl->parseCurrentBlock();
 
 2643                $res_dess = $this->md_section->getDescriptionIds();
 
 2644                foreach ($res_dess as $res_des) {
 
 2645                    $des = $this->md_section->getDescription($res_des);
 
 2646                    $this->ctrl->setParameter($this, 
"meta_index", $res_des);
 
 2648                    if (count($res_dess) > 1) {
 
 2649                        $this->tpl->setCurrentBlock(
"description_delete");
 
 2650                        $this->ctrl->setParameter($this, 
"meta_path", 
"relation_resource_description");
 
 2651                        $this->tpl->setVariable(
 
 2652                            "DESCRIPTION_LOOP_ACTION_DELETE",
 
 2653                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2655                        $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2656                        $this->tpl->parseCurrentBlock();
 
 2659                    $this->tpl->setCurrentBlock(
"description_loop");
 
 2660                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $res_des);
 
 2661                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2662                    $this->ctrl->setParameter($this, 
'meta_index', $rel_id);
 
 2663                    $this->ctrl->setParameter($this, 
"section_element", 
"relation_resource_description");
 
 2664                    $this->tpl->setVariable(
 
 2665                        "DESCRIPTION_LOOP_ACTION_ADD",
 
 2666                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2668                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2669                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2670                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2671                    $this->tpl->setVariable(
 
 2672                        "DESCRIPTION_LOOP_VAL",
 
 2675                    $this->tpl->setVariable(
 
 2676                        "DESCRIPTION_LOOP_VAL_LANGUAGE",
 
 2678                            'relation[Resource][Description][' . $res_des . 
'][Language]',
 
 2679                            $des->getDescriptionLanguageCode()
 
 2682                    $this->tpl->parseCurrentBlock();
 
 2685                $this->tpl->setCurrentBlock(
"relation_loop");
 
 2686                $this->tpl->setVariable(
"REL_ID", $rel_id);
 
 2687                $this->tpl->setVariable(
"TXT_RELATION", $this->lng->txt(
"meta_relation"));
 
 2688                $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 2689                $this->tpl->setVariable(
 
 2691                    $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2693                $this->ctrl->setParameter($this, 
"section", 
"meta_relation");
 
 2694                $this->tpl->setVariable(
 
 2696                    $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2698                $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2699                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2700                $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 2701                $this->tpl->setVariable(
"TXT_KIND", $this->lng->txt(
"meta_kind"));
 
 2702                $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 2703                $this->tpl->setVariable(
"TXT_ISPARTOF", $this->lng->txt(
"meta_is_part_of"));
 
 2704                $this->tpl->setVariable(
"TXT_HASPART", $this->lng->txt(
"meta_has_part"));
 
 2705                $this->tpl->setVariable(
"TXT_ISVERSIONOF", $this->lng->txt(
"meta_is_version_of"));
 
 2706                $this->tpl->setVariable(
"TXT_HASVERSION", $this->lng->txt(
"meta_has_version"));
 
 2707                $this->tpl->setVariable(
"TXT_ISFORMATOF", $this->lng->txt(
"meta_is_format_of"));
 
 2708                $this->tpl->setVariable(
"TXT_HASFORMAT", $this->lng->txt(
"meta_has_format"));
 
 2709                $this->tpl->setVariable(
"TXT_REFERENCES", $this->lng->txt(
"meta_references"));
 
 2710                $this->tpl->setVariable(
"TXT_ISREFERENCEDBY", $this->lng->txt(
"meta_is_referenced_by"));
 
 2711                $this->tpl->setVariable(
"TXT_ISBASEDON", $this->lng->txt(
"meta_is_based_on"));
 
 2712                $this->tpl->setVariable(
"TXT_ISBASISFOR", $this->lng->txt(
"meta_is_basis_for"));
 
 2713                $this->tpl->setVariable(
"TXT_REQUIRES", $this->lng->txt(
"meta_requires"));
 
 2714                $this->tpl->setVariable(
"TXT_ISREQUIREDBY", $this->lng->txt(
"meta_is_required_by"));
 
 2715                $this->tpl->setVariable(
"TXT_RESOURCE", $this->lng->txt(
"meta_resource"));
 
 2716                $this->tpl->setVariable(
"VAL_KIND_" . strtoupper($this->md_section->getKind()), 
" selected");
 
 2717                $this->tpl->parseCurrentBlock();
 
 2720            $this->tpl->setCurrentBlock(
"relation");
 
 2721            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2722            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2723            $this->tpl->parseCurrentBlock();
 
 2729        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2732        foreach ($ids = $this->md_obj->getRelationIds() as 
$id) {
 
 2734            $relation = $this->md_obj->getRelation(
$id);
 
 2735            $relation->setKind(
$_POST[
'relation'][
$id][
'Kind']);
 
 2737            $relation->update();
 
 2740            $res_idents = $relation->getIdentifier_Ids();
 
 2741            foreach ($res_idents as $res_id) {
 
 2742                $ident = $relation->getIdentifier_($res_id);
 
 2749            $res_dess = $relation->getDescriptionIds();
 
 2750            foreach ($res_dess as $res_des) {
 
 2751                $des = $relation->getDescription($res_des);
 
 2753                $des->setDescriptionLanguage(
 
 2761        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 2770        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2772        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_annotation.html', 
'Services/MetaData');
 
 2774        $anno_ids = $this->md_obj->getAnnotationIds();
 
 2775        if (!is_array($anno_ids) || count($anno_ids) == 0) {
 
 2776            $this->tpl->setCurrentBlock(
"no_annotation");
 
 2777            $this->tpl->setVariable(
"TXT_NO_ANNOTATION", $this->lng->txt(
"meta_no_annotation"));
 
 2778            $this->tpl->setVariable(
"TXT_ADD_ANNOTATION", $this->lng->txt(
"meta_add"));
 
 2779            $this->ctrl->setParameter($this, 
"section", 
"meta_annotation");
 
 2780            $this->tpl->setVariable(
 
 2781                "ACTION_ADD_ANNOTATION",
 
 2782                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2784            $this->tpl->parseCurrentBlock();
 
 2786            foreach ($anno_ids as $anno_id) {
 
 2787                $this->ctrl->setParameter($this, 
'meta_index', $anno_id);
 
 2788                $this->ctrl->setParameter($this, 
"section", 
"meta_annotation");
 
 2790                $this->md_section = $this->md_obj->getAnnotation($anno_id);
 
 2792                $this->tpl->setCurrentBlock(
"annotation_loop");
 
 2793                $this->tpl->setVariable(
"ANNOTATION_ID", $anno_id);
 
 2794                $this->tpl->setVariable(
"TXT_ANNOTATION", $this->lng->txt(
"meta_annotation"));
 
 2795                $this->ctrl->setParameter($this, 
"meta_index", $anno_id);
 
 2796                $this->tpl->setVariable(
 
 2798                    $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2800                $this->ctrl->setParameter($this, 
"section", 
"meta_annotation");
 
 2801                $this->tpl->setVariable(
 
 2803                    $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2805                $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2806                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2808                $this->tpl->setVariable(
"TXT_ENTITY", $this->lng->txt(
"meta_entity"));
 
 2810                $this->tpl->setVariable(
"TXT_DATE", $this->lng->txt(
"meta_date"));
 
 2814                $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2815                $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2817                $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2818                $this->tpl->setVariable(
 
 2819                    "VAL_DESCRIPTION_LANGUAGE",
 
 2821                        'annotation[' . $anno_id . 
'][Language]',
 
 2822                        $this->md_section->getDescriptionLanguageCode()
 
 2826                $this->tpl->parseCurrentBlock();
 
 2829            $this->tpl->setCurrentBlock(
"annotation");
 
 2830            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2831            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2832            $this->tpl->parseCurrentBlock();
 
 2838        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2841        foreach ($ids = $this->md_obj->getAnnotationIds() as 
$id) {
 
 2843            $annotation = $this->md_obj->getAnnotation(
$id);
 
 2847            $annotation->setDescriptionLanguage(
 
 2851            $annotation->update();
 
 2855        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 2864        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2865        $this->
__setTabs(
'meta_classification');
 
 2866        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_classification.html', 
'Services/MetaData');
 
 2868        $class_ids = $this->md_obj->getClassificationIds();
 
 2869        if (!is_array($class_ids) || count($class_ids) == 0) {
 
 2870            $this->tpl->setCurrentBlock(
"no_classification");
 
 2871            $this->tpl->setVariable(
"TXT_NO_CLASSIFICATION", $this->lng->txt(
"meta_no_classification"));
 
 2872            $this->tpl->setVariable(
"TXT_ADD_CLASSIFICATION", $this->lng->txt(
"meta_add"));
 
 2873            $this->ctrl->setParameter($this, 
"section", 
"meta_classification");
 
 2874            $this->tpl->setVariable(
 
 2875                "ACTION_ADD_CLASSIFICATION",
 
 2876                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2878            $this->tpl->parseCurrentBlock();
 
 2880            foreach ($class_ids as $class_id) {
 
 2881                $this->md_section = $this->md_obj->getClassification($class_id);
 
 2882                $this->ctrl->setParameter($this, 
"section", 
"meta_classification");
 
 2885                $tp_ids = $this->md_section->getTaxonPathIds();
 
 2886                foreach ($tp_ids as $tp_id) {
 
 2887                    $tax_path = $this->md_section->getTaxonPath($tp_id);
 
 2889                    $tax_ids = $tax_path->getTaxonIds();
 
 2891                    foreach ($tax_ids as $tax_id) {
 
 2892                        $taxon = $tax_path->getTaxon($tax_id);
 
 2894                        if (count($tax_ids) > 1) {
 
 2895                            $this->tpl->setCurrentBlock(
"taxon_delete");
 
 2896                            $this->ctrl->setParameter($this, 
"meta_index", $tax_id);
 
 2897                            $this->ctrl->setParameter($this, 
"meta_path", 
"classification_taxon");
 
 2898                            $this->tpl->setVariable(
 
 2899                                "TAXONPATH_TAXON_LOOP_ACTION_DELETE",
 
 2900                                $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2902                            $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2903                            $this->tpl->parseCurrentBlock();
 
 2906                        $this->tpl->setCurrentBlock(
"taxonpath_taxon_loop");
 
 2907                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_NO", $tax_id);
 
 2908                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TAXONPATH_NO", $tp_id);
 
 2909                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_TAXON", $this->lng->txt(
"meta_taxon"));
 
 2910                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2912                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ID", $this->lng->txt(
"meta_id"));
 
 2914                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2915                        $this->tpl->setVariable(
 
 2916                            "TAXONPATH_TAXON_LOOP_VAL_TAXON_LANGUAGE",
 
 2918                                'classification[TaxonPath][Taxon][' . $tax_id . 
'][Language]',
 
 2919                                $taxon->getTaxonLanguageCode()
 
 2923                        $this->ctrl->setParameter($this, 
"section_element", 
"Taxon_" . $class_id);
 
 2924                        $this->ctrl->setParameter($this, 
"meta_index", $tp_id);
 
 2925                        $this->tpl->setVariable(
 
 2926                            "TAXONPATH_TAXON_LOOP_ACTION_ADD",
 
 2927                            $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2929                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2930                        $this->tpl->parseCurrentBlock();
 
 2933                    if (count($tp_ids) > 1) {
 
 2934                        $this->tpl->setCurrentBlock(
"taxonpath_delete");
 
 2935                        $this->ctrl->setParameter($this, 
"meta_index", $tp_id);
 
 2936                        $this->ctrl->setParameter($this, 
"meta_path", 
"classification_taxon_path");
 
 2937                        $this->tpl->setVariable(
 
 2938                            "TAXONPATH_LOOP_ACTION_DELETE",
 
 2939                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2941                        $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2942                        $this->tpl->parseCurrentBlock();
 
 2945                    $this->tpl->setCurrentBlock(
"taxonpath_loop");
 
 2946                    $this->tpl->setVariable(
"TAXONPATH_LOOP_NO", $tp_id);
 
 2947                    $this->tpl->setVariable(
"TAXONPATH_LOOP_ROWSPAN", (3 * count($tax_ids)) + 2);
 
 2948                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
 
 2949                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_SOURCE", $this->lng->txt(
"meta_source"));
 
 2950                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2951                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2953                    $this->tpl->setVariable(
 
 2954                        "TAXONPATH_LOOP_VAL_SOURCE_LANGUAGE",
 
 2956                            'classification[TaxonPath][' . $tp_id . 
'][Source][Language]',
 
 2957                            $tax_path->getSourceLanguageCode()
 
 2960                    $this->ctrl->setParameter($this, 
"section_element", 
"TaxonPath_" . $class_id);
 
 2961                    $this->ctrl->setParameter($this, 
"meta_index", $class_id);
 
 2962                    $this->tpl->setVariable(
 
 2963                        "TAXONPATH_LOOP_ACTION_ADD",
 
 2964                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2966                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2967                    $this->tpl->parseCurrentBlock();
 
 2971                $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2972                $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2973                $this->tpl->setVariable(
 
 2977                $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2978                $this->tpl->setVariable(
 
 2979                    "VAL_DESCRIPTION_LANGUAGE",
 
 2981                        'classification[' . $class_id . 
'][Language]',
 
 2982                        $this->md_section->getDescriptionLanguageCode()
 
 2987                $key_ids = $this->md_section->getKeywordIds();
 
 2988                foreach ($key_ids as $key_id) {
 
 2989                    if (count($key_ids) > 1) {
 
 2990                        $this->ctrl->setParameter($this, 
"meta_index", $key_id);
 
 2991                        $this->ctrl->setParameter($this, 
"meta_path", 
"classification_keyword");
 
 2992                        $this->tpl->setCurrentBlock(
"keyword_delete");
 
 2993                        $this->tpl->setVariable(
 
 2994                            "KEYWORD_LOOP_ACTION_DELETE",
 
 2995                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2997                        $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2998                        $this->tpl->parseCurrentBlock();
 
 3001                    $keyword = $this->md_section->getKeyword($key_id);
 
 3002                    $this->tpl->setCurrentBlock(
"keyword_loop");
 
 3003                    $this->tpl->setVariable(
"KEYWORD_LOOP_NO", $key_id);
 
 3004                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 3005                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 3006                    $this->tpl->setVariable(
 
 3010                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 3011                    $this->tpl->setVariable(
 
 3012                        "KEYWORD_LOOP_VAL_LANGUAGE",
 
 3014                            'classification[Keyword][' . $key_id . 
'][Language]',
 
 3015                            $keyword->getKeywordLanguageCode()
 
 3018                    $this->ctrl->setParameter($this, 
"meta_index", $class_id);
 
 3019                    $this->ctrl->setParameter($this, 
"section_element", 
"Keyword_" . $class_id);
 
 3020                    $this->tpl->setVariable(
 
 3021                        "KEYWORD_LOOP_ACTION_ADD",
 
 3022                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 3024                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 3025                    $this->tpl->parseCurrentBlock();
 
 3028                $this->tpl->setCurrentBlock(
"classification_loop");
 
 3029                $this->tpl->setVariable(
"TXT_CLASSIFICATION", $this->lng->txt(
"meta_classification"));
 
 3030                $this->ctrl->setParameter($this, 
"meta_index", $class_id);
 
 3031                $this->tpl->setVariable(
 
 3033                    $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 3035                $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 3036                $this->tpl->setVariable(
 
 3038                    $this->ctrl->getLinkTarget($this, 
"addSection")
 
 3040                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 3042                $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 3043                $this->tpl->setVariable(
"TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
 
 3044                $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 3045                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 3047                $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 3048                $this->tpl->setVariable(
"CLASS_ID", $class_id);
 
 3049                $this->tpl->setVariable(
"TXT_PURPOSE", $this->lng->txt(
"meta_purpose"));
 
 3050                $this->tpl->setVariable(
"TXT_DISCIPLINE", $this->lng->txt(
"meta_learning_resource_type"));
 
 3051                $this->tpl->setVariable(
"TXT_IDEA", $this->lng->txt(
"meta_idea"));
 
 3052                $this->tpl->setVariable(
"TXT_PREREQUISITE", $this->lng->txt(
"meta_prerequisite"));
 
 3053                $this->tpl->setVariable(
"TXT_EDUCATIONALOBJECTIVE", $this->lng->txt(
"meta_educational_objective"));
 
 3054                $this->tpl->setVariable(
"TXT_ACCESSIBILITYRESTRICTIONS", $this->lng->txt(
"meta_accessibility_restrictions"));
 
 3055                $this->tpl->setVariable(
"TXT_EDUCATIONALLEVEL", $this->lng->txt(
"meta_educational_level"));
 
 3056                $this->tpl->setVariable(
"TXT_SKILLLEVEL", $this->lng->txt(
"meta_skill_level"));
 
 3057                $this->tpl->setVariable(
"TXT_SECURITYLEVEL", $this->lng->txt(
"meta_security_level"));
 
 3058                $this->tpl->setVariable(
"TXT_COMPETENCY", $this->lng->txt(
"meta_competency"));
 
 3059                $this->tpl->setVariable(
"VAL_PURPOSE_" . strtoupper($this->md_section->getPurpose()), 
" selected");
 
 3060                $this->tpl->parseCurrentBlock();
 
 3063            $this->tpl->setCurrentBlock(
"classification");
 
 3064            $this->tpl->setVariable(
 
 3066                $this->ctrl->getFormAction($this)
 
 3068            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 3069            $this->tpl->parseCurrentBlock();
 
 3075        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 3078        foreach ($ids = $this->md_obj->getClassificationIds() as 
$id) {
 
 3080            $classification = $this->md_obj->getClassification(
$id);
 
 3081            $classification->setPurpose(
$_POST[
'classification'][
$id][
'Purpose']);
 
 3084            $classification->setDescriptionLanguage(
 
 3088            $classification->update();
 
 3090            $key_ids = $classification->getKeywordIds();
 
 3091            foreach ($key_ids as $key_id) {
 
 3092                $keyword = $classification->getKeyword($key_id);
 
 3094                $keyword->setKeywordLanguage(
 
 3100            $tp_ids = $classification->getTaxonPathIds();
 
 3101            foreach ($tp_ids as $tp_id) {
 
 3102                $tax_path = $classification->getTaxonPath($tp_id);
 
 3104                $tax_path->setSourceLanguage(
 
 3107                $tax_path->update();
 
 3109                $tax_ids = $tax_path->getTaxonIds();
 
 3111                foreach ($tax_ids as $tax_id) {
 
 3112                    $taxon = $tax_path->getTaxon($tax_id);
 
 3114                    $taxon->setTaxonLanguage(
 
 3124        ilUtil::sendSuccess($this->lng->txt(
"saved_successfully"));
 
 3130        include_once 
'Services/MetaData/classes/class.ilMDFactory.php';
 
 3133        $md_element->delete();
 
 3142        include_once 
'Services/MetaData/classes/class.ilMDFactory.php';
 
 3145        $md_element->delete();
 
 3155        switch (
$_GET[
'section']) {
 
 3156            case 'meta_technical':
 
 3157                $this->md_section = &$this->md_obj->addTechnical();
 
 3158                $this->md_section->save();
 
 3162            case 'meta_lifecycle':
 
 3163                $this->md_section = &$this->md_obj->addLifecycle();
 
 3164                $this->md_section->save();
 
 3165                $con = &$this->md_section->addContribute();
 
 3168                $ent = &$con->addEntity();
 
 3172            case 'meta_meta_metadata':
 
 3173                $this->md_section = $this->md_obj->addMetaMetadata();
 
 3174                $this->md_section->save();
 
 3176                $ide = &$this->md_section->addIdentifier();
 
 3179                $con = &$this->md_section->addContribute();
 
 3182                $ent = &$con->addEntity();
 
 3187                $this->md_section = $this->md_obj->addRights();
 
 3188                $this->md_section->save();
 
 3191            case 'meta_educational':
 
 3192                $this->md_section = $this->md_obj->addEducational();
 
 3193                $this->md_section->save();
 
 3196            case 'meta_relation':
 
 3197                $this->md_section = $this->md_obj->addRelation();
 
 3198                $this->md_section->save();
 
 3199                $ident = $this->md_section->addIdentifier_();
 
 3201                $des = $this->md_section->addDescription();
 
 3205            case 'meta_annotation':
 
 3206                $this->md_section = $this->md_obj->addAnnotation();
 
 3207                $this->md_section->save();
 
 3210            case 'meta_classification':
 
 3211                $this->md_section = $this->md_obj->addClassification();
 
 3212                $this->md_section->save();
 
 3214                $taxon_path = &$this->md_section->addTaxonPath();
 
 3215                $taxon_path->save();
 
 3217                $taxon = &$taxon_path->addTaxon();
 
 3220                $key = &$this->md_section->addKeyword();
 
 3232        $section_element = (empty(
$_POST[
'section_element']))
 
 3233            ? 
$_GET[
'section_element']
 
 3234            : 
$_POST[
'section_element'];
 
 3238        switch (
$_GET[
'section']) {
 
 3239            case 'meta_technical':
 
 3240                $this->md_section = &$this->md_obj->getTechnical();
 
 3243            case 'meta_lifecycle':
 
 3244                $this->md_section = &$this->md_obj->getLifecycle();
 
 3247            case 'meta_meta_metadata':
 
 3248                $this->md_section = &$this->md_obj->getMetaMetadata();
 
 3251            case 'meta_general':
 
 3252                $this->md_section = $this->md_obj->getGeneral();
 
 3255            case 'meta_educational':
 
 3256                $this->md_section = $this->md_obj->getEducational();
 
 3259            case 'meta_classification':
 
 3260                $arr = explode(
"_", $section_element);
 
 3261                $section_element = $arr[0];
 
 3262                $this->md_section = $this->md_obj->getClassification($arr[1]);
 
 3267        switch ($section_element) {
 
 3268            case 'meta_or_composite':
 
 3269                $md_new = &$this->md_section->addOrComposite();
 
 3270                $md_new = $md_new->addRequirement();
 
 3273            case 'meta_requirement':
 
 3274                $md_new = &$this->md_section->addRequirement();
 
 3277            case 'meta_location':
 
 3278                $md_new = &$this->md_section->addLocation();
 
 3282                $md_new = $this->md_section->addFormat();
 
 3286                $md_new = $this->md_section->getContribute((
int) 
$_GET[
'meta_index']);
 
 3287                $md_new = $md_new->addEntity();
 
 3290            case 'meta_identifier':
 
 3291                $md_new = $this->md_section->addIdentifier();
 
 3294            case 'meta_contribute':
 
 3295                $md_new = &$this->md_section->addContribute();
 
 3297                $md_new = $md_new->addEntity();
 
 3300            case 'educational_language':
 
 3301            case 'meta_language':
 
 3302                $md_new = $this->md_section->addLanguage();
 
 3305            case 'educational_description':
 
 3306            case 'meta_description':
 
 3307                $md_new = $this->md_section->addDescription();
 
 3311            case 'meta_keyword':
 
 3312                $md_new = $this->md_section->addKeyword();
 
 3315            case 'educational_typical_age_range':
 
 3316                $md_new = $this->md_section->addTypicalAgeRange();
 
 3319            case 'relation_resource_identifier':
 
 3320                $rel = $this->md_obj->getRelation(
$_GET[
'meta_index']);
 
 3321                $md_new = $rel->addIdentifier_();
 
 3324            case 'relation_resource_description':
 
 3325                $rel = $this->md_obj->getRelation(
$_GET[
'meta_index']);
 
 3326                $md_new = $rel->addDescription();
 
 3330                $md_new = $this->md_section->addTaxonPath();
 
 3332                $md_new = $md_new->addTaxon();
 
 3336                $tax_path = $this->md_section->getTaxonPath(
$_GET[
'meta_index']);
 
 3337                $md_new = $tax_path->addTaxon();
 
 3350        switch ($_REQUEST[
'section']) {
 
 3351            case 'meta_general':
 
 3354            case 'meta_lifecycle':
 
 3357            case 'meta_technical':
 
 3360            case 'meta_meta_metadata':
 
 3361                return $this->listMetaMetadata();
 
 3364                return $this->
debug();
 
 3369            case 'meta_educational':
 
 3372            case 'meta_relation':
 
 3375            case 'meta_annotation':
 
 3378            case 'meta_classification':
 
 3382                if ($this->md_obj->obj_type == 
'sahs' || $this->md_obj->obj_type == 
'sco') {
 
 3394        if (count($subs = $this->md_section->getPossibleSubelements())) {
 
 3397            $this->tpl->setCurrentBlock(
"subelements");
 
 3398            $this->tpl->setVariable(
"SEL_SUBELEMENTS", 
ilUtil::formSelect(
'', 
'section_element', $subs));
 
 3399            $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 3400            $this->tpl->parseCurrentBlock();
 
 3402            $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
'meta_add'));
 
 3413        $ilToolbar = 
$DIC[
'ilToolbar'];
 
 3415        $tabs = array(
'meta_quickedit' => 
'listQuickEdit',
 
 3416                      'meta_general' => 
'listGeneral',
 
 3417                      'meta_lifecycle' => 
'listLifecycle',
 
 3418                      'meta_meta_metadata' => 
'listMetaMetadata',
 
 3419                      'meta_technical' => 
'listTechnical',
 
 3420                      'meta_educational' => 
'listEducational',
 
 3421                      'meta_rights' => 
'listRights',
 
 3422                      'meta_relation' => 
'listRelation',
 
 3423                      'meta_annotation' => 
'listAnnotation',
 
 3424                      'meta_classification' => 
'listClassification');
 
 3427            $tabs[
'debug'] = 
'debug';
 
 3430        include_once 
'Services/Form/classes/class.ilSelectInputGUI.php';
 
 3440        $ilToolbar->addStickyItem(
$section, 
true);
 
 3442        include_once 
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
 
 3444        $button->setCaption(
"show");
 
 3445        $button->setCommand(
"listSection");
 
 3446        $ilToolbar->addStickyItem($button);
 
 3448        $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 
"listSection"));
 
 3459        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 3462            "tpl.lang_selection.html",
 
 3469            $tpl->setCurrentBlock(
"lg_option");
 
 3473            if ($a_value != 
"" &&
 
 3474                $a_value == 
$code) {
 
 3475                $tpl->setVariable(
"SELECTED", 
"selected");
 
 3478            $tpl->parseCurrentBlock();
 
 3480        $tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 3481        $tpl->setVariable(
"SEL_NAME", $a_name);
 
 3483        $return = 
$tpl->get();
 
 3491        for (
$i = 0;
$i <= 24;
$i++) {
 
 3500        for (
$i = 0;
$i <= 31;
$i++) {
 
 3511        $this->observers[$a_element][
'class'] = &$a_class;
 
 3512        $this->observers[$a_element][
'method'] = &$a_method;
 
 3518        if (isset($this->observers[$a_element])) {
 
 3519            $class = &$this->observers[$a_element][
'class'];
 
 3520            $method = $this->observers[$a_element][
'method'];
 
 3522            return $class->$method($a_element);
 
 3535        if (!$md_settings->isCopyrightSelectionActive()) {
 
 3539        $link = $this->ctrl->getLinkTarget($this, 
'updateQuickEdit');
 
 3540        return $this->ui_factory
 
 3543                $this->lng->txt(
"meta_copyright_change_warning_title"),
 
 3544                $this->lng->txt(
"meta_copyright_change_info"),
 
foreach($paths as $path) $request
An exception for terminatinating execution or to throw for unit testing.
static encode($mixed, $suppress_native=false)
static getLogger($a_component_id)
Get component logger.
static _extractEntryId($a_cp_string)
extract entry id
static getDefault()
Get default.
static _getEntries()
get entries
getChangeCopyrightModal()
Get cnange copyright modal.
listQuickEditCopyright(ilPropertyFormGUI $form)
Show copyright selecetion.
updateQuickEdit_scorm_prop_designer()
__buildMonthsSelect($sel_month)
updateQuickEdit_scorm()
update quick edit properties - SCORM customization
__construct($a_rbac_id, $a_obj_id, $a_obj_type)
addObserver(&$a_class, $a_method, $a_element)
updateQuickEdit_scorm_prop_expert()
updateQuickEdit_scorm_propagate($request, $type)
__buildDaysSelect($sel_day)
keywordAutocomplete()
Keyword list for autocomplete.
updateQuickEdit_scorm_prop_poc()
updateGeneral()
update general section
initQuickEditForm($a_signal_id)
Init quick edit form.
updateQuickEdit()
update quick edit properties
callListeners($a_element)
__showLanguageSelect($a_name, $a_value="")
shows language select box
static _getInstance($a_type, $a_index, $a_technical_id=0)
static _getMatchingKeywords($a_query, $a_type, $a_rbac_id=0)
Search for keywords.
static updateKeywords(ilMDGeneral $a_md_section, array $a_keywords)
Update keywords from input array.
static _lookupDescription($a_rbac_id, $a_obj_id)
Lookup description (copyright)
static _getInstance()
get instance
static _getLocationTypeSelect($a_selected, $a_name, $prepend=array())
Prepare a meta location type.
static _getOperatingSystemSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta technical os selector.
static _getStatusSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta lifecycle status selector.
static _getBrowserSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta technical browser selector.
static _getRoleSelect($a_selected, $a_name, $prepend=array(), $a_options_only=false)
Prepare a meta lifecycle status selector.
static _LOMDurationToArray($a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
OER harvester object status.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
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.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
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.
if(!empty($this->data['faventry'])) $tabs
if(!array_key_exists('StateId', $_REQUEST)) $id
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
if(isset($_POST['submit'])) $form
foreach($_POST as $key=> $value) $res