ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObjQuestionPoolListGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
16include_once "Services/Object/classes/class.ilObjectListGUI.php";
17include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
18
20{
21 protected $command_link_params = array();
22
28 {
29 $this->ilObjectListGUI();
30 }
31
35 function init()
36 {
37 $this->delete_enabled = true;
38 $this->cut_enabled = true;
39 $this->copy_enabled = true;
40 $this->subscribe_enabled = true;
41 $this->link_enabled = true;
42 $this->payment_enabled = false;
43 $this->info_screen_enabled = true;
44 $this->type = "qpl";
45 $this->gui_class_name = "ilobjquestionpoolgui";
46
47 // general commands array
48 include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolAccess.php";
49 $this->commands = ilObjQuestionPoolAccess::_getCommands();
50 }
51
52
61 function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
62 {
63 parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
64 }
65
66
74 function getCommandFrame($a_cmd)
75 {
76 switch($a_cmd)
77 {
78 case "":
79 case "questions":
80 include_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
81 $frame = ilFrameTargetInfo::_getFrame("MainContent");
82 break;
83
84 default:
85 }
86
87 return $frame;
88 }
89
90
91
100 function getProperties()
101 {
102 global $lng, $ilUser;
103
104 $props = array();
105
106 include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
107 if (!ilObjQuestionPool::_lookupOnline($this->obj_id))
108 {
109 $props[] = array("alert" => true, "property" => $lng->txt("status"),
110 "value" => $lng->txt("offline"));
111 }
112 return $props;
113 }
114
115
123 function getCommandLink($a_cmd)
124 {
125 global $ilCtrl;
126
127 $a_cmd = explode('::', $a_cmd);
128
129 if( count($a_cmd) == 2 )
130 {
131 $cmd_link = $ilCtrl->getLinkTargetByClass(array('ilRepositoryGUI', 'ilObjQuestionPoolGUI', $a_cmd[0]), $a_cmd[1]);
132 }
133 else
134 {
135 $cmd_link = $ilCtrl->getLinkTargetByClass('ilObjQuestionPoolGUI', $a_cmd[0]);
136 }
137
138 $params = array_merge(array('ref_id' => $this->ref_id), $this->command_link_params);
139
140 foreach($params as $param => $value)
141 {
142 $cmd_link = ilUtil::appendUrlParameterString($cmd_link, "$param=$value", true);
143 }
144
145 return $cmd_link;
146 }
147
148
149
150} // END class.ilObjTestListGUI
151?>
static _getFrame($a_class, $a_type='')
Get content frame name.
Class ilObjQuestionPoolListGUI.
getCommandFrame($a_cmd)
Get command target frame.
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
inititialize new item
getCommandLink($a_cmd)
Get command link url.
_lookupOnline($a_obj_id, $is_reference=FALSE)
Class ilObjectListGUI.
ilObjectListGUI()
constructor
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
$params
Definition: example_049.php:96
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15