14include_once 
'Services/MetaData/classes/class.ilMD.php';
 
   15include_once 
'Services/MetaData/classes/class.ilMDUtilSelect.php';
 
   17define(
'IL_TLT_MAX_HOURS', 99);
 
   33    public function __construct($a_rbac_id, $a_obj_id, $a_obj_type)
 
   37        $this->md_obj = 
new ilMD($a_rbac_id, $a_obj_id, $a_obj_type);
 
   41        $this->lng->loadLanguageModule(
'meta');
 
   43        include_once(
'Services/MetaData/classes/class.ilMDSettings.php');
 
   48        $this->tabs_gui = $ilTabs;
 
   55        $next_class = $this->ctrl->getNextClass($this);
 
   57        $cmd = $this->ctrl->getCmd();
 
   58        switch ($next_class) {
 
   59            case 'ilformpropertydispatchgui':
 
   61                include_once 
'./Services/Form/classes/class.ilFormPropertyDispatchGUI.php';
 
   64                $item = $this->getFilterItemByPostVar(
$_GET[
"postvar"]);
 
   65                $form_prop_dispatch->setItem($item);
 
   66                return $this->ctrl->forwardCommand($form_prop_dispatch);
 
   81        include_once 
'Services/MetaData/classes/class.ilMD2XML.php';
 
   84        $xml_writer = 
new ilMD2XML($this->md_obj->getRBACId(), $this->md_obj->getObjId(), $this->md_obj->getObjType());
 
   85        $xml_writer->startExport();
 
   87        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
   91        $this->tpl->setVariable(
"MD_CONTENT", htmlentities($xml_writer->getXML()));
 
  102        if (!is_object($this->md_section = $this->md_obj->getGeneral())) {
 
  103            $this->md_section = $this->md_obj->addGeneral();
 
  104            $this->md_section->save();
 
  107        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
  111        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_quick_edit_scorm.html', 
'Services/MetaData');
 
  113        $this->ctrl->setReturn($this, 
'listGeneral');
 
  114        $this->ctrl->setParameter($this, 
'section', 
'meta_general');
 
  115        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
  117        $this->tpl->setVariable(
"TXT_QUICK_EDIT", $this->lng->txt(
"meta_quickedit"));
 
  118        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  119        $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
  120        $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
  121        $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
  125        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
  126            $md_lan = $this->md_section->getLanguage(
$id);
 
  129                $this->tpl->setCurrentBlock(
"language_head");
 
  130                $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
 
  131                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  132                $this->tpl->parseCurrentBlock();
 
  136            if (count($ids) > 1) {
 
  137                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
  138                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_language');
 
  140                $this->tpl->setCurrentBlock(
"language_delete");
 
  141                $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
  142                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
  143                $this->tpl->parseCurrentBlock();
 
  145            $this->tpl->setCurrentBlock(
"language_loop");
 
  147                'gen_language[' . $id . 
'][language]',
 
  148                $md_lan->getLanguageCode()
 
  150            $this->tpl->parseCurrentBlock();
 
  154            $this->tpl->setCurrentBlock(
"language_head");
 
  155            $this->tpl->setVariable(
"ROWSPAN_LANG", 1);
 
  156            $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  157            $this->tpl->parseCurrentBlock();
 
  158            $this->tpl->setCurrentBlock(
"language_loop");
 
  160                'gen_language[][language]',
 
  163            $this->tpl->parseCurrentBlock();
 
  167        $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
'title'));
 
  170            'gen_title_language',
 
  171            $this->md_section->getTitleLanguageCode()
 
  175        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
  176            $md_des = $this->md_section->getDescription(
$id);
 
  178            if (count($ids) > 1) {
 
  179                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
  180                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_description');
 
  182                $this->tpl->setCurrentBlock(
"description_delete");
 
  183                $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
  184                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
  185                $this->tpl->parseCurrentBlock();
 
  188            $this->tpl->setCurrentBlock(
"description_loop");
 
  189            $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", 
$id);
 
  190            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
  191            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
  193            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
  195                "gen_description[" . $id . 
'][language]',
 
  196                $md_des->getDescriptionLanguageCode()
 
  198            $this->tpl->parseCurrentBlock();
 
  204        foreach ($ids = $this->md_section->getKeywordIds() as 
$id) {
 
  205            $md_key = $this->md_section->getKeyword(
$id);
 
  206            $keywords[$md_key->getKeywordLanguageCode()][]
 
  207                = $md_key->getKeyword();
 
  210        foreach ($keywords as 
$lang => $keyword_set) {
 
  212                $this->tpl->setCurrentBlock(
"keyword_head");
 
  213                $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($keywords));
 
  214                $this->tpl->setVariable(
"TXT_COMMA_SEP2", $this->lng->txt(
'comma_separated'));
 
  215                $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"keywords"));
 
  216                $this->tpl->parseCurrentBlock();
 
  220            $this->tpl->setCurrentBlock(
"keyword_loop");
 
  222                implode($keyword_set, 
", ")
 
  224            $this->tpl->setVariable(
"LANG", 
$lang);
 
  226                "keyword[language][$lang]",
 
  229            $this->tpl->parseCurrentBlock();
 
  232        if (count($keywords) == 0) {
 
  233            $this->tpl->setCurrentBlock(
"keyword_head");
 
  234            $this->tpl->setVariable(
"ROWSPAN_KEYWORD", 1);
 
  235            $this->tpl->setVariable(
"TXT_COMMA_SEP2", $this->lng->txt(
'comma_separated'));
 
  236            $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"keywords"));
 
  237            $this->tpl->parseCurrentBlock();
 
  238            $this->tpl->setCurrentBlock(
"keyword_loop");
 
  240                "keyword[language][$lang]",
 
  247        $this->tpl->setVariable(
"TXT_EXPERTS", 
$lng->txt(
'meta_subjectmatterexpert'));
 
  248        $this->tpl->setVariable(
"TXT_COMMA_SEP", $this->lng->txt(
'comma_separated'));
 
  249        $this->tpl->setVariable(
"TXT_SCOPROP_EXPERT", $this->lng->txt(
'sco_propagate'));
 
  250        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  251            $sep = $ent_str = 
