ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilContainerSelectionExplorer.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once('./classes/class.ilExplorer.php');
25 
36 {
37  protected $target_type;
38 
42  public function __construct($a_target)
43  {
44  global $tree;
45 
46  parent::__construct($a_target);
47 
48  $this->tree = $tree;
49  $this->root_id = $this->tree->readRootId();
50  $this->order_column = "title";
51 
52  $this->setSessionExpandVariable("ref_repexpand");
53 
54 
55  $this->addFilter("root");
56  $this->addFilter("cat");
57  #$this->addFilter("grp");
58  #$this->addFilter("fold");
59  $this->addFilter("crs");
60 
62  $this->setFiltered(true);
64 
65  }
66 
72  public function setTargetType($a_type)
73  {
74  $this->target_type = $a_type;
75  }
76 
82  public function getTargetType()
83  {
84  return $this->target_type;
85  }
86 
92  public function isClickable($a_type,$a_id)
93  {
94  if($this->getTargetType() == $a_type)
95  {
96  // TODO: check permission
97  return true;
98  }
99  return FALSE;
100  }
101 
109  function formatHeader($a_obj_id,$a_option)
110  {
111  global $lng, $ilias;
112 
113  $tpl = new ilTemplate("tpl.tree.html", true, true);
114 
115  $tpl->setCurrentBlock("text");
116  $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
117  $tpl->parseCurrentBlock();
118 
119  $tpl->setCurrentBlock("row");
120  $tpl->parseCurrentBlock();
121 
122  $this->output[] = $tpl->get();
123  }
124 
125 }
126 ?>