ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjQuestionPoolListGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 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 
37 include_once "Services/Object/classes/class.ilObjectListGUI.php";
38 include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
39 
41 {
47  {
48  $this->ilObjectListGUI();
49  }
50 
54  function init()
55  {
56  $this->delete_enabled = true;
57  $this->cut_enabled = true;
58  $this->copy_enabled = true;
59  $this->subscribe_enabled = true;
60  $this->link_enabled = false;
61  $this->payment_enabled = false;
62  $this->info_screen_enabled = true;
63  $this->type = "qpl";
64  $this->gui_class_name = "ilobjquestionpoolgui";
65 
66  // general commands array
67  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolAccess.php";
68  $this->commands = ilObjQuestionPoolAccess::_getCommands();
69  }
70 
71 
80  function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
81  {
82  parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
83  }
84 
85 
93  function getCommandFrame($a_cmd)
94  {
95  switch($a_cmd)
96  {
97  case "":
98  case "questions":
99  include_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
100  $frame = ilFrameTargetInfo::_getFrame("MainContent");
101  break;
102 
103  default:
104  }
105 
106  return $frame;
107  }
108 
109 
110 
119  function getProperties()
120  {
121  global $lng, $ilUser;
122 
123  $props = array();
124 
125  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
126  if (!ilObjQuestionPool::_lookupOnline($this->obj_id))
127  {
128  $props[] = array("alert" => true, "property" => $lng->txt("status"),
129  "value" => $lng->txt("offline"));
130  }
131  return $props;
132  }
133 
134 
142  function getCommandLink($a_cmd)
143  {
144  // separate method for this line
145  //$cmd_link = "assessment/questionpool.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
146  $cmd_link = "ilias.php?baseClass=ilObjQuestionPoolGUI&amp;ref_id=".$this->ref_id."&amp;cmd=$a_cmd";
147 
148  return $cmd_link;
149  }
150 
151 
152 
153 } // END class.ilObjTestListGUI
154 ?>