ILIAS  eassessment Revision 61809
 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->type = "qpl";
63  $this->gui_class_name = "ilobjquestionpoolgui";
64 
65  // general commands array
66  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolAccess.php";
67  $this->commands = ilObjQuestionPoolAccess::_getCommands();
68  }
69 
70 
79  function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
80  {
81  parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
82  }
83 
84 
92  function getCommandFrame($a_cmd)
93  {
94  switch($a_cmd)
95  {
96  case "":
97  case "questions":
98  include_once "./classes/class.ilFrameTargetInfo.php";
99  $frame = ilFrameTargetInfo::_getFrame("MainContent");
100  break;
101 
102  default:
103  }
104 
105  return $frame;
106  }
107 
108 
109 
118  function getProperties()
119  {
120  global $lng, $ilUser;
121 
122  $props = array();
123 
124  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
125  if (!ilObjQuestionPool::_lookupOnline($this->obj_id))
126  {
127  $props[] = array("alert" => true, "property" => $lng->txt("status"),
128  "value" => $lng->txt("offline"));
129  }
130  return $props;
131  }
132 
133 
141  function getCommandLink($a_cmd)
142  {
143  // separate method for this line
144  //$cmd_link = "assessment/questionpool.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
145  $cmd_link = "ilias.php?baseClass=ilObjQuestionPoolGUI&amp;ref_id=".$this->ref_id."&amp;cmd=$a_cmd";
146 
147  return $cmd_link;
148  }
149 
150 
151 
152 } // END class.ilObjTestListGUI
153 ?>