ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilStyleScopeExplorer.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 
35 {
41  function ilStyleScopeExplorer($a_target)
42  {
43  if ($_POST["id"][0] > 0)
44  {
45  $this->style_id = $_POST["id"][0];
46  }
47  else
48  {
49  $this->style_id = $_GET["stlye_id"];
50  }
51 
52  parent::ilExplorer($a_target);
53  }
54 
55  function formatHeader(&$tpl,$a_obj_id,$a_option)
56  {
57  global $lng, $ilias, $ilCtrl;
58 
59  $tpl->setCurrentBlock("icon");
60  $tpl->setVariable("ICON_IMAGE", ilUtil::getImagePath("icon_root.gif"));
61  $tpl->setVariable("TXT_ALT_IMG", $lng->txt("repository"));
62  $tpl->parseCurrentBlock();
63 
64  $ilCtrl->setParameterByClass("ilobjstylesettingsgui",
65  "cat", 0);
66  $ilCtrl->setParameterByClass("ilobjstylesettingsgui",
67  "style_id", $this->style_id);
68 
69  $tpl->setCurrentBlock("link");
70  $tpl->setVariable("TITLE", $lng->txt("repository"));
71  $tpl->setVariable("LINK_TARGET", $ilCtrl->getLinkTargetByClass("ilobjstylesettingsgui",
72  "saveScope"));
73  $tpl->parseCurrentBlock();
74 
75  $tpl->setCurrentBlock("element");
76  $tpl->parseCurrentBlock();
77  }
78 
82  function buildLinkTarget($a_node_id, $a_type)
83  {
84  global $ilCtrl;
85 
86  $ilCtrl->setParameterByClass("ilobjstylesettingsgui",
87  "cat", $a_node_id);
88  $ilCtrl->setParameterByClass("ilobjstylesettingsgui",
89  "style_id", $this->style_id);
90 
91  return $ilCtrl->getLinkTargetByClass("ilobjstylesettingsgui",
92  "saveScope");
93  }
94 
95 } // END class.ilExplorer
96 ?>