"";
 
  252            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  253                $md_con = $this->md_section->getContribute($con_id);
 
  254                if ($md_con->getRole() == 
"SubjectMatterExpert") {
 
  255                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  256                        $md_ent = $md_con->getEntity($ent_id);
 
  257                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  265        $this->tpl->setVariable(
"TXT_DESIGNERS", 
$lng->txt(
'meta_instructionaldesigner'));
 
  266        $this->tpl->setVariable(
"TXT_SCOPROP_DESIGNERS", $this->lng->txt(
'sco_propagate'));
 
  267        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  268            $sep = $ent_str = 
"";
 
  269            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  270                $md_con = $this->md_section->getContribute($con_id);
 
  271                if ($md_con->getRole() == 
"InstructionalDesigner") {
 
  272                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  273                        $md_ent = $md_con->getEntity($ent_id);
 
  274                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  282        $this->tpl->setVariable(
"TXT_POC", 
$lng->txt(
'meta_pointofcontact'));
 
  283        $this->tpl->setVariable(
"TXT_SCOPROP_POC", $this->lng->txt(
'sco_propagate'));
 
  284        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  285            $sep = $ent_str = 
"";
 
  286            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  287                $md_con = $this->md_section->getContribute($con_id);
 
  288                if ($md_con->getRole() == 
"PointOfContact") {
 
  289                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  290                        $md_ent = $md_con->getEntity($ent_id);
 
  291                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  299        $this->tpl->setVariable(
"TXT_STATUS", $this->lng->txt(
'meta_status'));
 
  300        if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  301            $this->md_section = $this->md_obj->addLifecycle();
 
  302            $this->md_section->save();
 
  304        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  306            $this->md_section->getStatus(),
 
  308            array(0 => $this->lng->txt(
'meta_please_select'))
 
  315        include_once(
'Services/MetaData/classes/class.ilMDCopyrightSelectionGUI.php');
 
  319            $this->md_obj->getRBACId(),
 
  320            $this->md_obj->getObjId()
 
  322        $copyright_gui->fillTemplate();
 
  337        #if(is_object($this->md_section = $this->md_obj->getEducational())) 
  339        #       $this->tpl->setVariable("VAL_TYPICAL_LEARN_TIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime()));
 
  342        $tlt = array(0,0,0,0,0);
 
  344        if (is_object($this->md_section = $this->md_obj->getEducational())) {
 
  345            include_once 
'Services/MetaData/classes/class.ilMDUtils.php';
 
  348                if (strlen($this->md_section->getTypicalLearningTime())) {
 
  349                    $tlt = array(0,0,0,0,0);
 
  354        $this->tpl->setVariable(
"TXT_MONTH", $this->lng->txt(
'md_months'));
 
  358        $this->tpl->setVariable(
"TXT_DAYS", $this->lng->txt(
'md_days'));
 
  359        $this->tpl->setVariable(
"TXT_TIME", $this->lng->txt(
'md_time'));
 
  361        $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME", $this->lng->txt(
'meta_typical_learning_time'));
 
  364            $tlt[4] ? 
false : 
true,
 
  370        $this->tpl->setVariable(
"TLT_HINT", $tlt[4] ? 
'(hh:mm:ss)' : 
'(hh:mm)');
 
  373            $this->tpl->setCurrentBlock(
"tlt_not_valid");
 
  374            $this->tpl->setVariable(
"TXT_CURRENT_VAL", $this->lng->txt(
'meta_current_value'));
 
  375            $this->tpl->setVariable(
"TLT", $this->md_section->getTypicalLearningTime());
 
  376            $this->tpl->setVariable(
"INFO_TLT_NOT_VALID", $this->lng->txt(
'meta_info_tlt_not_valid'));
 
  377            $this->tpl->parseCurrentBlock();
 
  381        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
  388        if (!is_object($this->md_section = $this->md_obj->getGeneral())) {
 
  389            $this->md_section = $this->md_obj->addGeneral();
 
  390            $this->md_section->save();
 
  395        $tpl->setContent(
$form->getHTML());
 
  405        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  410        $ti->setMaxLength(200);
 
  412        if ($this->md_obj->getObjType() != 
'sess') {
 
  413            $ti->setRequired(
true);
 
  415        $ti->setValue($this->md_section->getTitle());
 
  416        $this->form->addItem($ti);
 
  419        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
  420            $md_des = $this->md_section->getDescription(
$id);
 
  422            $ta = 
new ilTextAreaInputGUI($this->lng->txt(
"meta_description"), 
"gen_description[" . 
$id . 
"][description]");
 
  425            $ta->setValue($md_des->getDescription());
 
  426            if (count($ids) > 1) {
 
  427                $ta->setInfo($this->lng->txt(
"meta_l_" . $md_des->getDescriptionLanguageCode()));
 
  430            $this->form->addItem($ta);
 
  436        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
  437            $md_lan = $this->md_section->getLanguage(
$id);
 
  438            $first_lang = $md_lan->getLanguageCode();
 
  441            $si->setValue($md_lan->getLanguageCode());
 
  442            $this->form->addItem(
$si);
 
  448            $this->form->addItem(
$si);
 
  454        foreach ($ids = $this->md_section->getKeywordIds() as 
$id) {
 
  455            $md_key = $this->md_section->getKeyword(
$id);
 
  456            if (trim($md_key->getKeyword()) != 
"") {
 
  457                $keywords[$md_key->getKeywordLanguageCode()][]
 
  458                    = $md_key->getKeyword();
 
  461        foreach ($keywords as 
$lang => $keyword_set) {
 
  463                $this->lng->txt(
"keywords"),
 
  464                "keywords[value][" . 
$lang . 
"]" 
  466            $kw->setDataSource($this->ctrl->getLinkTarget($this, 
"keywordAutocomplete", 
"", 
true));
 
  467            $kw->setMaxLength(200);
 
  470            if (count($keywords) > 1) {
 
  471                $kw->setInfo($this->lng->txt(
"meta_l_" . 
$lang));
 
  473            $this->form->addItem($kw);
 
  475            $kw->setValue($keyword_set);
 
  477        if (count($keywords) == 0) {
 
  479                $this->lng->txt(
"keywords"),
 
  480                "keywords[value][" . $first_lang . 
"]" 
  482            $kw->setDataSource($this->ctrl->getLinkTarget($this, 
"keywordAutocomplete", 
"", 
true));
 
  483            $kw->setMaxLength(200);
 
  486            $this->form->addItem($kw);
 
  492            $this->lng->txt(
'authors') . 
"<br />" .
 
  493            "(" . 
sprintf($this->lng->txt(
'md_separated_by'), $this->md_settings->getDelimiter()) . 
")",
 
  498        if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  499            $sep = $ent_str = 
"";
 
  500            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  501                $md_con = $this->md_section->getContribute($con_id);
 
  502                if ($md_con->getRole() == 
"Author") {
 
  503                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  504                        $md_ent = $md_con->getEntity($ent_id);
 
  505                        $ent_str = $ent_str . $sep . $md_ent->getEntity();
 
  506                        $sep = $this->md_settings->getDelimiter() . 
" ";
 
  510            $ta->setValue($ent_str);
 
  512        $this->form->addItem($ta);
 
  515        include_once(
"./Services/MetaData/classes/class.ilCopyrightInputGUI.php");
 
  520            $this->md_obj->getRBACId(),
 
  521            $this->md_obj->getObjId()
 
  525        $this->form->addItem($cp);
 
  528        include_once(
"./Services/MetaData/classes/class.ilTypicalLearningTimeInputGUI.php");
 
  530        $edu = $this->md_obj->getEducational();
 
  531        if (is_object($edu)) {
 
  532            $tlt->setValueByLOMDuration($edu->getTypicalLearningTime());
 
  534        $this->form->addItem($tlt);
 
  546        $this->form->addCommandButton(
"updateQuickEdit", 
$lng->txt(
"save"));
 
  547        $this->form->setTitle($this->lng->txt(
"meta_quickedit"));
 
  548        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  561        include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
 
  564            $this->md_obj->getObjType(),
 
  565            $this->md_obj->getRBACId()
 
  574            $entry = 
new stdClass();
 
  580        include_once 
'./Services/JSON/classes/class.ilJsonUtil.php';
 
  591        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
  593        if (!trim(
$_POST[
'gen_title'])) {
 
  594            if ($this->md_obj->getObjType() != 
'sess') {
 
  602        $this->md_section = $this->md_obj->getGeneral();
 
  605        $this->md_section->update();
 
  608        if (is_array(
$_POST[
'gen_language'])) {
 
  611                    $md_lan = $this->md_section->getLanguage(
$id);
 
  615                    $md_lan = $this->md_section->addLanguage();
 
  622        if (is_array(
$_POST[
'gen_description'])) {
 
  624                $md_des = $this->md_section->getDescription(
$id);
 
  632        if (is_array(
$_POST[
"keywords"][
"value"])) {
 
  633            include_once(
"./Services/MetaData/classes/class.ilMDKeyword.php");
 
  640        if (
$_POST[
'copyright'][
'sel'] || 
$_POST[
'copyright'][
'ta']) {
 
  641            if (!is_object($this->md_section = $this->md_obj->getRights())) {
 
  642                $this->md_section = $this->md_obj->addRights();
 
  643                $this->md_section->save();
 
  645            if (
$_POST[
'copyright'][
'sel']) {
 
  646                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
  647                $this->md_section->setDescription(
'il_copyright_entry__' . IL_INST_ID . 
'__' . (
int) 
$_POST[
'copyright'][
'sel']);
 
  649                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
  652            $this->md_section->update();
 
  654            if (is_object($this->md_section = $this->md_obj->getRights())) {
 
  655                $this->md_section->setCopyrightAndOtherRestrictions(
"No");
 
  656                $this->md_section->setDescription(
"");
 
  657                $this->md_section->update();
 
  666            if (!is_object($this->md_section = $this->md_obj->getEducational())) {
 
  667                $this->md_section = $this->md_obj->addEducational();
 
  668                $this->md_section->save();
 
  670            $this->md_section->setPhysicalTypicalLearningTime(
 
  671                (
int) 
$_POST[
'tlt'][
'mo'],
 
  677            $this->md_section->update();
 
  679            if (is_object($this->md_section = $this->md_obj->getEducational())) {
 
  680                $this->md_section->setPhysicalTypicalLearningTime(0, 0, 0, 0, 0);
 
  681                $this->md_section->update();
 
  687        if ($_POST[
"life_authors"] != 
"") {
 
  688            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  689                $this->md_section = $this->md_obj->addLifecycle();
 
  690                $this->md_section->save();
 
  694            $auth_arr = explode($this->md_settings->getDelimiter(), 
$_POST[
"life_authors"]);
 
  695            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
  696                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
  702            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  703                $md_con = $this->md_section->getContribute($con_id);
 
  704                if ($md_con->getRole() == 
"Author") {
 
  705                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  706                        $md_ent = $md_con->getEntity($ent_id);
 
  709                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
  710                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
  715                    $md_con_author = $md_con;
 
  720            if (count($auth_arr) > 0) {
 
  721                if (!is_object($md_con_author)) {
 
  722                    $md_con_author = $this->md_section->addContribute();
 
  723                    $md_con_author->setRole(
"Author");
 
  724                    $md_con_author->save();
 
  726                foreach ($auth_arr as 
$auth) {
 
  727                    $md_ent = $md_con_author->addEntity();
 
  733            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  734                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  735                    $md_con = $this->md_section->getContribute($con_id);
 
  736                    if ($md_con->getRole() == 
"Author") {
 
  757        $this->ctrl->redirect($this, 
'listSection');
 
  762        $module_id = $this->md_obj->obj_id;
 
  763        if ($this->md_obj->obj_type==
'sco') {
 
  764            $module_id = $this->md_obj->rbac_id;
 
  766        $tree = 
new ilTree($module_id);
 
  767        $tree->setTableNames(
'sahs_sc13_tree', 
'sahs_sc13_tree_node');
 
  768        $tree->setTreeTablePK(
"slm_id");
 
  769        foreach ($tree->getSubTree($tree->getNodeData($tree->getRootId()), 
true, 
'sco') as $sco) {
 
  770            $sco_md = 
new ilMD($module_id, $sco[
'obj_id'], 
'sco');
 
  771            if (
$_POST[$request] != 
"") {
 
  773                if (!is_object($sco_md_section = $sco_md->getLifecycle())) {
 
  774                    $sco_md_section = $sco_md->addLifecycle();
 
  775                    $sco_md_section->save();
 
  778                $auth_arr = explode(
",", 
$_POST[$request]);
 
  779                for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
  780                    $auth_arr[
$i] = trim($auth_arr[
$i]);
 
  786                foreach (($ids = $sco_md_section->getContributeIds()) as $con_id) {
 
  787                    $md_con = $sco_md_section->getContribute($con_id);
 
  788                    if ($md_con->getRole() == 
$type) {
 
  789                        foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  790                            $md_ent = $md_con->getEntity($ent_id);
 
  793                            if (in_array($md_ent->getEntity(), $auth_arr)) {
 
  794                                unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
  799                        $md_con_author = $md_con;
 
  804                if (count($auth_arr) > 0) {
 
  805                    if (!is_object($md_con_author)) {
 
  806                        $md_con_author = $sco_md_section->addContribute();
 
  807                        $md_con_author->setRole(
$type);
 
  808                        $md_con_author->save();
 
  810                    foreach ($auth_arr as 
$auth) {
 
  811                        $md_ent = $md_con_author->addEntity();
 
  817                if (is_object($sco_md_section = $sco_md->getLifecycle())) {
 
  818                    foreach (($ids = $sco_md_section->getContributeIds()) as $con_id) {
 
  819                        $md_con = $sco_md_section->getContribute($con_id);
 
  820                        if ($md_con->getRole() == 
$type) {
 
  848        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
  851        $this->md_section = $this->md_obj->getGeneral();
 
  854        $this->md_section->update();
 
  857        if (is_array(
$_POST[
'gen_language'])) {
 
  860                    $md_lan = $this->md_section->getLanguage(
$id);
 
  864                    $md_lan = $this->md_section->addLanguage();
 
  871        if (is_array(
$_POST[
'gen_description'])) {
 
  873                $md_des = $this->md_section->getDescription(
$id);
 
  882        if (is_array(
$_POST[
"keywords"][
"value"])) {
 
  883            $new_keywords = array();
 
  884            foreach (
$_POST[
"keywords"][
"value"] as 
$lang => $keywords) {
 
  886                $keywords = explode(
",", $keywords);
 
  887                foreach ($keywords as $keyword) {
 
  888                    $new_keywords[$language][] = trim($keyword);
 
  893            foreach ($ids = $this->md_section->getKeywordIds() as 
$id) {
 
  894                $md_key = $this->md_section->getKeyword(
$id);
 
  896                $lang = $md_key->getKeywordLanguageCode();
 
  899                if (is_array($new_keywords[
$lang]) &&
 
  900                    in_array($md_key->getKeyword(), $new_keywords[
$lang])) {
 
  901                    unset($new_keywords[
$lang]
 
  902                        [array_search($md_key->getKeyword(), $new_keywords[
$lang])]);
 
  909            foreach ($new_keywords as 
$lang => $key_arr) {
 
  910                foreach ($key_arr as $keyword) {
 
  911                    if ($keyword != 
"") {
 
  912                        $md_key = $this->md_section->addKeyword();
 
  923        if (
$_POST[
'copyright_id'] or 
$_POST[
'rights_copyright']) {
 
  924            if (!is_object($this->md_section = $this->md_obj->getRights())) {
 
  925                $this->md_section = $this->md_obj->addRights();
 
  926                $this->md_section->save();
 
  928            if (
$_POST[
'copyright_id']) {
 
  929                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
  930                $this->md_section->setDescription(
'il_copyright_entry__' . IL_INST_ID . 
'__' . (
int) 
$_POST[
'copyright_id']);
 
  932                $this->md_section->setCopyrightAndOtherRestrictions(
"Yes");
 
  935            $this->md_section->update();
 
  937            if (is_object($this->md_section = $this->md_obj->getRights())) {
 
  938                $this->md_section->setCopyrightAndOtherRestrictions(
"No");
 
  939                $this->md_section->setDescription(
"");
 
  940                $this->md_section->update();
 
  947        if ($_POST[
'tlt'][
'mo'] or 
$_POST[
'tlt'][
'd'] or
 
  949            if (!is_object($this->md_section = $this->md_obj->getEducational())) {
 
  950                $this->md_section = $this->md_obj->addEducational();
 
  951                $this->md_section->save();
 
  953            $this->md_section->setPhysicalTypicalLearningTime(
 
  954                (
int) 
$_POST[
'tlt'][
'mo'],
 
  960            $this->md_section->update();
 
  962            if (is_object($this->md_section = $this->md_obj->getEducational())) {
 
  963                $this->md_section->setPhysicalTypicalLearningTime(0, 0, 0, 0, 0);
 
  964                $this->md_section->update();
 
  970        if ($_POST[
"life_experts"] != 
"") {
 
  971            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
  972                $this->md_section = $this->md_obj->addLifecycle();
 
  973                $this->md_section->save();
 
  977            $auth_arr = explode(
",", 
$_POST[
"life_experts"]);
 
  978            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
  979                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
  985            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
  986                $md_con = $this->md_section->getContribute($con_id);
 
  987                if ($md_con->getRole() == 
"SubjectMatterExpert") {
 
  988                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
  989                        $md_ent = $md_con->getEntity($ent_id);
 
  992                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
  993                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
  998                    $md_con_author = $md_con;
 
 1003            if (count($auth_arr) > 0) {
 
 1004                if (!is_object($md_con_author)) {
 
 1005                    $md_con_author = $this->md_section->addContribute();
 
 1006                    $md_con_author->setRole(
"SubjectMatterExpert");
 
 1007                    $md_con_author->save();
 
 1009                foreach ($auth_arr as 
$auth) {
 
 1010                    $md_ent = $md_con_author->addEntity();
 
 1016            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1017                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1018                    $md_con = $this->md_section->getContribute($con_id);
 
 1019                    if ($md_con->getRole() == 
"SubjectMatterExpert") {
 
 1027        if (
$_POST[
"life_designers"] != 
"") {
 
 1028            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1029                $this->md_section = $this->md_obj->addLifecycle();
 
 1030                $this->md_section->save();
 
 1034            $auth_arr = explode(
",", 
$_POST[
"life_designers"]);
 
 1035            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
 1036                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
 1039            $md_con_author = 
"";
 
 1042            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1043                $md_con = $this->md_section->getContribute($con_id);
 
 1044                if ($md_con->getRole() == 
"InstructionalDesigner") {
 
 1045                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1046                        $md_ent = $md_con->getEntity($ent_id);
 
 1049                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
 1050                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
 1055                    $md_con_author = $md_con;
 
 1060            if (count($auth_arr) > 0) {
 
 1061                if (!is_object($md_con_author)) {
 
 1062                    $md_con_author = $this->md_section->addContribute();
 
 1063                    $md_con_author->setRole(
"InstructionalDesigner");
 
 1064                    $md_con_author->save();
 
 1066                foreach ($auth_arr as 
$auth) {
 
 1067                    $md_ent = $md_con_author->addEntity();
 
 1073            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1074                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1075                    $md_con = $this->md_section->getContribute($con_id);
 
 1076                    if ($md_con->getRole() == 
"InstructionalDesigner") {
 
 1084        if (
$_POST[
"life_poc"] != 
"") {
 
 1085            if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1086                $this->md_section = $this->md_obj->addLifecycle();
 
 1087                $this->md_section->save();
 
 1091            $auth_arr = explode(
",", 
$_POST[
"life_poc"]);
 
 1092            for (
$i = 0; 
$i < count($auth_arr); 
$i++) {
 
 1093                $auth_arr[
$i] = trim($auth_arr[
$i]);
 
 1096            $md_con_author = 
"";
 
 1099            foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1100                $md_con = $this->md_section->getContribute($con_id);
 
 1101                if ($md_con->getRole() == 
"PointOfContact") {
 
 1102                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1103                        $md_ent = $md_con->getEntity($ent_id);
 
 1106                        if (in_array($md_ent->getEntity(), $auth_arr)) {
 
 1107                            unset($auth_arr[array_search($md_ent->getEntity(), $auth_arr)]);
 
 1112                    $md_con_author = $md_con;
 
 1117            if (count($auth_arr) > 0) {
 
 1118                if (!is_object($md_con_author)) {
 
 1119                    $md_con_author = $this->md_section->addContribute();
 
 1120                    $md_con_author->setRole(
"PointOfContact");
 
 1121                    $md_con_author->save();
 
 1123                foreach ($auth_arr as 
$auth) {
 
 1124                    $md_ent = $md_con_author->addEntity();
 
 1130            if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1131                foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1132                    $md_con = $this->md_section->getContribute($con_id);
 
 1133                    if ($md_con->getRole() == 
"PointOfContact") {
 
 1140        $this->md_section = $this->md_obj->getLifecycle();
 
 1143        $this->md_section->setStatus(
$_POST[
'lif_status']);
 
 1144        $this->md_section->update();
 
 1152        $this->ctrl->redirect($this, 
'listSection');
 
 1160        if (!is_object($this->md_section = $this->md_obj->getGeneral())) {
 
 1161            $this->md_section = $this->md_obj->addGeneral();
 
 1162            $this->md_section->save();
 
 1165        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1169        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_general.html', 
'Services/MetaData');
 
 1171        $this->ctrl->setReturn($this, 
'listGeneral');
 
 1172        $this->ctrl->setParameter($this, 
'section', 
'meta_general');
 
 1173        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1177        $this->tpl->setVariable(
"TXT_GENERAL", $this->lng->txt(
"meta_general"));
 
 1178        $this->tpl->setVariable(
"TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 1179        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1180        $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 1181        $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 1182        $this->tpl->setVariable(
"TXT_STRUCTURE", $this->lng->txt(
"meta_structure"));
 
 1183        $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 1184        $this->tpl->setVariable(
"TXT_ATOMIC", $this->lng->txt(
"meta_atomic"));
 
 1185        $this->tpl->setVariable(
"TXT_COLLECTION", $this->lng->txt(
"meta_collection"));
 
 1186        $this->tpl->setVariable(
"TXT_NETWORKED", $this->lng->txt(
"meta_networked"));
 
 1187        $this->tpl->setVariable(
"TXT_HIERARCHICAL", $this->lng->txt(
"meta_hierarchical"));
 
 1188        $this->tpl->setVariable(
"TXT_LINEAR", $this->lng->txt(
"meta_linear"));
 
 1191        $this->tpl->setVariable(
"STRUCTURE_VAL_" . strtoupper($this->md_section->getStructure()), 
" selected=selected");
 
 1195        foreach ($ids = $this->md_section->getIdentifierIds() as 
$id) {
 
 1196            $md_ide = $this->md_section->getIdentifier(
$id);
 
 1200                $this->tpl->setCurrentBlock(
"id_head");
 
 1201                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 1202                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
 
 1203                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
 
 1204                $this->tpl->setVariable(
"ROWSPAN_ID", count($ids));
 
 1205                $this->tpl->parseCurrentBlock();
 
 1209            if (count($ids) > 1) {
 
 1210                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1211                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_identifier');
 
 1213                if ($md_ide->getCatalog() != 
"ILIAS") {
 
 1214                    $this->tpl->setCurrentBlock(
"identifier_delete");
 
 1215                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1216                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1217                    $this->tpl->parseCurrentBlock();
 
 1221            $this->tpl->setCurrentBlock(
"identifier_loop");
 
 1222            if ($md_ide->getCatalog() == 
"ILIAS") {
 
 1223                $this->tpl->setVariable(
"DISABLE_IDENT", 
' disabled="disabled" ');
 
 1225            $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", 
$id);
 
 1226            $this->tpl->setVariable(
 
 1227                "IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
 
 1230            $this->tpl->setVariable(
 
 1231                "IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
 
 1234            $this->tpl->parseCurrentBlock();
 
 1240        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
 1241            $md_lan = $this->md_section->getLanguage(
$id);
 
 1244                $this->tpl->setCurrentBlock(
"language_head");
 
 1245                $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
 
 1246                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1247                $this->tpl->parseCurrentBlock();
 
 1251            if (count($ids) > 1) {
 
 1252                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1253                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_language');
 
 1255                $this->tpl->setCurrentBlock(
"language_delete");
 
 1256                $this->tpl->setVariable(
"LANGUAGE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1257                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 1258                $this->tpl->parseCurrentBlock();
 
 1260            $this->tpl->setCurrentBlock(
"language_loop");
 
 1262                'gen_language[' . $id . 
'][language]',
 
 1263                $md_lan->getLanguageCode()
 
 1265            $this->tpl->parseCurrentBlock();
 
 1269        $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
'title'));
 
 1272            'gen_title_language',
 
 1273            $this->md_section->getTitleLanguageCode()
 
 1278        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
 1279            $md_des = $this->md_section->getDescription(
$id);
 
 1281            if (count($ids) > 1) {
 
 1282                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1283                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_description');
 
 1285                $this->tpl->setCurrentBlock(
"description_delete");
 
 1286                $this->tpl->setVariable(
"DESCRIPTION_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1287                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 1288                $this->tpl->parseCurrentBlock();
 
 1291            $this->tpl->setCurrentBlock(
"description_loop");
 
 1292            $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", 
$id);
 
 1293            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 1294            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 1296            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1298                "gen_description[" . $id . 
'][language]',
 
 1299                $md_des->getDescriptionLanguageCode()
 
 1301            $this->tpl->parseCurrentBlock();
 
 1306        foreach ($ids = $this->md_section->getKeywordIds() as 
$id) {
 
 1307            $md_key = $this->md_section->getKeyword(
$id);
 
 1310                $this->tpl->setCurrentBlock(
"keyword_head");
 
 1311                $this->tpl->setVariable(
"ROWSPAN_KEYWORD", count($ids));
 
 1312                $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 1313                $this->tpl->parseCurrentBlock();
 
 1318            if (count($ids) > 1) {
 
 1319                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1320                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_keyword');
 
 1322                $this->tpl->setCurrentBlock(
"keyword_delete");
 
 1323                $this->tpl->setVariable(
"KEYWORD_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1324                $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 1325                $this->tpl->parseCurrentBlock();
 
 1328            $this->tpl->setCurrentBlock(
"keyword_loop");
 
 1329            $this->tpl->setVariable(
"KEYWORD_LOOP_NO", 
$id);
 
 1330            $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 1332            $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 1334                "gen_keyword[" . $id . 
'][language]',
 
 1335                $md_key->getKeywordLanguageCode()
 
 1338            $this->tpl->parseCurrentBlock();
 
 1342        $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_COVERAGE", $this->lng->txt(
'meta_coverage'));
 
 1344        $this->tpl->setVariable(
"COVERAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1346            'gen_coverage_language',
 
 1347            $this->md_section->getCoverageLanguageCode()
 
 1350        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 1358        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 1360        if (!strlen(trim(
$_POST[
'gen_title']))) {
 
 1361            if ($this->md_obj->getObjType() != 
'sess') {
 
 1369        $this->md_section = $this->md_obj->getGeneral();
 
 1370        $this->md_section->setStructure(
$_POST[
'gen_structure']);
 
 1375        $this->md_section->update();
 
 1378        if (is_array(
$_POST[
'gen_identifier'])) {
 
 1380                $md_ide = $this->md_section->getIdentifier(
$id);
 
 1388        if (is_array(
$_POST[
'gen_language'])) {
 
 1390                $md_lan = $this->md_section->getLanguage(
$id);
 
 1396        if (is_array(
$_POST[
'gen_description'])) {
 
 1398                $md_des = $this->md_section->getDescription(
$id);
 
 1405        if (is_array(
$_POST[
'gen_keyword'])) {
 
 1407                $md_key = $this->md_section->getKeyword(
$id);
 
 1418        $this->ctrl->setParameter($this, 
"section", 
"meta_general");
 
 1420        $this->ctrl->redirect($this, 
'listSection');
 
 1425        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 1428        $this->md_section = $this->md_obj->getTechnical();
 
 1435        $this->md_section->update();
 
 1438        if (is_array(
$_POST[
'met_format'])) {
 
 1440                $md_for = $this->md_section->getFormat(
$id);
 
 1446        if (is_array(
$_POST[
'met_location'])) {
 
 1448                $md_loc = $this->md_section->getLocation(
$id);
 
 1454        if (is_array(
$_POST[
'met_re'])) {
 
 1456                $md_re = $this->md_section->getRequirement(
$id);
 
 1477        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1479        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_technical.html', 
'Services/MetaData');
 
 1482        $this->ctrl->setParameter($this, 
"section", 
"meta_technical");
 
 1483        if (!is_object($this->md_section = $this->md_obj->getTechnical())) {
 
 1484            $this->tpl->setCurrentBlock(
"no_technical");
 
 1485            $this->tpl->setVariable(
"TXT_NO_TECHNICAL", $this->lng->txt(
"meta_no_technical"));
 
 1486            $this->tpl->setVariable(
"TXT_ADD_TECHNICAL", $this->lng->txt(
"meta_add"));
 
 1487            $this->tpl->setVariable(
"ACTION_ADD_TECHNICAL", $this->ctrl->getLinkTarget($this, 
"addSection"));
 
 1488            $this->tpl->parseCurrentBlock();
 
 1492        $this->ctrl->setReturn($this, 
'listTechnical');
 
 1493        $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 1495        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1496        $this->tpl->setVariable(
"TXT_TECHNICAL", $this->lng->txt(
'meta_technical'));
 
 1499        $this->tpl->setVariable(
 
 1501            $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 1503        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
'delete'));
 
 1509        foreach ($ids = $this->md_section->getFormatIds() as 
$id) {
 
 1510            $md_for =&$this->md_section->getFormat(
$id);
 
 1512            $this->tpl->setCurrentBlock(
"format_loop");
 
 1514            $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1515            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_format');
 
 1516            $this->tpl->setVariable(
"FORMAT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1517            $this->tpl->setVariable(
"FORMAT_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1519            $this->tpl->setVariable(
"FORMAT_LOOP_NO", 
$id);
 
 1520            $this->tpl->setVariable(
"FORMAT_LOOP_TXT_FORMAT", $this->lng->txt(
'meta_format'));
 
 1523            $this->tpl->parseCurrentBlock();
 
 1526        $this->tpl->setVariable(
"SIZE_TXT_SIZE", $this->lng->txt(
'meta_size'));
 
 1530        foreach ($ids = $this->md_section->getLocationIds() as 
$id) {
 
 1531            $md_loc =&$this->md_section->getLocation(
$id);
 
 1533            $this->tpl->setCurrentBlock(
"location_loop");
 
 1535            $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1536            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_location');
 
 1537            $this->tpl->setVariable(
"LOCATION_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1538            $this->tpl->setVariable(
"LOCATION_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1540            $this->tpl->setVariable(
"LOCATION_LOOP_TXT_LOCATION", $this->lng->txt(
'meta_location'));
 
 1541            $this->tpl->setVariable(
"LOCATION_LOOP_NO", 
$id);
 
 1542            $this->tpl->setVariable(
"LOCATION_LOOP_TXT_TYPE", $this->lng->txt(
'meta_type'));
 
 1545            $this->tpl->setVariable(
 
 1546                "SEL_LOCATION_TYPE",
 
 1548                                        $md_loc->getLocationType(),
 
 1549                                        "met_location[" . 
$id . 
"][Type]",
 
 1550                                        array(0 => $this->lng->txt(
'meta_please_select'))
 
 1553            $this->tpl->parseCurrentBlock();
 
 1556        foreach ($ids = $this->md_section->getRequirementIds() as 
$id) {
 
 1557            $md_re =&$this->md_section->getRequirement(
$id);
 
 1559            $this->tpl->setCurrentBlock(
"requirement_loop");
 
 1561            $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1562            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_requirement');
 
 1563            $this->tpl->setVariable(
"REQUIREMENT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1564            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1566            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_REQUIREMENT", $this->lng->txt(
'meta_requirement'));
 
 1567            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_TYPE", $this->lng->txt(
'meta_type'));
 
 1568            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_OPERATINGSYSTEM", $this->lng->txt(
'meta_operating_system'));
 
 1569            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_BROWSER", $this->lng->txt(
'meta_browser'));
 
 1570            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_NAME", $this->lng->txt(
'meta_name'));
 
 1571            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MINIMUMVERSION", $this->lng->txt(
'meta_minimum_version'));
 
 1572            $this->tpl->setVariable(
"REQUIREMENT_LOOP_TXT_MAXIMUMVERSION", $this->lng->txt(
'meta_maximum_version'));
 
 1574            $this->tpl->setVariable(
"REQUIREMENT_LOOP_NO", 
$id);
 
 1575            $this->tpl->setVariable(
 
 1576                "REQUIREMENT_SEL_OS_NAME",
 
 1578                                        $md_re->getOperatingSystemName(),
 
 1579                                        "met_re[" . 
$id . 
"][os][name]",
 
 1580                                        array(0 => $this->lng->txt(
'meta_please_select'))
 
 1583            $this->tpl->setVariable(
 
 1584                "REQUIREMENT_SEL_BROWSER_NAME",
 
 1586                                        $md_re->getBrowserName(),
 
 1587                                        "met_re[" . 
$id . 
"][browser][name]",
 
 1588                                        array(0 => $this->lng->txt(
'meta_please_select'))
 
 1592            $this->tpl->setVariable(
 
 1593                "REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
 
 1597            $this->tpl->setVariable(
 
 1598                "REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
 
 1602            $this->tpl->setVariable(
 
 1603                "REQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
 
 1607            $this->tpl->setVariable(
 
 1608                "REQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
 
 1611            $this->tpl->parseCurrentBlock();
 
 1614        foreach ($ids = $this->md_section->getOrCompositeIds() as $or_id) {
 
 1615            $md_or =&$this->md_section->getOrComposite($or_id);
 
 1616            foreach ($ids = $md_or->getRequirementIds() as 
$id) {
 
 1617                $md_re =&$this->md_section->getRequirement(
$id);
 
 1619                $this->tpl->setCurrentBlock(
"orrequirement_loop");
 
 1621                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1622                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_requirement');
 
 1623                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1624                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1626                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_REQUIREMENT", $this->lng->txt(
'meta_requirement'));
 
 1627                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_TYPE", $this->lng->txt(
'meta_type'));
 
 1628                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_OPERATINGSYSTEM", $this->lng->txt(
'meta_operating_system'));
 
 1629                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_BROWSER", $this->lng->txt(
'meta_browser'));
 
 1630                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_NAME", $this->lng->txt(
'meta_name'));
 
 1631                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MINIMUMVERSION", $this->lng->txt(
'meta_minimum_version'));
 
 1632                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_TXT_MAXIMUMVERSION", $this->lng->txt(
'meta_maximum_version'));
 
 1634                $this->tpl->setVariable(
"ORREQUIREMENT_LOOP_NO", 
$id);
 
 1635                $this->tpl->setVariable(
 
 1636                    "ORREQUIREMENT_SEL_OS_NAME",
 
 1638                                            $md_re->getOperatingSystemName(),
 
 1639                                            "met_re[" . 
$id . 
"][os][name]",
 
 1640                                            array(0 => $this->lng->txt(
'meta_please_select'))
 
 1643                $this->tpl->setVariable(
 
 1644                    "ORREQUIREMENT_SEL_BROWSER_NAME",
 
 1646                                            $md_re->getBrowserName(),
 
 1647                                            "met_re[" . 
$id . 
"][browser][name]",
 
 1648                                            array(0 => $this->lng->txt(
'meta_please_select'))
 
 1652                $this->tpl->setVariable(
 
 1653                    "ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION",
 
 1657                $this->tpl->setVariable(
 
 1658                    "ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION",
 
 1662                $this->tpl->setVariable(
 
 1663                    "ORREQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION",
 
 1667                $this->tpl->setVariable(
 
 1668                    "ORREQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION",
 
 1671                $this->tpl->parseCurrentBlock();
 
 1673            $this->tpl->setCurrentBlock(
"orcomposite_loop");
 
 1675            $this->ctrl->setParameter($this, 
'meta_index', $or_id);
 
 1676            $this->ctrl->setParameter($this, 
'meta_path', 
'meta_or_composite');
 
 1677            $this->ctrl->setParameter($this, 
'meta_technical', $this->md_section->getMetaId());
 
 1678            $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1679            $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1681            $this->tpl->setVariable(
"ORCOMPOSITE_LOOP_TXT_ORCOMPOSITE", $this->lng->txt(
'meta_or_composite'));
 
 1682            $this->tpl->parseCurrentBlock();
 
 1686        $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_INSTALLATIONREMARKS", $this->lng->txt(
'meta_installation_remarks'));
 
 1687        $this->tpl->setVariable(
"INSTALLATIONREMARKS_TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1689        $this->tpl->setVariable(
"INSTALLATIONREMARKS_VAL", 
ilUtil::prepareFormOutput($this->md_section->getInstallationRemarks()));
 
 1690        $this->tpl->setVariable(
 
 1691            "INSTALLATIONREMARKS_VAL_LANGUAGE",
 
 1694                                    $this->md_section->getInstallationRemarksLanguageCode()
 
 1699        $this->tpl->setVariable(
 
 1700            "OTHERPLATTFORMREQUIREMENTS_TXT_OTHERPLATTFORMREQUIREMENTS",
 
 1701            $this->lng->txt(
'meta_other_plattform_requirements')
 
 1703        $this->tpl->setVariable(
"OTHERPLATTFORMREQUIREMENTS_TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1705        $this->tpl->setVariable(
 
 1706            "OTHERPLATTFORMREQUIREMENTS_VAL",
 
 1709        $this->tpl->setVariable(
 
 1710            "OTHERPLATTFORMREQUIREMENTS_VAL_LANGUAGE",
 
 1713                                    $this->md_section->getOtherPlatformRequirementsLanguageCode()
 
 1718        $this->tpl->setVariable(
"DURATION_TXT_DURATION", $this->lng->txt(
'meta_duration'));
 
 1721        $this->tpl->setCurrentBlock(
"technical");
 
 1722        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 1723        $this->tpl->parseCurrentBlock();
 
 1730        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1732        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_lifecycle.html', 
'Services/MetaData');
 
 1735        $this->ctrl->setParameter($this, 
"section", 
"meta_lifecycle");
 
 1736        if (!is_object($this->md_section = $this->md_obj->getLifecycle())) {
 
 1737            $this->tpl->setCurrentBlock(
"no_lifecycle");
 
 1738            $this->tpl->setVariable(
"TXT_NO_LIFECYCLE", $this->lng->txt(
"meta_no_lifecycle"));
 
 1739            $this->tpl->setVariable(
"TXT_ADD_LIFECYCLE", $this->lng->txt(
"meta_add"));
 
 1740            $this->tpl->setVariable(
"ACTION_ADD_LIFECYCLE", $this->ctrl->getLinkTarget($this, 
"addSection"));
 
 1741            $this->tpl->parseCurrentBlock();
 
 1745        $this->ctrl->setReturn($this, 
'listLifecycle');
 
 1746        $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 1748        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1749        $this->tpl->setVariable(
"TXT_LIFECYCLE", $this->lng->txt(
'meta_lifecycle'));
 
 1752        $this->tpl->setVariable(
 
 1754            $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 1756        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
'delete'));
 
 1762        $this->tpl->setVariable(
"TXT_STATUS", $this->lng->txt(
'meta_status'));
 
 1764            $this->md_section->getStatus(),
 
 1766            array(0 => $this->lng->txt(
'meta_please_select'))
 
 1769        $this->tpl->setVariable(
"TXT_VERSION", $this->lng->txt(
'meta_version'));
 
 1772        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1775            $this->md_section->getVersionLanguageCode()
 
 1779        foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1780            $md_con = $this->md_section->getContribute($con_id);
 
 1782            if (count($ids) > 1) {
 
 1783                $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 1784                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_contribute');
 
 1786                $this->tpl->setCurrentBlock(
"contribute_delete");
 
 1787                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1788                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1789                $this->tpl->parseCurrentBlock();
 
 1792            foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1793                $md_ent = $md_con->getEntity($ent_id);
 
 1795                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_entity');
 
 1797                if (count($ent_ids) > 1) {
 
 1798                    $this->tpl->setCurrentBlock(
"contribute_entity_delete");
 
 1800                    $this->ctrl->setParameter($this, 
'meta_index', $ent_id);
 
 1801                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1802                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1803                    $this->tpl->parseCurrentBlock();
 
 1806                $this->tpl->setCurrentBlock(
"contribute_entity_loop");
 
 1808                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO", $con_id);
 
 1809                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO", $ent_id);
 
 1811                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY", $this->lng->txt(
'meta_entity'));
 
 1812                $this->tpl->parseCurrentBlock();
 
 1814            $this->tpl->setCurrentBlock(
"contribute_loop");
 
 1816            $this->ctrl->setParameter($this, 
'section_element', 
'meta_entity');
 
 1817            $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 1818            $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD", $this->ctrl->getLinkTarget($this, 
'addSectionElement'));
 
 1819            $this->tpl->setVariable(
 
 1820                "CONTRIBUTE_ENTITY_LOOP_TXT_ADD",
 
 1821                $this->lng->txt(
'add') . 
" " . $this->lng->txt(
'meta_entity')
 
 1824            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN", 2 + count($ent_ids));
 
 1825            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE", $this->lng->txt(
'meta_contribute'));
 
 1826            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE", $this->lng->txt(
'meta_role'));
 
 1829                "met_contribute[" . $con_id . 
"][Role]",
 
 1830                array(0 => $this->lng->txt(
'meta_please_select'))
 
 1832            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE", $this->lng->txt(
'meta_date'));
 
 1833            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO", $con_id);
 
 1836            $this->tpl->parseCurrentBlock();
 
 1838        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 1843        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 1846        $this->md_section = $this->md_obj->getLifecycle();
 
 1849        $this->md_section->setStatus(
$_POST[
'lif_status']);
 
 1850        $this->md_section->update();
 
 1853        if (is_array(
$_POST[
'met_identifier'])) {
 
 1855                $md_ide = $this->md_section->getIdentifier(
$id);
 
 1862        if (is_array(
$_POST[
'met_contribute'])) {
 
 1864                $md_con =&$this->md_section->getContribute(
$id);
 
 1869                if (is_array(
$_POST[
'met_entity'][
$id])) {
 
 1871                        $md_ent =&$md_con->getEntity($ent_id);
 
 1890        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 1892        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_meta_metadata.html', 
'Services/MetaData');
 
 1895        $this->ctrl->setParameter($this, 
"section", 
"meta_meta_metadata");
 
 1896        if (!is_object($this->md_section = $this->md_obj->getMetaMetadata())) {
 
 1897            $this->tpl->setCurrentBlock(
"no_meta_meta");
 
 1898            $this->tpl->setVariable(
"TXT_NO_META_META", $this->lng->txt(
"meta_no_meta_metadata"));
 
 1899            $this->tpl->setVariable(
"TXT_ADD_META_META", $this->lng->txt(
"meta_add"));
 
 1900            $this->tpl->setVariable(
"ACTION_ADD_META_META", $this->ctrl->getLinkTarget($this, 
"addSection"));
 
 1901            $this->tpl->parseCurrentBlock();
 
 1905        $this->ctrl->setReturn($this, 
'listMetaMetaData');
 
 1906        $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 1908        $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 1909        $this->tpl->setVariable(
"TXT_META_METADATA", $this->lng->txt(
'meta_meta_metadata'));
 
 1912        $this->tpl->setVariable(
 
 1914            $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 1916        $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
'delete'));
 
 1921        $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
'meta_language'));
 
 1923        $this->tpl->setVariable(
"VAL_LANGUAGE", $this->
__showLanguageSelect(
'met_language', $this->md_section->getLanguageCode()));
 
 1924        $this->tpl->setVariable(
"TXT_METADATASCHEME", $this->lng->txt(
'meta_metadatascheme'));
 
 1925        $this->tpl->setVariable(
"VAL_METADATASCHEME", $this->md_section->getMetaDataScheme());
 
 1929        foreach ($ids = $this->md_section->getIdentifierIds() as 
$id) {
 
 1930            $md_ide = $this->md_section->getIdentifier(
$id);
 
 1932            if (count($ids) > 1) {
 
 1933                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 1934                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_identifier');
 
 1936                $this->tpl->setCurrentBlock(
"identifier_delete");
 
 1937                $this->tpl->setVariable(
"IDENTIFIER_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1938                $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1939                $this->tpl->parseCurrentBlock();
 
 1942            $this->tpl->setCurrentBlock(
"identifier_loop");
 
 1943            $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", 
$id);
 
 1944            $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 1945            $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
 
 1946            $this->tpl->setVariable(
 
 1947                "IDENTIFIER_LOOP_VAL_IDENTIFIER_CATALOG",
 
 1950            $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
 
 1951            $this->tpl->setVariable(
 
 1952                "IDENTIFIER_LOOP_VAL_IDENTIFIER_ENTRY",
 
 1955            $this->tpl->parseCurrentBlock();
 
 1959        foreach (($ids = $this->md_section->getContributeIds()) as $con_id) {
 
 1960            $md_con = $this->md_section->getContribute($con_id);
 
 1962            if (count($ids) > 1) {
 
 1963                $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 1964                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_contribute');
 
 1966                $this->tpl->setCurrentBlock(
"contribute_delete");
 
 1967                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1968                $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1969                $this->tpl->parseCurrentBlock();
 
 1972            foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 1973                $md_ent = $md_con->getEntity($ent_id);
 
 1975                $this->ctrl->setParameter($this, 
'meta_path', 
'meta_entity');
 
 1977                if (count($ent_ids) > 1) {
 
 1978                    $this->tpl->setCurrentBlock(
"contribute_entity_delete");
 
 1980                    $this->ctrl->setParameter($this, 
'meta_index', $ent_id);
 
 1981                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 
'deleteElement'));
 
 1982                    $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_DELETE", $this->lng->txt(
'delete'));
 
 1983                    $this->tpl->parseCurrentBlock();
 
 1986                $this->tpl->setCurrentBlock(
"contribute_entity_loop");
 
 1988                $this->ctrl->setParameter($this, 
'section_element', 
'meta_entity');
 
 1989                $this->ctrl->setParameter($this, 
'meta_index', $con_id);
 
 1990                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_ACTION_ADD", $this->ctrl->getLinkTarget($this, 
'addSectionElement'));
 
 1991                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ADD", $this->lng->txt(
'add'));
 
 1994                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_CONTRIBUTE_NO", $con_id);
 
 1995                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_NO", $ent_id);
 
 1997                $this->tpl->setVariable(
"CONTRIBUTE_ENTITY_LOOP_TXT_ENTITY", $this->lng->txt(
'meta_entity'));
 
 1998                $this->tpl->parseCurrentBlock();
 
 2000            $this->tpl->setCurrentBlock(
"contribute_loop");
 
 2001            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_ROWSPAN", 2 + count($ent_ids));
 
 2002            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_CONTRIBUTE", $this->lng->txt(
'meta_contribute'));
 
 2003            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_ROLE", $this->lng->txt(
'meta_role'));
 
 2006                "met_contribute[" . $con_id . 
"][Role]",
 
 2007                array(0 => $this->lng->txt(
'meta_please_select'))
 
 2009            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_TXT_DATE", $this->lng->txt(
'meta_date'));
 
 2010            $this->tpl->setVariable(
"CONTRIBUTE_LOOP_NO", $con_id);
 
 2013            $this->tpl->parseCurrentBlock();
 
 2015        $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
'save'));
 
 2021        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2024        $this->md_section = $this->md_obj->getMetaMetadata();
 
 2026        $this->md_section->update();
 
 2029        if (is_array(
$_POST[
'met_identifier'])) {
 
 2031                $md_ide = $this->md_section->getIdentifier(
$id);
 
 2038        if (is_array(
$_POST[
'met_contribute'])) {
 
 2040                $md_con =&$this->md_section->getContribute(
$id);
 
 2045                if (is_array(
$_POST[
'met_entity'][
$id])) {
 
 2047                        $md_ent =&$md_con->getEntity($ent_id);
 
 2066        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2068        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_rights.html', 
'Services/MetaData');
 
 2070        if (!is_object($this->md_section = $this->md_obj->getRights())) {
 
 2071            $this->tpl->setCurrentBlock(
"no_rights");
 
 2072            $this->tpl->setVariable(
"TXT_NO_RIGHTS", $this->lng->txt(
"meta_no_rights"));
 
 2073            $this->tpl->setVariable(
"TXT_ADD_RIGHTS", $this->lng->txt(
"meta_add"));
 
 2074            $this->ctrl->setParameter($this, 
"section", 
"meta_rights");
 
 2075            $this->tpl->setVariable(
 
 2076                "ACTION_ADD_RIGHTS",
 
 2077                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2079            $this->tpl->parseCurrentBlock();
 
 2081            $this->ctrl->setReturn($this, 
'listRights');
 
 2082            $this->ctrl->setParameter($this, 
'section', 
'meta_rights');
 
 2083            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2085            $this->tpl->setVariable(
"TXT_RIGHTS", $this->lng->txt(
"meta_rights"));
 
 2086            $this->tpl->setVariable(
"TXT_COST", $this->lng->txt(
"meta_cost"));
 
 2087            $this->tpl->setVariable(
"TXT_COPYRIGHTANDOTHERRESTRICTIONS", $this->lng->txt(
"meta_copyright_and_other_restrictions"));
 
 2088            $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 2089            $this->tpl->setVariable(
"TXT_YES", $this->lng->txt(
"meta_yes"));
 
 2090            $this->tpl->setVariable(
"TXT_NO", $this->lng->txt(
"meta_no"));
 
 2092            $this->ctrl->setParameter($this, 
"section", 
"meta_rights");
 
 2093            $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 2094            $this->tpl->setVariable(
 
 2096                $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2099            $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2101            $this->tpl->setVariable(
"VAL_COST_" . strtoupper($this->md_section->getCosts()), 
" selected");
 
 2102            $this->tpl->setVariable(
"VAL_COPYRIGHTANDOTHERRESTRICTIONS_" .
 
 2103                strtoupper($this->md_section->getCopyrightAndOtherRestrictions()), 
" selected");
 
 2105            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2106            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2108            $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2109            $this->tpl->setVariable(
 
 2110                "DESCRIPTION_LOOP_VAL_LANGUAGE",
 
 2112                'rights[DescriptionLanguage]',
 
 2113                $this->md_section->getDescriptionLanguageCode()
 
 2117            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2119            $this->tpl->setCurrentBlock(
"rights");
 
 2120            $this->tpl->parseCurrentBlock();
 
 2126        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2129        $this->md_section = $this->md_obj->getRights();
 
 2130        $this->md_section->setCosts(
$_POST[
'rights'][
'Cost']);
 
 2131        $this->md_section->setCopyrightAndOtherRestrictions(
$_POST[
'rights'][
'CopyrightAndOtherRestrictions']);
 
 2132        $this->md_section->setDescriptionLanguage(
new ilMDLanguageItem(
$_POST[
'rights'][
'DescriptionLanguage']));
 
 2134        $this->md_section->update();
 
 2146        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2148        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_educational.html', 
'Services/MetaData');
 
 2150        if (!is_object($this->md_section = $this->md_obj->getEducational())) {
 
 2151            $this->tpl->setCurrentBlock(
"no_educational");
 
 2152            $this->tpl->setVariable(
"TXT_NO_EDUCATIONAL", $this->lng->txt(
"meta_no_educational"));
 
 2153            $this->tpl->setVariable(
"TXT_ADD_EDUCATIONAL", $this->lng->txt(
"meta_add"));
 
 2154            $this->ctrl->setParameter($this, 
"section", 
"meta_educational");
 
 2155            $this->tpl->setVariable(
 
 2156                "ACTION_ADD_EDUCATIONAL",
 
 2157                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2159            $this->tpl->parseCurrentBlock();
 
 2161            $this->ctrl->setReturn($this, 
'listEducational');
 
 2162            $this->ctrl->setParameter($this, 
'section', 
'meta_educational');
 
 2163            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2165            $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 2166            $this->tpl->setVariable(
 
 2168                $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2171            $this->tpl->setVariable(
"TXT_EDUCATIONAL", $this->lng->txt(
"meta_educational"));
 
 2172            $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2173            $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 2174            $this->tpl->setVariable(
"TXT_TYPICALAGERANGE", $this->lng->txt(
"meta_typical_age_range"));
 
 2175            $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2176            $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2177            $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2178            $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 2180            $this->tpl->setVariable(
"TXT_INTERACTIVITYTYPE", $this->lng->txt(
"meta_interactivity_type"));
 
 2181            $this->tpl->setVariable(
"TXT_LEARNINGRESOURCETYPE", $this->lng->txt(
"meta_learning_resource_type"));
 
 2182            $this->tpl->setVariable(
"TXT_INTERACTIVITYLEVEL", $this->lng->txt(
"meta_interactivity_level"));
 
 2183            $this->tpl->setVariable(
"TXT_SEMANTICDENSITY", $this->lng->txt(
"meta_semantic_density"));
 
 2184            $this->tpl->setVariable(
"TXT_INTENDEDENDUSERROLE", $this->lng->txt(
"meta_intended_end_user_role"));
 
 2185            $this->tpl->setVariable(
"TXT_CONTEXT", $this->lng->txt(
"meta_context"));
 
 2186            $this->tpl->setVariable(
"TXT_DIFFICULTY", $this->lng->txt(
"meta_difficulty"));
 
 2188            $this->tpl->setVariable(
"VAL_INTERACTIVITYTYPE_" . strtoupper($this->md_section->getInteractivityType()), 
" selected");
 
 2189            $this->tpl->setVariable(
"VAL_LEARNINGRESOURCETYPE_" . strtoupper($this->md_section->getLearningResourceType()), 
" selected");
 
 2190            $this->tpl->setVariable(
"VAL_INTERACTIVITYLEVEL_" . strtoupper($this->md_section->getInteractivityLevel()), 
" selected");
 
 2191            $this->tpl->setVariable(
"VAL_SEMANTICDENSITY_" . strtoupper($this->md_section->getSemanticDensity()), 
" selected");
 
 2192            $this->tpl->setVariable(
"VAL_INTENDEDENDUSERROLE_" . strtoupper($this->md_section->getIntendedEndUserRole()), 
" selected");
 
 2193            $this->tpl->setVariable(
"VAL_CONTEXT_" . strtoupper($this->md_section->getContext()), 
" selected");
 
 2194            $this->tpl->setVariable(
"VAL_DIFFICULTY_" . strtoupper($this->md_section->getDifficulty()), 
" selected");
 
 2195            #$this->tpl->setVariable("VAL_TYPICALLEARNINGTIME", ilUtil::prepareFormOutput($this->md_section->getTypicalLearningTime()));
 
 2197            $this->tpl->setVariable(
"TXT_ACTIVE", $this->lng->txt(
"meta_active"));
 
 2198            $this->tpl->setVariable(
"TXT_EXPOSITIVE", $this->lng->txt(
"meta_expositive"));
 
 2199            $this->tpl->setVariable(
"TXT_MIXED", $this->lng->txt(
"meta_mixed"));
 
 2200            $this->tpl->setVariable(
"TXT_EXERCISE", $this->lng->txt(
"meta_exercise"));
 
 2201            $this->tpl->setVariable(
"TXT_SIMULATION", $this->lng->txt(
"meta_simulation"));
 
 2202            $this->tpl->setVariable(
"TXT_QUESTIONNAIRE", $this->lng->txt(
"meta_questionnaire"));
 
 2203            $this->tpl->setVariable(
"TXT_DIAGRAMM", $this->lng->txt(
"meta_diagramm"));
 
 2204            $this->tpl->setVariable(
"TXT_FIGURE", $this->lng->txt(
"meta_figure"));
 
 2205            $this->tpl->setVariable(
"TXT_GRAPH", $this->lng->txt(
"meta_graph"));
 
 2206            $this->tpl->setVariable(
"TXT_INDEX", $this->lng->txt(
"meta_index"));
 
 2207            $this->tpl->setVariable(
"TXT_SLIDE", $this->lng->txt(
"meta_slide"));
 
 2208            $this->tpl->setVariable(
"TXT_TABLE", $this->lng->txt(
"meta_table"));
 
 2209            $this->tpl->setVariable(
"TXT_NARRATIVETEXT", $this->lng->txt(
"meta_narrative_text"));
 
 2210            $this->tpl->setVariable(
"TXT_EXAM", $this->lng->txt(
"meta_exam"));
 
 2211            $this->tpl->setVariable(
"TXT_EXPERIMENT", $this->lng->txt(
"meta_experiment"));
 
 2212            $this->tpl->setVariable(
"TXT_PROBLEMSTATEMENT", $this->lng->txt(
"meta_problem_statement"));
 
 2213            $this->tpl->setVariable(
"TXT_SELFASSESSMENT", $this->lng->txt(
"meta_self_assessment"));
 
 2214            $this->tpl->setVariable(
"TXT_LECTURE", $this->lng->txt(
"meta_lecture"));
 
 2215            $this->tpl->setVariable(
"TXT_VERYLOW", $this->lng->txt(
"meta_very_low"));
 
 2216            $this->tpl->setVariable(
"TXT_LOW", $this->lng->txt(
"meta_low"));
 
 2217            $this->tpl->setVariable(
"TXT_MEDIUM", $this->lng->txt(
"meta_medium"));
 
 2218            $this->tpl->setVariable(
"TXT_HIGH", $this->lng->txt(
"meta_high"));
 
 2219            $this->tpl->setVariable(
"TXT_VERYHIGH", $this->lng->txt(
"meta_very_high"));
 
 2220            $this->tpl->setVariable(
"TXT_TEACHER", $this->lng->txt(
"meta_teacher"));
 
 2221            $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
 
 2222            $this->tpl->setVariable(
"TXT_LEARNER", $this->lng->txt(
"meta_learner"));
 
 2223            $this->tpl->setVariable(
"TXT_MANAGER", $this->lng->txt(
"meta_manager"));
 
 2224            $this->tpl->setVariable(
"TXT_SCHOOL", $this->lng->txt(
"meta_school"));
 
 2225            $this->tpl->setVariable(
"TXT_HIGHEREDUCATION", $this->lng->txt(
"meta_higher_education"));
 
 2226            $this->tpl->setVariable(
"TXT_TRAINING", $this->lng->txt(
"meta_training"));
 
 2227            $this->tpl->setVariable(
"TXT_OTHER", $this->lng->txt(
"meta_other"));
 
 2228            $this->tpl->setVariable(
"TXT_VERYEASY", $this->lng->txt(
"meta_very_easy"));
 
 2229            $this->tpl->setVariable(
"TXT_EASY", $this->lng->txt(
"meta_easy"));
 
 2230            $this->tpl->setVariable(
"TXT_DIFFICULT", $this->lng->txt(
"meta_difficult"));
 
 2231            $this->tpl->setVariable(
"TXT_VERYDIFFICULT", $this->lng->txt(
"meta_very_difficult"));
 
 2232            $this->tpl->setVariable(
"TXT_TYPICALLEARNINGTIME", $this->lng->txt(
"meta_typical_learning_time"));
 
 2236            $tlt = array(0,0,0,0,0);
 
 2239            include_once 
'Services/MetaData/classes/class.ilMDUtils.php';
 
 2242                if (strlen($this->md_section->getTypicalLearningTime())) {
 
 2243                    $tlt = array(0,0,0,0,0);
 
 2248            $this->tpl->setVariable(
"TXT_MONTH", $this->lng->txt(
'md_months'));
 
 2252            $this->tpl->setVariable(
"TXT_DAYS", $this->lng->txt(
'md_days'));
 
 2253            $this->tpl->setVariable(
"TXT_TIME", $this->lng->txt(
'md_time'));
 
 2255            $this->tpl->setVariable(
"TXT_TYPICAL_LEARN_TIME", $this->lng->txt(
'meta_typical_learning_time'));
 
 2258                $tlt[4] ? 
false : 
true,
 
 2264            $this->tpl->setVariable(
"TLT_HINT", $tlt[4] ? 
'(hh:mm:ss)' : 
'(hh:mm)');
 
 2267                $this->tpl->setCurrentBlock(
"tlt_not_valid");
 
 2268                $this->tpl->setVariable(
"TXT_CURRENT_VAL", $this->lng->txt(
'meta_current_value'));
 
 2269                $this->tpl->setVariable(
"TLT", $this->md_section->getTypicalLearningTime());
 
 2270                $this->tpl->setVariable(
"INFO_TLT_NOT_VALID", $this->lng->txt(
'meta_info_tlt_not_valid'));
 
 2271                $this->tpl->parseCurrentBlock();
 
 2277            foreach ($ids = $this->md_section->getTypicalAgeRangeIds() as 
$id) {
 
 2278                $md_age = $this->md_section->getTypicalAgeRange(
$id);
 
 2281                if (is_object($md_age)) {
 
 2283                        $this->tpl->setCurrentBlock(
"agerange_head");
 
 2284                        $this->tpl->setVariable(
 
 2285                            "TYPICALAGERANGE_LOOP_TXT_TYPICALAGERANGE",
 
 2286                            $this->lng->txt(
"meta_typical_age_range")
 
 2288                        $this->tpl->setVariable(
"ROWSPAN_AGERANGE", count($ids));
 
 2289                        $this->tpl->parseCurrentBlock();
 
 2294                    $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 2295                    $this->ctrl->setParameter($this, 
'meta_path', 
'educational_typical_age_range');
 
 2297                    $this->tpl->setCurrentBlock(
"typicalagerange_delete");
 
 2298                    $this->tpl->setVariable(
 
 2299                        "TYPICALAGERANGE_LOOP_ACTION_DELETE",
 
 2300                        $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2302                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2303                    $this->tpl->parseCurrentBlock();
 
 2305                    $this->tpl->setCurrentBlock(
"typicalagerange_loop");
 
 2306                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2308                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_NO", 
$id);
 
 2309                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2310                    $this->tpl->setVariable(
 
 2311                        "TYPICALAGERANGE_LOOP_VAL_LANGUAGE",
 
 2313                            'educational[TypicalAgeRange][' . $id . 
'][Language]',
 
 2314                            $md_age->getTypicalAgeRangeLanguageCode()
 
 2317                    $this->ctrl->setParameter($this, 
"section_element", 
"educational_typical_age_range");
 
 2318                    $this->tpl->setVariable(
 
 2319                        "TYPICALAGERANGE_LOOP_ACTION_ADD",
 
 2320                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2322                    $this->tpl->setVariable(
"TYPICALAGERANGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2323                    $this->tpl->parseCurrentBlock();
 
 2329            foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
 2331                    $this->tpl->setCurrentBlock(
"desc_head");
 
 2332                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2333                    $this->tpl->setVariable(
"ROWSPAN_DESC", count($ids));
 
 2334                    $this->tpl->parseCurrentBlock();
 
 2338                $md_des = $this->md_section->getDescription(
$id);
 
 2340                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 2341                $this->ctrl->setParameter($this, 
'meta_path', 
'educational_description');
 
 2343                $this->tpl->setCurrentBlock(
"description_loop");
 
 2344                $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", 
$id);
 
 2345                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2347                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2348                $this->tpl->setVariable(
 
 2349                    "DESCRIPTION_LOOP_VAL_LANGUAGE",
 
 2351                        'educational[Description][' . $id . 
'][Language]',
 
 2352                        $md_des->getDescriptionLanguageCode()
 
 2355                $this->tpl->setVariable(
 
 2356                    "DESCRIPTION_LOOP_ACTION_DELETE",
 
 2357                    $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2359                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2360                $this->ctrl->setParameter($this, 
"section_element", 
"educational_description");
 
 2361                $this->tpl->setVariable(
 
 2362                    "DESCRIPTION_LOOP_ACTION_ADD",
 
 2363                    $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2365                $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2366                $this->tpl->parseCurrentBlock();
 
 2372            foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
 2374                    $this->tpl->setCurrentBlock(
"language_head");
 
 2375                    $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2376                    $this->tpl->setVariable(
"ROWSPAN_LANG", count($ids));
 
 2377                    $this->tpl->parseCurrentBlock();
 
 2381                $md_lang = $this->md_section->getLanguage(
$id);
 
 2383                $this->ctrl->setParameter($this, 
'meta_index', 
$id);
 
 2384                $this->ctrl->setParameter($this, 
'meta_path', 
'educational_language');
 
 2386                $this->tpl->setCurrentBlock(
"language_loop");
 
 2387                $this->tpl->setVariable(
 
 2388                    "LANGUAGE_LOOP_VAL_LANGUAGE",
 
 2390                        'educational[Language][' . $id . 
']',
 
 2391                        $md_lang->getLanguageCode()
 
 2395                $this->tpl->setVariable(
 
 2396                    "LANGUAGE_LOOP_ACTION_DELETE",
 
 2397                    $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2399                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2400                $this->ctrl->setParameter($this, 
"section_element", 
"educational_language");
 
 2401                $this->tpl->setVariable(
 
 2402                    "LANGUAGE_LOOP_ACTION_ADD",
 
 2403                    $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2405                $this->tpl->setVariable(
"LANGUAGE_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2406                $this->tpl->parseCurrentBlock();
 
 2409            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2411            $this->tpl->setCurrentBlock(
"educational");
 
 2412            $this->tpl->parseCurrentBlock();
 
 2418        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2421        $this->md_section = $this->md_obj->getEducational();
 
 2422        $this->md_section->setInteractivityType(
$_POST[
'educational'][
'InteractivityType']);
 
 2423        $this->md_section->setLearningResourceType(
$_POST[
'educational'][
'LearningResourceType']);
 
 2424        $this->md_section->setInteractivityLevel(
$_POST[
'educational'][
'InteractivityLevel']);
 
 2425        $this->md_section->setSemanticDensity(
$_POST[
'educational'][
'SemanticDensity']);
 
 2426        $this->md_section->setIntendedEndUserRole(
$_POST[
'educational'][
'IntendedEndUserRole']);
 
 2427        $this->md_section->setContext(
$_POST[
'educational'][
'Context']);
 
 2428        $this->md_section->setDifficulty(
$_POST[
'educational'][
'Difficulty']);
 
 2435            $this->md_section->setPhysicalTypicalLearningTime(
 
 2436                (
int) 
$_POST[
'tlt'][
'mo'],
 
 2437                (
int) 
$_POST[
'tlt'][
'd'],
 
 2438                (
int) 
$_POST[
'tlt'][
'h'],
 
 2439                (
int) 
$_POST[
'tlt'][
'm'],
 
 2443            $this->md_section->setTypicalLearningTime(
'');
 
 2449        foreach ($ids = $this->md_section->getTypicalAgeRangeIds() as 
$id) {
 
 2450            $md_age = $this->md_section->getTypicalAgeRange(
$id);
 
 2452            $md_age->setTypicalAgeRangeLanguage(
 
 2459        foreach ($ids = $this->md_section->getDescriptionIds() as 
$id) {
 
 2460            $md_des = $this->md_section->getDescription(
$id);
 
 2462            $md_des->setDescriptionLanguage(
 
 2469        foreach ($ids = $this->md_section->getLanguageIds() as 
$id) {
 
 2470            $md_lang = $this->md_section->getLanguage(
$id);
 
 2471            $md_lang->setLanguage(
 
 2477        $this->md_section->update();
 
 2489        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2491        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_relation.html', 
'Services/MetaData');
 
 2493        $rel_ids = $this->md_obj->getRelationIds();
 
 2494        if (!is_array($rel_ids) || count($rel_ids) == 0) {
 
 2495            $this->tpl->setCurrentBlock(
"no_relation");
 
 2496            $this->tpl->setVariable(
"TXT_NO_RELATION", $this->lng->txt(
"meta_no_relation"));
 
 2497            $this->tpl->setVariable(
"TXT_ADD_RELATION", $this->lng->txt(
"meta_add"));
 
 2498            $this->ctrl->setParameter($this, 
"section", 
"meta_relation");
 
 2499            $this->tpl->setVariable(
 
 2500                "ACTION_ADD_RELATION",
 
 2501                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2503            $this->tpl->parseCurrentBlock();
 
 2505            foreach ($rel_ids as $rel_id) {
 
 2506                $this->md_section = $this->md_obj->getRelation($rel_id);
 
 2508                $this->ctrl->setParameter($this, 
'meta_index', $rel_id);
 
 2509                $this->ctrl->setParameter($this, 
"section", 
"meta_relation");
 
 2512                $res_ids = $this->md_section->getIdentifier_Ids();
 
 2513                foreach ($res_ids as $res_id) {
 
 2514                    $ident = $this->md_section->getIdentifier_($res_id);
 
 2515                    $this->ctrl->setParameter($this, 
"meta_index", $res_id);
 
 2517                    if (count($res_ids) > 1) {
 
 2518                        $this->tpl->setCurrentBlock(
"identifier_delete");
 
 2519                        $this->ctrl->setParameter($this, 
"meta_path", 
"relation_resource_identifier");
 
 2520                        $this->tpl->setVariable(
 
 2521                            "IDENTIFIER_LOOP_ACTION_DELETE",
 
 2522                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2524                        $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2525                        $this->tpl->parseCurrentBlock();
 
 2528                    $this->tpl->setCurrentBlock(
"identifier_loop");
 
 2530                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_NO", $res_id);
 
 2531                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_IDENTIFIER", $this->lng->txt(
"meta_identifier"));
 
 2532                    $this->ctrl->setParameter($this, 
'meta_index', $rel_id);
 
 2533                    $this->ctrl->setParameter($this, 
"section_element", 
"relation_resource_identifier");
 
 2534                    $this->tpl->setVariable(
 
 2535                        "IDENTIFIER_LOOP_ACTION_ADD",
 
 2536                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2538                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2539                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_ENTRY", $this->lng->txt(
"meta_entry"));
 
 2540                    $this->tpl->setVariable(
"IDENTIFIER_LOOP_TXT_CATALOG", $this->lng->txt(
"meta_catalog"));
 
 2541                    $this->tpl->setVariable(
 
 2542                        "IDENTIFIER_LOOP_VAL_CATALOG",
 
 2545                    $this->tpl->setVariable(
 
 2546                        "IDENTIFIER_LOOP_VAL_ENTRY",
 
 2549                    $this->tpl->parseCurrentBlock();
 
 2553                $res_dess = $this->md_section->getDescriptionIds();
 
 2554                foreach ($res_dess as $res_des) {
 
 2555                    $des = $this->md_section->getDescription($res_des);
 
 2556                    $this->ctrl->setParameter($this, 
"meta_index", $res_des);
 
 2558                    if (count($res_dess) > 1) {
 
 2559                        $this->tpl->setCurrentBlock(
"description_delete");
 
 2560                        $this->ctrl->setParameter($this, 
"meta_path", 
"relation_resource_description");
 
 2561                        $this->tpl->setVariable(
 
 2562                            "DESCRIPTION_LOOP_ACTION_DELETE",
 
 2563                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2565                        $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2566                        $this->tpl->parseCurrentBlock();
 
 2569                    $this->tpl->setCurrentBlock(
"description_loop");
 
 2570                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_NO", $res_des);
 
 2571                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2572                    $this->ctrl->setParameter($this, 
'meta_index', $rel_id);
 
 2573                    $this->ctrl->setParameter($this, 
"section_element", 
"relation_resource_description");
 
 2574                    $this->tpl->setVariable(
 
 2575                        "DESCRIPTION_LOOP_ACTION_ADD",
 
 2576                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2578                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2579                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2580                    $this->tpl->setVariable(
"DESCRIPTION_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2581                    $this->tpl->setVariable(
 
 2582                        "DESCRIPTION_LOOP_VAL",
 
 2585                    $this->tpl->setVariable(
 
 2586                        "DESCRIPTION_LOOP_VAL_LANGUAGE",
 
 2588                            'relation[Resource][Description][' . $res_des . 
'][Language]',
 
 2589                            $des->getDescriptionLanguageCode()
 
 2592                    $this->tpl->parseCurrentBlock();
 
 2595                $this->tpl->setCurrentBlock(
"relation_loop");
 
 2596                $this->tpl->setVariable(
"REL_ID", $rel_id);
 
 2597                $this->tpl->setVariable(
"TXT_RELATION", $this->lng->txt(
"meta_relation"));
 
 2598                $this->ctrl->setParameter($this, 
"meta_index", $this->md_section->getMetaId());
 
 2599                $this->tpl->setVariable(
 
 2601                    $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2603                $this->ctrl->setParameter($this, 
"section", 
"meta_relation");
 
 2604                $this->tpl->setVariable(
 
 2606                    $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2608                $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2609                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2610                $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 2611                $this->tpl->setVariable(
"TXT_KIND", $this->lng->txt(
"meta_kind"));
 
 2612                $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 2613                $this->tpl->setVariable(
"TXT_ISPARTOF", $this->lng->txt(
"meta_is_part_of"));
 
 2614                $this->tpl->setVariable(
"TXT_HASPART", $this->lng->txt(
"meta_has_part"));
 
 2615                $this->tpl->setVariable(
"TXT_ISVERSIONOF", $this->lng->txt(
"meta_is_version_of"));
 
 2616                $this->tpl->setVariable(
"TXT_HASVERSION", $this->lng->txt(
"meta_has_version"));
 
 2617                $this->tpl->setVariable(
"TXT_ISFORMATOF", $this->lng->txt(
"meta_is_format_of"));
 
 2618                $this->tpl->setVariable(
"TXT_HASFORMAT", $this->lng->txt(
"meta_has_format"));
 
 2619                $this->tpl->setVariable(
"TXT_REFERENCES", $this->lng->txt(
"meta_references"));
 
 2620                $this->tpl->setVariable(
"TXT_ISREFERENCEDBY", $this->lng->txt(
"meta_is_referenced_by"));
 
 2621                $this->tpl->setVariable(
"TXT_ISBASEDON", $this->lng->txt(
"meta_is_based_on"));
 
 2622                $this->tpl->setVariable(
"TXT_ISBASISFOR", $this->lng->txt(
"meta_is_basis_for"));
 
 2623                $this->tpl->setVariable(
"TXT_REQUIRES", $this->lng->txt(
"meta_requires"));
 
 2624                $this->tpl->setVariable(
"TXT_ISREQUIREDBY", $this->lng->txt(
"meta_is_required_by"));
 
 2625                $this->tpl->setVariable(
"TXT_RESOURCE", $this->lng->txt(
"meta_resource"));
 
 2626                $this->tpl->setVariable(
"VAL_KIND_" . strtoupper($this->md_section->getKind()), 
" selected");
 
 2627                $this->tpl->parseCurrentBlock();
 
 2630            $this->tpl->setCurrentBlock(
"relation");
 
 2631            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2632            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2633            $this->tpl->parseCurrentBlock();
 
 2639        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2642        foreach ($ids = $this->md_obj->getRelationIds() as 
$id) {
 
 2644            $relation = $this->md_obj->getRelation(
$id);
 
 2645            $relation->setKind(
$_POST[
'relation'][
$id][
'Kind']);
 
 2647            $relation->update();
 
 2650            $res_idents = $relation->getIdentifier_Ids();
 
 2651            foreach ($res_idents as $res_id) {
 
 2652                $ident = $relation->getIdentifier_($res_id);
 
 2659            $res_dess = $relation->getDescriptionIds();
 
 2660            foreach ($res_dess as $res_des) {
 
 2661                $des = $relation->getDescription($res_des);
 
 2663                $des->setDescriptionLanguage(
 
 2680        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2682        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_annotation.html', 
'Services/MetaData');
 
 2684        $anno_ids = $this->md_obj->getAnnotationIds();
 
 2685        if (!is_array($anno_ids) || count($anno_ids) == 0) {
 
 2686            $this->tpl->setCurrentBlock(
"no_annotation");
 
 2687            $this->tpl->setVariable(
"TXT_NO_ANNOTATION", $this->lng->txt(
"meta_no_annotation"));
 
 2688            $this->tpl->setVariable(
"TXT_ADD_ANNOTATION", $this->lng->txt(
"meta_add"));
 
 2689            $this->ctrl->setParameter($this, 
"section", 
"meta_annotation");
 
 2690            $this->tpl->setVariable(
 
 2691                "ACTION_ADD_ANNOTATION",
 
 2692                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2694            $this->tpl->parseCurrentBlock();
 
 2696            foreach ($anno_ids as $anno_id) {
 
 2697                $this->ctrl->setParameter($this, 
'meta_index', $anno_id);
 
 2698                $this->ctrl->setParameter($this, 
"section", 
"meta_annotation");
 
 2700                $this->md_section = $this->md_obj->getAnnotation($anno_id);
 
 2702                $this->tpl->setCurrentBlock(
"annotation_loop");
 
 2703                $this->tpl->setVariable(
"ANNOTATION_ID", $anno_id);
 
 2704                $this->tpl->setVariable(
"TXT_ANNOTATION", $this->lng->txt(
"meta_annotation"));
 
 2705                $this->ctrl->setParameter($this, 
"meta_index", $anno_id);
 
 2706                $this->tpl->setVariable(
 
 2708                    $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2710                $this->ctrl->setParameter($this, 
"section", 
"meta_annotation");
 
 2711                $this->tpl->setVariable(
 
 2713                    $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2715                $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2716                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2718                $this->tpl->setVariable(
"TXT_ENTITY", $this->lng->txt(
"meta_entity"));
 
 2720                $this->tpl->setVariable(
"TXT_DATE", $this->lng->txt(
"meta_date"));
 
 2724                $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2725                $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2727                $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2728                $this->tpl->setVariable(
 
 2729                    "VAL_DESCRIPTION_LANGUAGE",
 
 2731                        'annotation[' . $anno_id . 
'][Language]',
 
 2732                        $this->md_section->getDescriptionLanguageCode()
 
 2736                $this->tpl->parseCurrentBlock();
 
 2739            $this->tpl->setCurrentBlock(
"annotation");
 
 2740            $this->tpl->setVariable(
"EDIT_ACTION", $this->ctrl->getFormAction($this));
 
 2741            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2742            $this->tpl->parseCurrentBlock();
 
 2748        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2751        foreach ($ids = $this->md_obj->getAnnotationIds() as 
$id) {
 
 2753            $annotation = $this->md_obj->getAnnotation(
$id);
 
 2757            $annotation->setDescriptionLanguage(
 
 2761            $annotation->update();
 
 2774        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.md_editor.html', 
'Services/MetaData');
 
 2775        $this->
__setTabs(
'meta_classification');
 
 2776        $this->tpl->addBlockFile(
'MD_CONTENT', 
'md_content', 
'tpl.md_classification.html', 
'Services/MetaData');
 
 2778        $class_ids = $this->md_obj->getClassificationIds();
 
 2779        if (!is_array($class_ids) || count($class_ids) == 0) {
 
 2780            $this->tpl->setCurrentBlock(
"no_classification");
 
 2781            $this->tpl->setVariable(
"TXT_NO_CLASSIFICATION", $this->lng->txt(
"meta_no_classification"));
 
 2782            $this->tpl->setVariable(
"TXT_ADD_CLASSIFICATION", $this->lng->txt(
"meta_add"));
 
 2783            $this->ctrl->setParameter($this, 
"section", 
"meta_classification");
 
 2784            $this->tpl->setVariable(
 
 2785                "ACTION_ADD_CLASSIFICATION",
 
 2786                $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2788            $this->tpl->parseCurrentBlock();
 
 2790            foreach ($class_ids as $class_id) {
 
 2791                $this->md_section = $this->md_obj->getClassification($class_id);
 
 2792                $this->ctrl->setParameter($this, 
"section", 
"meta_classification");
 
 2795                $tp_ids = $this->md_section->getTaxonPathIds();
 
 2796                foreach ($tp_ids as $tp_id) {
 
 2797                    $tax_path = $this->md_section->getTaxonPath($tp_id);
 
 2799                    $tax_ids = $tax_path->getTaxonIds();
 
 2801                    foreach ($tax_ids as $tax_id) {
 
 2802                        $taxon = $tax_path->getTaxon($tax_id);
 
 2804                        if (count($tax_ids) > 1) {
 
 2805                            $this->tpl->setCurrentBlock(
"taxon_delete");
 
 2806                            $this->ctrl->setParameter($this, 
"meta_index", $tax_id);
 
 2807                            $this->ctrl->setParameter($this, 
"meta_path", 
"classification_taxon");
 
 2808                            $this->tpl->setVariable(
 
 2809                                "TAXONPATH_TAXON_LOOP_ACTION_DELETE",
 
 2810                                $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2812                            $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2813                            $this->tpl->parseCurrentBlock();
 
 2816                        $this->tpl->setCurrentBlock(
"taxonpath_taxon_loop");
 
 2817                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_NO", $tax_id);
 
 2818                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TAXONPATH_NO", $tp_id);
 
 2819                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_TAXON", $this->lng->txt(
"meta_taxon"));
 
 2820                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2822                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ID", $this->lng->txt(
"meta_id"));
 
 2824                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2825                        $this->tpl->setVariable(
 
 2826                            "TAXONPATH_TAXON_LOOP_VAL_TAXON_LANGUAGE",
 
 2828                                'classification[TaxonPath][Taxon][' . $tax_id . 
'][Language]',
 
 2829                                $taxon->getTaxonLanguageCode()
 
 2833                        $this->ctrl->setParameter($this, 
"section_element", 
"Taxon_" . $class_id);
 
 2834                        $this->ctrl->setParameter($this, 
"meta_index", $tp_id);
 
 2835                        $this->tpl->setVariable(
 
 2836                            "TAXONPATH_TAXON_LOOP_ACTION_ADD",
 
 2837                            $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2839                        $this->tpl->setVariable(
"TAXONPATH_TAXON_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2840                        $this->tpl->parseCurrentBlock();
 
 2843                    if (count($tp_ids) > 1) {
 
 2844                        $this->tpl->setCurrentBlock(
"taxonpath_delete");
 
 2845                        $this->ctrl->setParameter($this, 
"meta_index", $tp_id);
 
 2846                        $this->ctrl->setParameter($this, 
"meta_path", 
"classification_taxon_path");
 
 2847                        $this->tpl->setVariable(
 
 2848                            "TAXONPATH_LOOP_ACTION_DELETE",
 
 2849                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2851                        $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2852                        $this->tpl->parseCurrentBlock();
 
 2855                    $this->tpl->setCurrentBlock(
"taxonpath_loop");
 
 2856                    $this->tpl->setVariable(
"TAXONPATH_LOOP_NO", $tp_id);
 
 2857                    $this->tpl->setVariable(
"TAXONPATH_LOOP_ROWSPAN", (3 * count($tax_ids)) + 2);
 
 2858                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
 
 2859                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_SOURCE", $this->lng->txt(
"meta_source"));
 
 2860                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2861                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2863                    $this->tpl->setVariable(
 
 2864                        "TAXONPATH_LOOP_VAL_SOURCE_LANGUAGE",
 
 2866                            'classification[TaxonPath][' . $tp_id . 
'][Source][Language]',
 
 2867                            $tax_path->getSourceLanguageCode()
 
 2870                    $this->ctrl->setParameter($this, 
"section_element", 
"TaxonPath_" . $class_id);
 
 2871                    $this->ctrl->setParameter($this, 
"meta_index", $class_id);
 
 2872                    $this->tpl->setVariable(
 
 2873                        "TAXONPATH_LOOP_ACTION_ADD",
 
 2874                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2876                    $this->tpl->setVariable(
"TAXONPATH_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2877                    $this->tpl->parseCurrentBlock();
 
 2881                $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"meta_description"));
 
 2882                $this->tpl->setVariable(
"TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2883                $this->tpl->setVariable(
 
 2887                $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2888                $this->tpl->setVariable(
 
 2889                    "VAL_DESCRIPTION_LANGUAGE",
 
 2891                        'classification[' . $class_id . 
'][Language]',
 
 2892                        $this->md_section->getDescriptionLanguageCode()
 
 2897                $key_ids = $this->md_section->getKeywordIds();
 
 2898                foreach ($key_ids as $key_id) {
 
 2899                    if (count($key_ids) > 1) {
 
 2900                        $this->ctrl->setParameter($this, 
"meta_index", $key_id);
 
 2901                        $this->ctrl->setParameter($this, 
"meta_path", 
"classification_keyword");
 
 2902                        $this->tpl->setCurrentBlock(
"keyword_delete");
 
 2903                        $this->tpl->setVariable(
 
 2904                            "KEYWORD_LOOP_ACTION_DELETE",
 
 2905                            $this->ctrl->getLinkTarget($this, 
"deleteElement")
 
 2907                        $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2908                        $this->tpl->parseCurrentBlock();
 
 2911                    $keyword = $this->md_section->getKeyword($key_id);
 
 2912                    $this->tpl->setCurrentBlock(
"keyword_loop");
 
 2913                    $this->tpl->setVariable(
"KEYWORD_LOOP_NO", $key_id);
 
 2914                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 2915                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_VALUE", $this->lng->txt(
"meta_value"));
 
 2916                    $this->tpl->setVariable(
 
 2920                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_LANGUAGE", $this->lng->txt(
"meta_language"));
 
 2921                    $this->tpl->setVariable(
 
 2922                        "KEYWORD_LOOP_VAL_LANGUAGE",
 
 2924                            'classification[Keyword][' . $key_id . 
'][Language]',
 
 2925                            $keyword->getKeywordLanguageCode()
 
 2928                    $this->ctrl->setParameter($this, 
"meta_index", $class_id);
 
 2929                    $this->ctrl->setParameter($this, 
"section_element", 
"Keyword_" . $class_id);
 
 2930                    $this->tpl->setVariable(
 
 2931                        "KEYWORD_LOOP_ACTION_ADD",
 
 2932                        $this->ctrl->getLinkTarget($this, 
"addSectionElement")
 
 2934                    $this->tpl->setVariable(
"KEYWORD_LOOP_TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2935                    $this->tpl->parseCurrentBlock();
 
 2938                $this->tpl->setCurrentBlock(
"classification_loop");
 
 2939                $this->tpl->setVariable(
"TXT_CLASSIFICATION", $this->lng->txt(
"meta_classification"));
 
 2940                $this->ctrl->setParameter($this, 
"meta_index", $class_id);
 
 2941                $this->tpl->setVariable(
 
 2943                    $this->ctrl->getLinkTarget($this, 
"deleteSection")
 
 2945                $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"meta_delete"));
 
 2946                $this->tpl->setVariable(
 
 2948                    $this->ctrl->getLinkTarget($this, 
"addSection")
 
 2950                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2952                $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 2953                $this->tpl->setVariable(
"TXT_TAXONPATH", $this->lng->txt(
"meta_taxon_path"));
 
 2954                $this->tpl->setVariable(
"TXT_KEYWORD", $this->lng->txt(
"meta_keyword"));
 
 2955                $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"meta_add"));
 
 2957                $this->tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 2958                $this->tpl->setVariable(
"CLASS_ID", $class_id);
 
 2959                $this->tpl->setVariable(
"TXT_PURPOSE", $this->lng->txt(
"meta_purpose"));
 
 2960                $this->tpl->setVariable(
"TXT_DISCIPLINE", $this->lng->txt(
"meta_learning_resource_type"));
 
 2961                $this->tpl->setVariable(
"TXT_IDEA", $this->lng->txt(
"meta_idea"));
 
 2962                $this->tpl->setVariable(
"TXT_PREREQUISITE", $this->lng->txt(
"meta_prerequisite"));
 
 2963                $this->tpl->setVariable(
"TXT_EDUCATIONALOBJECTIVE", $this->lng->txt(
"meta_educational_objective"));
 
 2964                $this->tpl->setVariable(
"TXT_ACCESSIBILITYRESTRICTIONS", $this->lng->txt(
"meta_accessibility_restrictions"));
 
 2965                $this->tpl->setVariable(
"TXT_EDUCATIONALLEVEL", $this->lng->txt(
"meta_educational_level"));
 
 2966                $this->tpl->setVariable(
"TXT_SKILLLEVEL", $this->lng->txt(
"meta_skill_level"));
 
 2967                $this->tpl->setVariable(
"TXT_SECURITYLEVEL", $this->lng->txt(
"meta_security_level"));
 
 2968                $this->tpl->setVariable(
"TXT_COMPETENCY", $this->lng->txt(
"meta_competency"));
 
 2969                $this->tpl->setVariable(
"VAL_PURPOSE_" . strtoupper($this->md_section->getPurpose()), 
" selected");
 
 2970                $this->tpl->parseCurrentBlock();
 
 2973            $this->tpl->setCurrentBlock(
"classification");
 
 2974            $this->tpl->setVariable(
 
 2976                $this->ctrl->getFormAction($this)
 
 2978            $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 2979            $this->tpl->parseCurrentBlock();
 
 2985        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 2988        foreach ($ids = $this->md_obj->getClassificationIds() as 
$id) {
 
 2990            $classification = $this->md_obj->getClassification(
$id);
 
 2991            $classification->setPurpose(
$_POST[
'classification'][
$id][
'Purpose']);
 
 2994            $classification->setDescriptionLanguage(
 
 2998            $classification->update();
 
 3000            $key_ids = $classification->getKeywordIds();
 
 3001            foreach ($key_ids as $key_id) {
 
 3002                $keyword = $classification->getKeyword($key_id);
 
 3004                $keyword->setKeywordLanguage(
 
 3010            $tp_ids = $classification->getTaxonPathIds();
 
 3011            foreach ($tp_ids as $tp_id) {
 
 3012                $tax_path = $classification->getTaxonPath($tp_id);
 
 3014                $tax_path->setSourceLanguage(
 
 3017                $tax_path->update();
 
 3019                $tax_ids = $tax_path->getTaxonIds();
 
 3021                foreach ($tax_ids as $tax_id) {
 
 3022                    $taxon = $tax_path->getTaxon($tax_id);
 
 3024                    $taxon->setTaxonLanguage(
 
 3040        include_once 
'Services/MetaData/classes/class.ilMDFactory.php';
 
 3043        $md_element->delete();
 
 3052        include_once 
'Services/MetaData/classes/class.ilMDFactory.php';
 
 3055        $md_element->delete();
 
 3065        switch (
$_GET[
'section']) {
 
 3066            case 'meta_technical':
 
 3067                $this->md_section =&$this->md_obj->addTechnical();
 
 3068                $this->md_section->save();
 
 3072            case 'meta_lifecycle':
 
 3073                $this->md_section =&$this->md_obj->addLifecycle();
 
 3074                $this->md_section->save();
 
 3075                $con =&$this->md_section->addContribute();
 
 3078                $ent =&$con->addEntity();
 
 3082            case 'meta_meta_metadata':
 
 3083                $this->md_section = $this->md_obj->addMetaMetadata();
 
 3084                $this->md_section->save();
 
 3086                $ide =&$this->md_section->addIdentifier();
 
 3089                $con =&$this->md_section->addContribute();
 
 3092                $ent =&$con->addEntity();
 
 3097                $this->md_section = $this->md_obj->addRights();
 
 3098                $this->md_section->save();
 
 3101            case 'meta_educational':
 
 3102                $this->md_section = $this->md_obj->addEducational();
 
 3103                $this->md_section->save();
 
 3106            case 'meta_relation':
 
 3107                $this->md_section = $this->md_obj->addRelation();
 
 3108                $this->md_section->save();
 
 3109                $ident = $this->md_section->addIdentifier_();
 
 3111                $des = $this->md_section->addDescription();
 
 3115            case 'meta_annotation':
 
 3116                $this->md_section = $this->md_obj->addAnnotation();
 
 3117                $this->md_section->save();
 
 3120            case 'meta_classification':
 
 3121                $this->md_section = $this->md_obj->addClassification();
 
 3122                $this->md_section->save();
 
 3124                $taxon_path =&$this->md_section->addTaxonPath();
 
 3125                $taxon_path->save();
 
 3127                $taxon =&$taxon_path->addTaxon();
 
 3130                $key =&$this->md_section->addKeyword();
 
 3142        $section_element = (empty(
$_POST[
'section_element']))
 
 3143            ? 
$_GET[
'section_element']
 
 3144            : 
$_POST[
'section_element'];
 
 3148        switch (
$_GET[
'section']) {
 
 3149            case 'meta_technical':
 
 3150                $this->md_section =&$this->md_obj->getTechnical();
 
 3153            case 'meta_lifecycle':
 
 3154                $this->md_section =&$this->md_obj->getLifecycle();
 
 3157            case 'meta_meta_metadata':
 
 3158                $this->md_section =&$this->md_obj->getMetaMetadata();
 
 3161            case 'meta_general':
 
 3162                $this->md_section = $this->md_obj->getGeneral();
 
 3165            case 'meta_educational':
 
 3166                $this->md_section = $this->md_obj->getEducational();
 
 3169            case 'meta_classification':
 
 3170                $arr = explode(
"_", $section_element);
 
 3171                $section_element = $arr[0];
 
 3172                $this->md_section = $this->md_obj->getClassification($arr[1]);
 
 3177        switch ($section_element) {
 
 3178            case 'meta_or_composite':
 
 3179                $md_new =&$this->md_section->addOrComposite();
 
 3180                $md_new = $md_new->addRequirement();
 
 3183            case 'meta_requirement':
 
 3184                $md_new =&$this->md_section->addRequirement();
 
 3187            case 'meta_location':
 
 3188                $md_new =&$this->md_section->addLocation();
 
 3192                $md_new = $this->md_section->addFormat();
 
 3196                $md_new = $this->md_section->getContribute((
int) 
$_GET[
'meta_index']);
 
 3197                $md_new = $md_new->addEntity();
 
 3200            case 'meta_identifier':
 
 3201                $md_new = $this->md_section->addIdentifier();
 
 3204            case 'meta_contribute':
 
 3205                $md_new =&$this->md_section->addContribute();
 
 3207                $md_new = $md_new->addEntity();
 
 3210            case 'educational_language':
 
 3211            case 'meta_language':
 
 3212                $md_new = $this->md_section->addLanguage();
 
 3215            case 'educational_description':
 
 3216            case 'meta_description':
 
 3217                $md_new = $this->md_section->addDescription();
 
 3221            case 'meta_keyword':
 
 3222                $md_new = $this->md_section->addKeyword();
 
 3225            case 'educational_typical_age_range':
 
 3226                $md_new = $this->md_section->addTypicalAgeRange();
 
 3229            case 'relation_resource_identifier':
 
 3230                $rel = $this->md_obj->getRelation(
$_GET[
'meta_index']);
 
 3231                $md_new = $rel->addIdentifier_();
 
 3234            case 'relation_resource_description':
 
 3235                $rel = $this->md_obj->getRelation(
$_GET[
'meta_index']);
 
 3236                $md_new = $rel->addDescription();
 
 3240                $md_new = $this->md_section->addTaxonPath();
 
 3242                $md_new = $md_new->addTaxon();
 
 3246                $tax_path = $this->md_section->getTaxonPath(
$_GET[
'meta_index']);
 
 3247                $md_new = $tax_path->addTaxon();
 
 3260        switch ($_REQUEST[
'section']) {
 
 3261            case 'meta_general':
 
 3264            case 'meta_lifecycle':
 
 3267            case 'meta_technical':
 
 3270            case 'meta_meta_metadata':
 
 3271                return $this->listMetaMetadata();
 
 3274                return $this->
debug();
 
 3279            case 'meta_educational':
 
 3282            case 'meta_relation':
 
 3285            case 'meta_annotation':
 
 3288            case 'meta_classification':
 
 3292                if ($this->md_obj->obj_type==
'sahs'||$this->md_obj->obj_type==
'sco') {
 
 3304        if (count($subs = $this->md_section->getPossibleSubelements())) {
 
 3307            $this->tpl->setCurrentBlock(
"subelements");
 
 3308            $this->tpl->setVariable(
"SEL_SUBELEMENTS", 
ilUtil::formSelect(
'', 
'section_element', $subs));
 
 3309            $this->tpl->setVariable(
"TXT_NEW_ELEMENT", $this->lng->txt(
"meta_new_element"));
 
 3310            $this->tpl->parseCurrentBlock();
 
 3312            $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
'meta_add'));
 
 3323        $tabs = array(
'meta_quickedit' => 
'listQuickEdit',
 
 3324                      'meta_general' => 
'listGeneral',
 
 3325                      'meta_lifecycle' => 
'listLifecycle',
 
 3326                      'meta_meta_metadata'      => 
'listMetaMetadata',
 
 3327                      'meta_technical' => 
'listTechnical',
 
 3328                      'meta_educational' => 
'listEducational',
 
 3329                      'meta_rights' => 
'listRights',
 
 3330                      'meta_relation' => 
'listRelation',
 
 3331                      'meta_annotation' => 
'listAnnotation',
 
 3332                      'meta_classification' => 
'listClassification');
 
 3335            $tabs[
'debug'] = 
'debug';
 
 3338        include_once 
'Services/Form/classes/class.ilSelectInputGUI.php';
 
 3348        $ilToolbar->addStickyItem(
$section, 
true);
 
 3350        include_once 
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
 
 3352        $button->setCaption(
"show");
 
 3353        $button->setCommand(
"listSection");
 
 3354        $ilToolbar->addStickyItem($button);
 
 3356        $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 
"listSection"));
 
 3367        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
 3370            "tpl.lang_selection.html",
 
 3377            $tpl->setCurrentBlock(
"lg_option");
 
 3381            if ($a_value != 
"" &&
 
 3382                $a_value == 
$code) {
 
 3383                $tpl->setVariable(
"SELECTED", 
"selected");
 
 3386            $tpl->parseCurrentBlock();
 
 3388        $tpl->setVariable(
"TXT_PLEASE_SELECT", $this->lng->txt(
"meta_please_select"));
 
 3389        $tpl->setVariable(
"SEL_NAME", $a_name);
 
 3391        $return = 
$tpl->get();
 
 3399        for (
$i = 0;
$i <= 24;
$i++) {
 
 3408        for (
$i = 0;
$i <= 31;
$i++) {
 
 3419        $this->observers[$a_element][
'class'] =&$a_class;
 
 3420        $this->observers[$a_element][
'method'] =&$a_method;
 
 3426        if (isset($this->observers[$a_element])) {
 
 3427            $class =&$this->observers[$a_element][
'class'];
 
 3428            $method = $this->observers[$a_element][
'method'];
 
 3430            return $class->$method($a_element);
 
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static encode($mixed, $suppress_native=false)
initQuickEditForm()
Init quick edit form.
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
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...
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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
if(isset($_POST['submit'])) $form
foreach($_POST as $key=> $value) $res