Exemplo n.º 1
0
 protected function saveTaxonomyAssignments()
 {
     if (count($this->getTaxonomyIds())) {
         require_once 'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
         foreach ($this->getTaxonomyIds() as $taxonomyId) {
             $postvar = "tax_node_assign_{$taxonomyId}";
             $tax_node_assign = new ilTaxAssignInputGUI($taxonomyId, true, '', $postvar);
             // TODO: determine tst/qpl when tax assigns become maintainable within tests
             $tax_node_assign->saveInput("qpl", $this->object->getObjId(), "quest", $this->object->getId());
         }
     }
 }
 /**
  * update term
  */
 function updateTerm()
 {
     // update term
     $this->term->setTerm(ilUtil::stripSlashes($_POST["term"]));
     $this->term->setLanguage($_POST["term_language"]);
     $this->term->update();
     // update taxonomy assignment
     if ($this->glossary->getTaxonomyId() > 0) {
         include_once "./Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php";
         $tax_node_assign = new ilTaxAssignInputGUI($this->glossary->getTaxonomyId());
         $tax_node_assign->saveInput("glo", "term", $this->term->getId());
     }
     ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
     $this->ctrl->redirect($this, "editTerm");
 }