ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjRemoteCourseListGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 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 include_once "Services/Object/classes/class.ilObjectListGUI.php";
25 
35 {
42  public function __construct()
43  {
44  parent::__construct();
45  }
46 
52  public function init()
53  {
54  $this->copy_enabled = false;
55  $this->static_link_enabled = true;
56  $this->delete_enabled = true;
57  $this->cut_enabled = true;
58  $this->subscribe_enabled = true;
59  $this->link_enabled = true;
60  $this->info_screen_enabled = true;
61  $this->type = 'rcrs';
62  $this->gui_class_name = 'ilobjremotecoursegui';
63 
64  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDSubstitution.php');
65  $this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
66  if ($this->substitutions->isActive()) {
67  $this->substitutions_enabled = true;
68  }
69 
70  // general commands array
71  include_once('Modules/RemoteCourse/classes/class.ilObjRemoteCourseAccess.php');
72  $this->commands = ilObjRemoteCourseAccess::_getCommands();
73  }
74 
75 
84  public function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
85  {
86  parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
87  }
88 
96  public function getProperties()
97  {
98  global $lng;
99 
100  include_once('Modules/RemoteCourse/classes/class.ilObjRemoteCourse.php');
101 
102  if ($org = ilObjRemoteCourse::_lookupOrganization($this->obj_id)) {
103  $this->addCustomProperty($lng->txt('organization'), $org, false, true);
104  }
105  if (!ilObjRemoteCourse::_lookupOnline($this->obj_id)) {
106  $this->addCustomProperty($lng->txt("status"), $lng->txt("offline"), true, true);
107  }
108 
109  return array();
110  }
111 
119  public function getCommandFrame($a_cmd)
120  {
121  switch ($a_cmd) {
122  case 'show':
123  include_once('./Services/WebServices/ECS/classes/class.ilECSExport.php');
124  include_once('./Services/WebServices/ECS/classes/class.ilECSImport.php');
126  ilECSImport::lookupServerId($this->obj_id),
127  ilECSImport::_lookupEContentId($this->obj_id)
128  )) {
129  return '_blank';
130  }
131 
132  // no break
133  default:
134  return parent::getCommandFrame($a_cmd);
135  }
136  }
137 } // END class.ilObjRemoteCourseListGUI
static _lookupEContentId($a_obj_id)
get econent_id
static _isRemote($a_server_id, $a_econtent_id)
is remote object
static _getInstanceByObjectType($a_type)
Singleton: use this method to get an instance.
addCustomProperty( $a_property="", $a_value="", $a_alert=false, $a_newline=false)
add custom property
getCommandFrame($a_cmd)
get command frame
Class ilObjectListGUI.
getProperties()
get properties (offline)
static lookupServerId($a_obj_id)
Lookup server id of imported content <type> $ilDB.
Create styles array
The data for the language used.
static _lookupOrganization($a_obj_id)
lookup organization
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
inititialize new item
static _lookupOnline($a_obj_id)
Lookup online.