ILIAS  release_7 Revision v7.30-3-g800a261c036
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
27 public function __construct($a_context = self::CONTEXT_REPOSITORY)
28 {
29 parent::__construct($a_context);
30 }
31
35 public 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->info_screen_enabled = true;
43 $this->type = "qpl";
44 $this->gui_class_name = "ilobjquestionpoolgui";
45
46 // general commands array
47 include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolAccess.php";
48 $this->commands = ilObjQuestionPoolAccess::_getCommands();
49 }
50
51
52
60 public function getCommandFrame($a_cmd)
61 {
62 switch ($a_cmd) {
63 case "":
64 case "questions":
65 include_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
66 $frame = ilFrameTargetInfo::_getFrame("MainContent");
67 break;
68
69 default:
70 }
71
72 return $frame;
73 }
74
75
76
85 public function getProperties()
86 {
87 global $DIC;
88 $lng = $DIC['lng'];
89 $ilUser = $DIC['ilUser'];
90
91 $props = array();
92
93 include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
94 if (!ilObjQuestionPool::_lookupOnline($this->obj_id)) {
95 $props[] = array("alert" => true, "property" => $lng->txt("status"),
96 "value" => $lng->txt("offline"));
97 }
98 return $props;
99 }
100
101
109 public function getCommandLink($a_cmd)
110 {
111 global $DIC;
112 $ilCtrl = $DIC['ilCtrl'];
113
114 $a_cmd = explode('::', $a_cmd);
115
116 if (count($a_cmd) == 2) {
117 $cmd_link = $ilCtrl->getLinkTargetByClass(array('ilRepositoryGUI', 'ilObjQuestionPoolGUI', $a_cmd[0]), $a_cmd[1]);
118 } else {
119 $cmd_link = $ilCtrl->getLinkTargetByClass('ilObjQuestionPoolGUI', $a_cmd[0]);
120 }
121
122 $params = array_merge(array('ref_id' => $this->ref_id), $this->command_link_params);
123
124 foreach ($params as $param => $value) {
125 $cmd_link = ilUtil::appendUrlParameterString($cmd_link, "$param=$value", true);
126 }
127
128 return $cmd_link;
129 }
130} // END class.ilObjTestListGUI
An exception for terminatinating execution or to throw for unit testing.
static _getFrame($a_class, $a_type='')
Get content frame name.
Class ilObjQuestionPoolListGUI.
getCommandFrame($a_cmd)
Get command target frame.
__construct($a_context=self::CONTEXT_REPOSITORY)
constructor
getCommandLink($a_cmd)
Get command link url.
static _lookupOnline($a_obj_id, $is_reference=false)
Class ilObjectListGUI.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
global $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$param
Definition: xapitoken.php:29