Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00035 include_once "classes/class.ilObjectListGUI.php";
00036
00037 class ilObjFileBasedLMListGUI extends ilObjectListGUI
00038 {
00043 function ilObjFileBasedLMListGUI()
00044 {
00045 $this->ilObjectListGUI();
00046 }
00047
00053 function init()
00054 {
00055 $this->delete_enabled = true;
00056 $this->cut_enabled = true;
00057 $this->subscribe_enabled = true;
00058 $this->link_enabled = true;
00059 $this->payment_enabled = true;
00060 $this->info_screen_enabled = true;
00061 $this->type = "htlm";
00062 $this->gui_class_name = "ilobjfilebasedlmgui";
00063
00064
00065 include_once('class.ilObjFileBasedLMAccess.php');
00066 $this->commands = ilObjFileBasedLMAccess::_getCommands();
00067 }
00068
00078 function getCommandLink($a_cmd)
00079 {
00080 switch($a_cmd)
00081 {
00082 case "view":
00083 $cmd_link = "content/fblm_presentation.php?ref_id=".$this->ref_id;
00084 break;
00085
00086 case "edit":
00087 $cmd_link = "content/fblm_edit.php?ref_id=".$this->ref_id;
00088 break;
00089
00090 default:
00091 $cmd_link = "repository.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
00092 break;
00093 }
00094
00095 return $cmd_link;
00096 }
00097
00098
00106 function getCommandFrame($a_cmd)
00107 {
00108 global $ilias;
00109
00110 switch($a_cmd)
00111 {
00112 case "view":
00113 include_once 'payment/classes/class.ilPaymentObject.php';
00114
00115
00116 $showViewInFrameset = true;
00117 $isBuyable = ilPaymentObject::_isBuyable($this->ref_id);
00118 if (($isBuyable && ilPaymentObject::_hasAccess($this->ref_id) == false) ||
00119 $showViewInFrameset)
00120 {
00121
00122 $frame = "ilContObj".$this->obj_id;
00123 }
00124 else
00125 {
00126 $frame = "ilContObj".$this->obj_id;
00127 }
00128 break;
00129
00130 case "edit":
00131 $frame = ilFrameTargetInfo::_getFrame("MainContent");
00132 break;
00133
00134 default:
00135 $frame = "";
00136 break;
00137 }
00138
00139 return $frame;
00140 }
00141
00142
00151 function getProperties()
00152 {
00153 global $lng, $rbacsystem;
00154
00155 $props = array();
00156
00157 include_once("content/classes/class.ilObjFileBasedLMAccess.php");
00158
00159 if (!ilObjFileBasedLMAccess::_lookupOnline($this->obj_id))
00160 {
00161 $props[] = array("alert" => true, "property" => $lng->txt("status"),
00162 "value" => $lng->txt("offline"));
00163 }
00164
00165 if ($rbacsystem->checkAccess($this->ref_id, "write"))
00166 {
00167 $props[] = array("alert" => false, "property" => $lng->txt("type"),
00168 "value" => $lng->txt("htlm"));
00169 }
00170
00171 return $props;
00172 }
00173
00174
00175 }
00176 ?>