ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjTaxonomyGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once "./Services/Object/classes/class.ilObject2GUI.php";
5 require_once "./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
6 include_once("./Services/Taxonomy/interfaces/interface.ilTaxAssignedItemInfo.php");
7 
19 {
20  protected $multiple = false;
21  protected $assigned_item_sorting = false;
22 
26  function __construct($a_id = 0)
27  {
28  global $ilCtrl, $lng;
29 
31 
32  $ilCtrl->saveParameter($this, "tax_node");
33  $ilCtrl->saveParameter($this, "tax_id");
34 
35  $lng->loadLanguageModule("tax");
36  }
37 
43  function getType()
44  {
45  return "tax";
46  }
47 
53  function setAssignedObject($a_val)
54  {
55  $this->assigned_object_id = $a_val;
56  }
57 
63  function getAssignedObject()
64  {
65  return $this->assigned_object_id;
66  }
67 
73  function setMultiple($a_val)
74  {
75  $this->multiple = $a_val;
76  }
77 
83  function getMultiple()
84  {
85  return $this->multiple;
86  }
87 
93  function setListInfo($a_val)
94  {
95  $this->list_info = trim($a_val);
96  }
97 
103  function getListInfo()
104  {
105  return $this->list_info;
106  }
107 
113  function activateAssignedItemSorting(ilTaxAssignedItemInfo $a_item_info_obj, $a_component_id, $a_obj_id, $a_item_type)
114  {
115  $this->assigned_item_sorting = true;
116  $this->assigned_item_info_obj = $a_item_info_obj;
117  $this->assigned_item_comp_id = $a_component_id;
118  $this->assigned_item_obj_id = $a_obj_id;
119  $this->assigned_item_type = $a_item_type;
120  }
121 
122 
126  function executeCommand()
127  {
128  global $ilCtrl, $ilUser, $ilTabs;
129 
130  $next_class = $ilCtrl->getNextClass();
131 
132  switch ($next_class)
133  {
134  default:
135  $cmd = $ilCtrl->getCmd("listTaxonomies");
136  $this->$cmd();
137  break;
138  }
139  }
140 
144  protected function initCreationForms()
145  {
146  $forms = array();
147 
148  $forms = array(
149  self::CFORM_NEW => $this->initCreateForm("tax")
150  );
151 
152  return $forms;
153  }
154 
155 
159 
167  {
168  global $ilToolbar, $ilCtrl, $lng;
169 
170 
171 // if (count($tax_ids) != 0 && !$this->getMultiple())
172 // {
173 // $this->listNodes();
174 // }
175 // else if ($this->getMultiple())
176 // {
177  $this->listTaxonomies();
178 // }
179 
180  // currently we support only one taxonomy, otherwise we may need to provide
181  // a list here
182 
183  }
184 
192  {
194  $tax_id = (int) $_GET["tax_id"];
195  if (in_array($tax_id, $tax_ids))
196  {
197  return $tax_id;
198  }
199  return false;
200  }
201 
202 
210  {
211  $tax_id = $this->getCurrentTaxonomyId();
212  if ($tax_id > 0)
213  {
214  $tax = new ilObjTaxonomy($tax_id);
215  return $tax;
216  }
217 
218  return false;
219  }
220 
221 
228  function listNodes()
229  {
230  global $tpl, $ilToolbar, $lng, $ilCtrl;
231 
232  $tax = $this->getCurrentTaxonomy();
233 
234  $this->setTabs("list_items");
235 
236  // show toolbar
237  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
238  $ilToolbar->addFormButton($lng->txt("tax_create_node"), "createTaxNode");
239 
240  $ilToolbar->setCloseFormTag(false);
241 
242 
243  // show tree
244  $this->showTree();
245 
246  // show subitems
247  include_once("./Services/Taxonomy/classes/class.ilTaxonomyTableGUI.php");
248  $table = new ilTaxonomyTableGUI($this, "listNodes", $tax->getTree(),
249  (int) $_GET["tax_node"], $this->getCurrentTaxonomy());
250  $table->setOpenFormTag(false);
251 
252  $tpl->setContent($table->getHTML());
253  }
254 
255 
263  {
264  $this->create();
265  }
266 
267 
272  protected function checkPermissionBool($a_perm, $a_cmd = "", $a_type = "", $a_node_id = null)
273  {
274  if ($this->getAssignedObject() > 0)
275  {
276  return true;
277  }
278  else
279  {
280  return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_node_id);
281  }
282  }
283 
290  function cancel()
291  {
292  global $ilCtrl;
293 
294  if ($this->getAssignedObject() > 0)
295  {
296  $ilCtrl->redirect($this, "listTaxonomies");
297  }
298 
299  return parent::cancel();
300  }
301 
308  function save()
309  {
310  global $ilCtrl;
311 
312  if ($this->getAssignedObject() > 0)
313  {
314  $_REQUEST["new_type"] = "tax";
315  }
316 
318  }
319 
326  protected function afterSave(ilObject $a_new_object)
327  {
328  global $ilCtrl, $lng;
329 
330  if ($this->getAssignedObject() > 0)
331  {
332  ilObjTaxonomy::saveUsage($a_new_object->getId(),
333  $this->getAssignedObject());
334  $ilCtrl->setParameter($this, "tax_id", $a_new_object->getId());
335  ilUtil::sendSuccess($lng->txt("tax_added"), true);
336  $ilCtrl->redirect($this, "editSettings");
337  }
338  }
339 
343  function showTree($a_ass_items = false)
344  {
345  global $ilUser, $tpl, $ilCtrl, $lng;
346 
347  $tax = $this->getCurrentTaxonomy();
348 
349  include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
350  $cmd = $a_ass_items
351  ? "listAssignedItems"
352  : "listNodes";
353  $tax_exp = new ilTaxonomyExplorerGUI($this, "showTree", $tax->getId(),
354  "ilobjtaxonomygui", $cmd);
355  if (!$tax_exp->handleCommand())
356  {
357  //$tpl->setLeftNavContent($tax_exp->getHTML());
358  $tpl->setLeftContent($tax_exp->getHTML()."&nbsp;");
359  }
360  return;
361  }
362 
369  static function getTreeHTML($a_tax_id, $a_class, $a_cmd,
370  $a_target_class, $a_target_cmd, $a_root_node_title = "")
371  {
372 die("ilObjTaxonomyGUI::getTreeHTML is deprecated.");
373  include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
374  $tax_exp = new ilTaxonomyExplorerGUI($a_class, $a_cmd, $a_tax_id,
375  $a_target_class, $a_target_cmd);
376  if (!$tax_exp->handleCommand())
377  {
378  return $tax_exp->getHTML()."&nbsp;";
379  }
380  return;
381  }
382 
383 
390  function createTaxNode()
391  {
392  global $tpl, $ilHelp;
393 
394  $this->setTabs("list_items");
395  $ilHelp->setSubScreenId("create_node");
396 
397  $this->initTaxNodeForm("create");
398  $tpl->setContent($this->form->getHTML());
399  }
400 
401 
407  public function initTaxNodeForm($a_mode = "edit")
408  {
409  global $lng, $ilCtrl;
410 
411  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
412  $this->form = new ilPropertyFormGUI();
413 
414  // title
415  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
416  $this->form->addItem($ti);
417 
418  // order nr
419  $tax = $this->getCurrentTaxonomy();
420  if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL)
421  {
422  $or = new ilTextInputGUI($this->lng->txt("tax_order_nr"), "order_nr");
423  $or->setMaxLength(5);
424  $or->setSize(5);
425  $this->form->addItem($or);
426  }
427 
428  if ($a_mode == "edit")
429  {
430  $node = new ilTaxonomyNode((int) $_GET["tax_node"]);
431  $ti->setValue($node->getTitle());
432  $or->setValue($node->getOrderNr());
433  }
434 
435  // save and cancel commands
436  if ($a_mode == "create")
437  {
438  $this->form->addCommandButton("saveTaxNode", $lng->txt("save"));
439  $this->form->addCommandButton("listNodes", $lng->txt("cancel"));
440  $this->form->setTitle($lng->txt("tax_new_tax_node"));
441  }
442  else
443  {
444  $this->form->addCommandButton("updateTaxNode", $lng->txt("save"));
445  $this->form->addCommandButton("listNodes", $lng->txt("cancel"));
446  $this->form->setTitle($lng->txt("tax_edit_tax_node"));
447  }
448 
449  $this->form->setFormAction($ilCtrl->getFormAction($this));
450 
451  }
452 
457  public function saveTaxNode()
458  {
459  global $tpl, $lng, $ilCtrl;
460 
461  $this->initTaxNodeForm("create");
462  if ($this->form->checkInput())
463  {
464  $tax = $this->getCurrentTaxonomy();
465 
466  // create node
467  include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
468  $node = new ilTaxonomyNode();
469  $node->setTitle($this->form->getInput("title"));
470 
471  $tax = $this->getCurrentTaxonomy();
472  if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL)
473  {
474  $order_nr = $this->form->getInput("order_nr");
475  }
476  if ($order_nr === "")
477  {
478  $order_nr = ilTaxonomyNode::getNextOrderNr($tax->getId(), (int) $_GET["tax_node"]);
479  }
480  //echo $order_nr; exit;
481  $node->setOrderNr($order_nr);
482  $node->setTaxonomyId($tax->getId());
483  $node->create();
484 
485  // put in tree
486  ilTaxonomyNode::putInTree($tax->getId(), $node, (int) $_GET["tax_node"]);
487 
488  ilTaxonomyNode::fixOrderNumbers($tax->getId(), (int) $_GET["tax_node"]);
489 
490  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
491  $ilCtrl->redirect($this, "listNodes");
492  }
493  else
494  {
495  $this->form->setValuesByPost();
496  $tpl->setContent($this->form->getHtml());
497  }
498  }
499 
500 
504  function updateTaxNode()
505  {
506  global $lng, $ilCtrl, $tpl;
507 
508  $this->initTaxNodeForm("edit");
509  if ($this->form->checkInput())
510  {
511  // create node
512  $node = new ilTaxonomyNode($_GET["tax_node"]);
513  $node->setTitle($this->form->getInput("title"));
514 
515  $tax = $this->getCurrentTaxonomy();
516  if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL)
517  {
518  $node->setOrderNr($this->form->getInput("order_nr"));
519  }
520 
521  $node->update();
522 
523  ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
524  $ilCtrl->redirect($this, "");
525  }
526  else
527  {
528  $this->form->setValuesByPost();
529  $tpl->setContent($this->form->getHtml());
530  }
531  }
532 
536  function deleteItems()
537  {
538  global $lng, $tpl, $ilCtrl, $ilTabs, $ilHelp;
539 
540  if(!isset($_POST["id"]))
541  {
542  ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
543  $ilCtrl->redirect($this, "listNodes");
544  }
545 
546  $this->setTabs("list_items");
547  $ilHelp->setSubScreenId("del_items");
548 
549 // $ilTabs->clearTargets();
550 
551  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
552  $confirmation_gui = new ilConfirmationGUI();
553 
554  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
555  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
556 
557  // Add items to delete
558  include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
559  foreach($_POST["id"] as $id)
560  {
561  $confirmation_gui->addItem("id[]", $id,
563  }
564 
565  $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
566  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
567 
568  $tpl->setContent($confirmation_gui->getHTML());
569  }
570 
574  function confirmedDelete()
575  {
576  global $ilCtrl;
577 
578  include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
579 
580  // delete all selected objects
581  foreach ($_POST["id"] as $id)
582  {
583  $node = new ilTaxonomyNode($id);
584  $tax = new ilObjTaxonomy($node->getTaxonomyId());
585  $tax_tree = $tax->getTree();
586  $node_data = $tax_tree->getNodeData($id);
587  if (is_object($node))
588  {
589  $node->delete();
590  }
591  if($tax_tree->isInTree($id))
592  {
593  $tax_tree->deleteTree($node_data);
594  }
595  ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]);
596  }
597 
598  // feedback
599  ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
600 
601  $ilCtrl->redirect($this, "listNodes");
602  }
603 
610  function saveSorting()
611  {
612  global $ilCtrl, $lng;
613 
614  // save sorting
615  include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
616  if (is_array($_POST["order"]))
617  {
618 // asort($_POST["order"]);
619 // $cnt = 10;
620  foreach ($_POST["order"] as $k => $v)
621  {
623  ilTaxonomyNode::fixOrderNumbers($this->getCurrentTaxonomyId(), (int) $_GET["tax_node"]);
624 // $cnt+= 10;
625  }
626  }
627 
628  // save titles
629  if (is_array($_POST["title"]))
630  {
631  foreach ($_POST["title"] as $k => $v)
632  {
635  }
636  }
637 
638 
639  ilUtil::sendSuccess($lng->txt("msg_obj_modified"));
640  $ilCtrl->redirect($this, "listNodes");
641  }
642 
646  function moveItems()
647  {
648  global $tpl, $ilCtrl, $lng, $ilToolbar, $ilHelp;
649 
650  if(!isset($_POST["id"]))
651  {
652  ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
653  $ilCtrl->redirect($this, "listNodes");
654  }
655 
656  $this->setTabs("list_items");
657  $ilHelp->setSubScreenId("move_items");
658 
659  $ilToolbar->addButton($lng->txt("cancel"),
660  $ilCtrl->getLinkTarget($this, "listNodes"));
661 
662  ilUtil::sendInfo($lng->txt("tax_please_select_target"));
663 
664  if (is_array($_POST["id"]))
665  {
666  $ilCtrl->setParameter($this, "move_ids", implode($_POST["id"], ","));
667 
668  global $ilUser, $tpl, $ilCtrl, $lng;
669 
670  include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
671  $tax_exp = new ilTaxonomyExplorerGUI($this, "moveItems", $this->getCurrentTaxonomy()->getId(),
672  "ilobjtaxonomygui", "pasteItems");
673  if (!$tax_exp->handleCommand())
674  {
675  //$tpl->setLeftNavContent($tax_exp->getHTML());
676  $tpl->setContent($tax_exp->getHTML()."&nbsp;");
677  }
678  }
679  }
680 
684  function pasteItems()
685  {
686  global $lng, $ilCtrl;
687 //var_dump($_GET);
688 //var_dump($_POST);
689  if ($_GET["move_ids"] != "")
690  {
691  $move_ids = explode(",", $_GET["move_ids"]);
692  $tax = $this->getCurrentTaxonomy();
693  $tree = $tax->getTree();
694 
695  include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
696  $target_node = new ilTaxonomyNode((int) $_GET["tax_node"]);
697  foreach ($move_ids as $m_id)
698  {
699  // cross check taxonomy
700  $node = new ilTaxonomyNode((int) $m_id);
701  if ($node->getTaxonomyId() == $tax->getId() &&
702  ($target_node->getTaxonomyId() == $tax->getId() ||
703  $target_node->getId() == $tree->readRootId()))
704  {
705  // check if target is not within the selected nodes
706  if($tree->isGrandChild((int) $m_id, $target_node->getId()))
707  {
708  ilUtil::sendFailure($lng->txt("tax_target_within_nodes"), true);
709  $this->ctrl->redirect($this, "listNodes");
710  }
711 
712  // if target is not current place, move
713  $parent_id = $tree->getParentId((int) $m_id);
714  if ($parent_id != $target_node->getId())
715  {
716  $tree->moveTree((int) $m_id, $target_node->getId());
717  ilTaxonomyNode::fixOrderNumbers($tax->getId(), $target_node->getId());
719  }
720  }
721  }
722  }
723 
724  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
725  $ilCtrl->redirect($this, "listNodes");
726  }
727 
732  {
733  global $ilCtrl, $tpl, $lng;
734 
735  $tax = $this->getCurrentTaxonomy();
736 
737  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
738  $cgui = new ilConfirmationGUI();
739  $cgui->setFormAction($ilCtrl->getFormAction($this));
740  $cgui->setHeaderText($lng->txt("tax_confirm_deletion"));
741  $cgui->setCancel($lng->txt("cancel"), "listTaxonomies");
742  $cgui->setConfirm($lng->txt("delete"), "deleteTaxonomy");
743 
744  $cgui->addItem("id[]", $i, $tax->getTitle());
745 
746  $tpl->setContent($cgui->getHTML());
747  }
748 
755  function deleteTaxonomy()
756  {
757  global $ilCtrl, $lng;
758 
759  $tax = $this->getCurrentTaxonomy();
760  $tax->delete();
761 
762  ilUtil::sendSuccess($lng->txt("tax_tax_deleted"), true);
763  $ilCtrl->redirect($this, "listTaxonomies");
764  }
765 
772  function listTaxonomies()
773  {
774  global $tpl, $ilToolbar, $lng, $ilCtrl;
775 
777  if (count($tax_ids) == 0 || $this->getMultiple())
778  {
779  $ilToolbar->addButton($lng->txt("tax_add_taxonomy"),
780  $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy"));
781  }
782  else
783  {
784  ilUtil::sendInfo($lng->txt("tax_max_one_tax"));
785  }
786 
787  include_once("./Services/Taxonomy/classes/class.ilTaxonomyListTableGUI.php");
788 
789  $tab = new ilTaxonomyListTableGUI($this, "listTaxonomies", $this->getAssignedObject(),
790  $this->getListInfo());
791 
792  $tpl->setContent($tab->getHTML());
793  }
794 
800  function setTabs($a_id)
801  {
802  global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
803 
804  $ilTabs->clearTargets();
805 
806  $ilHelp->setScreenIdComponent("tax");
807 
808  $tpl->clearHeader();
809  $tpl->setTitle(ilObject::_lookupTitle($this->getCurrentTaxonomyId()));
810  $tpl->setTitleIcon(ilUtil::getImagePath("icon_tax.svg"));
811 
812  $ilTabs->setBackTarget($lng->txt("back"),
813  $ilCtrl->getLinkTarget($this, "listTaxonomies"));
814 
815  $ilTabs->addTab("list_items", $lng->txt("tax_nodes"),
816  $ilCtrl->getLinkTarget($this, "listNodes"));
817  if ($this->assigned_item_sorting)
818  {
819  $ilTabs->addTab("ass_items", $lng->txt("tax_assigned_items"),
820  $ilCtrl->getLinkTarget($this, "listAssignedItems"));
821  }
822  $ilTabs->addTab("settings", $lng->txt("settings"),
823  $ilCtrl->getLinkTarget($this, "editSettings"));
824 
825  $ilTabs->activateTab($a_id);
826  }
827 
834  function editSettings()
835  {
836  global $tpl;
837 
838  $this->setTabs("settings");
839 
840  $form = $this->initSettingsForm();
841  $tpl->setContent($form->getHTML());
842  }
843 
847  public function initSettingsForm()
848  {
849  global $lng, $ilCtrl;
850 
851  $tax = $this->getCurrentTaxonomy();
852 
853  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
854  $form = new ilPropertyFormGUI();
855 
856  // title
857  $ti = new ilTextInputGUI($lng->txt("title"), "title");
858  $ti->setMaxLength(200);
859  $form->addItem($ti);
860  $ti->setValue($tax->getTitle());
861 
862  // description
863  $ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
864  //$ta->setCols();
865  //$ta->setRows();
866  $form->addItem($ta);
867  $ta->setValue($tax->getDescription());
868 
869  // sorting
870  $options = array(
871  ilObjTaxonomy::SORT_ALPHABETICAL => $lng->txt("tax_alphabetical"),
872  ilObjTaxonomy::SORT_MANUAL => $lng->txt("tax_manual")
873  );
874  $si = new ilSelectInputGUI($lng->txt("tax_node_sorting"), "sorting");
875  $si->setOptions($options);
876  $form->addItem($si);
877  $si->setValue($tax->getSortingMode());
878 
879  // assigned item sorting
880  if ($this->assigned_item_sorting)
881  {
882  $cb = new ilCheckboxInputGUI($lng->txt("tax_item_sorting"), "item_sorting");
883  $cb->setChecked($tax->getItemSorting());
884  $form->addItem($cb);
885  }
886 
887  $form->addCommandButton("updateSettings", $lng->txt("save"));
888 
889  $form->setTitle($lng->txt("settings"));
890  $form->setFormAction($ilCtrl->getFormAction($this));
891 
892  return $form;
893  }
894 
898  public function updateSettings()
899  {
900  global $tpl, $lng, $ilCtrl;
901 
902  $form = $this->initSettingsForm();
903  if ($form->checkInput())
904  {
905  $tax = $this->getCurrentTaxonomy();
906  $tax->setTitle($form->getInput("title"));
907  $tax->setDescription($form->getInput("description"));
908  $tax->setSortingMode($form->getInput("sorting"));
909  $tax->setItemSorting($form->getInput("item_sorting"));
910  $tax->update();
911 
912  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
913  $ilCtrl->redirect($this, "editSettings");
914  }
915  else
916  {
917  $form->setValuesByPost();
918  $tpl->setContent($form->getHtml());
919  }
920  }
921 
928  function listAssignedItems()
929  {
930  global $tpl, $ilToolbar, $lng, $ilCtrl;
931 
932  $tax = $this->getCurrentTaxonomy();
933 
934  $this->setTabs("ass_items");
935 
936  // show tree
937  $this->showTree(true);
938 
939  // list assigned items
940  include_once("./Services/Taxonomy/classes/class.ilTaxAssignedItemsTableGUI.php");
941  $table = new ilTaxAssignedItemsTableGUI($this, "listAssignedItems",
942  (int) $_GET["tax_node"], $this->getCurrentTaxonomy(), $this->assigned_item_comp_id,
943  $this->assigned_item_obj_id, $this->assigned_item_type, $this->assigned_item_info_obj);
944 
945  $tpl->setContent($table->getHTML());
946  }
947 
955  {
956  global $lng, $ilCtrl;
957 
958  include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
959  if (is_array($_POST["order"]))
960  {
961  $order = $_POST["order"];
962  //asort($order, SORT_NUMERIC);
963  //$cnt = 10;
964  $tax_node = (int) $_GET["tax_node"];
965  foreach ($order as $a_item_id => $ord_nr)
966  {
967  $tax_ass = new ilTaxNodeAssignment($this->assigned_item_comp_id,
968  $this->assigned_item_obj_id,
969  $this->assigned_item_type, $this->getCurrentTaxonomyId());
970  $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
971  //$cnt+= 10;
972  }
973  $tax_ass = new ilTaxNodeAssignment($this->assigned_item_comp_id,
974  $this->assigned_item_obj_id,
975  $this->assigned_item_type, $this->getCurrentTaxonomyId());
976  $tax_ass->fixOrderNr($tax_node);
977  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
978  }
979  $ilCtrl->redirect($this, "listAssignedItems");
980  }
981 
982 }
983 ?>