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 ilObjSAHSLearningModuleListGUI extends ilObjectListGUI
00038 {
00043 function ilObjSAHSLearningModuleListGUI()
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 = "sahs";
00062 $this->gui_class_name = "ilobjsahslearningmodulegui";
00063
00064
00065 include_once('class.ilObjSAHSLearningModuleAccess.php');
00066 $this->commands = ilObjSAHSLearningModuleAccess::_getCommands();
00067 }
00068
00078 function getCommandLink($a_cmd)
00079 {
00080 switch($a_cmd)
00081 {
00082 case "view":
00083
00084 $cmd_link = "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->ref_id;
00085 break;
00086
00087 case "edit":
00088 $cmd_link = "content/sahs_edit.php?ref_id=".$this->ref_id;
00089 break;
00090
00091 case "infoScreen":
00092 $cmd_link = "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=".$this->ref_id.
00093 "&cmd=infoScreen";
00094 break;
00095
00096 default:
00097 $cmd_link = "repository.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
00098 break;
00099 }
00100
00101 return $cmd_link;
00102 }
00103
00104
00112 function getCommandFrame($a_cmd)
00113 {
00114 global $ilias;
00115
00116 switch($a_cmd)
00117 {
00118 case "view":
00119 include_once './payment/classes/class.ilPaymentObject.php';
00120
00121
00122 $showViewInFrameset = true;
00123 $isBuyable = ilPaymentObject::_isBuyable($this->ref_id);
00124 if (($isBuyable && ilPaymentObject::_hasAccess($this->ref_id) == false) ||
00125 $showViewInFrameset)
00126 {
00127
00128 $frame = "ilContObj".$this->obj_id;
00129 }
00130 else
00131 {
00132 $frame = "ilContObj".$this->obj_id;
00133 }
00134 break;
00135
00136 case "edit":
00137 $frame = ilFrameTargetInfo::_getFrame("MainContent");
00138 break;
00139
00140 case "infoScreen":
00141 $frame = ilFrameTargetInfo::_getFrame("MainContent");
00142 break;
00143
00144 default:
00145 $frame = "";
00146 break;
00147 }
00148
00149 return $frame;
00150 }
00151
00152
00161 function getProperties()
00162 {
00163 global $lng, $rbacsystem;
00164
00165 $props = array();
00166
00167 include_once("content/classes/class.ilObjSAHSLearningModuleAccess.php");
00168
00169 if (!ilObjSAHSLearningModuleAccess::_lookupOnline($this->obj_id))
00170 {
00171 $props[] = array("alert" => true, "property" => $lng->txt("status"),
00172 "value" => $lng->txt("offline"));
00173 }
00174
00175 if ($rbacsystem->checkAccess($this->ref_id, "write"))
00176 {
00177 $props[] = array("alert" => false, "property" => $lng->txt("type"),
00178 "value" => $lng->txt("sahs"));
00179 }
00180
00181 return $props;
00182 }
00183
00184
00185 }
00186 ?>