ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjFileBasedLMListGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once "Services/Object/classes/class.ilObjectListGUI.php";
6 
16 {
22  function init()
23  {
24  $this->copy_enabled = true;
25  $this->delete_enabled = true;
26  $this->cut_enabled = true;
27  $this->subscribe_enabled = true;
28  $this->link_enabled = true;
29  $this->info_screen_enabled = true;
30  $this->type = "htlm";
31  $this->gui_class_name = "ilobjfilebasedlmgui";
32 
33  // general commands array
34  include_once('Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php');
35  $this->commands = ilObjFileBasedLMAccess::_getCommands();
36  }
37 
47  function getCommandLink($a_cmd)
48  {
49  global $ilCtrl;
50 
51  switch($a_cmd)
52  {
53  case "view":
54  $cmd_link = "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->ref_id;
55  break;
56 
57  case "edit":
58  $cmd_link = "ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$this->ref_id;
59  break;
60 
61  default:
62  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
63  $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
64  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
65  break;
66  }
67 
68  return $cmd_link;
69  }
70 
71 
79  function getCommandFrame($a_cmd)
80  {
81  global $ilias;
82 
83  switch($a_cmd)
84  {
85  case "view":
86  $frame = "ilContObj".$this->obj_id;
87  break;
88 
89  case "edit":
90  $frame = ilFrameTargetInfo::_getFrame("MainContent");
91  break;
92 
93  default:
94  $frame = "";
95  break;
96  }
97 
98  return $frame;
99  }
100 
101 
110  function getProperties()
111  {
112  global $lng, $rbacsystem;
113 
114  $props = array();
115 
116  include_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
117 
118  if (ilObjFileBasedLMAccess::_isOffline($this->obj_id))
119  {
120  $props[] = array("alert" => true, "property" => $lng->txt("status"),
121  "value" => $lng->txt("offline"));
122  }
123  else if (!ilObjFileBasedLMAccess::_determineStartUrl($this->obj_id))
124  {
125  $props[] = array("alert" => true, "property" => $lng->txt("status"),
126  "value" => $lng->txt("no_start_file"));
127  }
128 
129  if ($rbacsystem->checkAccess("write",$this->ref_id))
130  {
131  $props[] = array("alert" => false, "property" => $lng->txt("type"),
132  "value" => $lng->txt("htlm"));
133  }
134 
135  return $props;
136  }
137 
138 
139 } // END class.ilObjCategoryGUI
140 ?>
getCommandFrame($a_cmd)
Get command target frame.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Class ilObjFileBasedLMListGUI.
Class ilObjectListGUI.
static _determineStartUrl($a_id)
check wether learning module is online
Create styles array
The data for the language used.
static _getFrame($a_class, $a_type='')
Get content frame name.
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
global $lng
Definition: privfeed.php:17
static _isOffline($a_obj_id)
Type-specific implementation of general status.