1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once "Services/Object/classes/class.ilObjectListGUI.php";
6
7/**
8* Class ilObjPollListGUI
9*
10* @author Jörg Lützenkirchen <luetzenkirchen@leifos.com>
11* $Id: class.ilObjRootFolderListGUI.php 23764 2010-05-06 15:11:30Z smeyer $
12*
13* @extends ilObjectListGUI
14*/
15class ilObjPollListGUI extends ilObjectListGUI
16{
17    /**
18    * initialisation
19    */
20    public function init()
21    {
22        $this->copy_enabled = false;
23        $this->delete_enabled = true;
24        $this->cut_enabled = false;
25        $this->subscribe_enabled = false;
26        $this->link_enabled = false;
27        $this->info_screen_enabled = true;
28        $this->type = "poll";
29        $this->gui_class_name = "ilobjpollgui";
30
31        // general commands array
32        include_once('./Modules/Poll/classes/class.ilObjPollAccess.php');
33        $this->commands = ilObjPollAccess::_getCommands();
34    }
35
36    /**
37    * Get item properties
38    *
39    * @return	array		array of property arrays:
40    *						"alert" (boolean) => display as an alert property (usually in red)
41    *						"property" (string) => property name
42    *						"value" (string) => property value
43    */
44    public function getProperties()
45    {
46        $lng = $this->lng;
47
48        // BEGIN WebDAV: Get parent properties
49        // BEGIN ChangeEvent: Get parent properties
50        $props = parent::getProperties();
51        // END ChangeEvent: Get parent properties
52        // END WebDAV: Get parent properties
53
54        // offline
55        include_once 'Modules/Poll/classes/class.ilObjPollAccess.php';
56        if (!ilObjPollAccess::_lookupOnline($this->obj_id)) {
57            $props[] = array("alert" => true, "property" => $lng->txt("status"),
58                "value" => $lng->txt("offline"));
59        }
60
61        return $props;
62    }
63}
64