• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

content/classes/class.ilObjSAHSLearningModuleListGUI.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2005 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
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                 // general commands array
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                                 //$cmd_link = "content/sahs_presentation.php?ref_id=".$this->ref_id;
00084                                 $cmd_link = "ilias.php?baseClass=ilSAHSPresentationGUI&amp;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&amp;ref_id=".$this->ref_id.
00093                                         "&amp;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                                 //$showViewInFrameset = $ilias->ini->readVariable("layout","view_target") == "frame";
00122                                 $showViewInFrameset = true;
00123                                 $isBuyable = ilPaymentObject::_isBuyable($this->ref_id);
00124                                 if (($isBuyable && ilPaymentObject::_hasAccess($this->ref_id) == false) ||
00125                                         $showViewInFrameset)
00126                                 {
00127                                         //$frame = ilFrameTargetInfo::_getFrame("MainContent");
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 } // END class.ilObjCategoryGUI
00186 ?>

Generated on Fri Dec 13 2013 13:52:09 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1