ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilPoolSelectorGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
13 include_once "./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php";
14 
16 {
17  protected $clickable_types = array();
18  protected $selection_subcmd = "";
19 
20 
30  function __construct($a_parent_obj, $a_parent_cmd, $a_selection_gui = null, $a_selection_cmd = "insert",
31  $a_selection_subcmd = "selectPool", $a_selection_par = "pool_ref_id")
32  {
33  if($a_selection_gui == null)
34  {
35  $a_selection_gui = $a_parent_obj;
36  }
37 
38  $this->selection_subcmd = $a_selection_subcmd;
39  parent::__construct($a_parent_obj, $a_parent_cmd, $a_selection_gui, $a_selection_cmd,
40  $a_selection_par);
41 
42  $this->setAjax(true);
43  }
44 
51  function getNodeHref($a_node)
52  {
53  global $ilCtrl;
54 
55  $ilCtrl->setParameterByClass($this->selection_gui, "subCmd", $this->selection_subcmd);
56  $link = parent::getNodeHref($a_node);
57  $ilCtrl->setParameterByClass($this->selection_gui, "subCmd", "");
58  return $link;
59  }
60 
67  function isNodeVisible($a_node)
68  {
69  if(parent::isNodeVisible($a_node))
70  {
71  //hide empty container
72  if(count($this->getChildsOfNode($a_node["child"]))>0 || $this->isNodeClickable($a_node))
73  {
74  // #16523
75  if($a_node["type"] == "qpl")
76  {
77  include_once "Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
78  return ilObjQuestionPool::_lookupOnline($a_node["obj_id"]);
79  }
80 
81  return true;
82  }
83  }
84 
85  return false;
86  }
87 }
__construct($a_parent_obj, $a_parent_cmd, $a_selection_gui=null, $a_selection_cmd="insert", $a_selection_subcmd="selectPool", $a_selection_par="pool_ref_id")
Constructor.
Explorer for selecting repository items.
global $ilCtrl
Definition: ilias.php:18
getNodeHref($a_node)
Get href for node.
static _lookupOnline($a_obj_id, $is_reference=FALSE)
Create styles array
The data for the language used.
isNodeVisible($a_node)
Is node visible.
getChildsOfNode($a_parent_node_id)
Get childs of node.
Select media pool for adding objects into pages.