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

content/sahs_presentation.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 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 
00033 define("ILIAS_MODULE", "content");
00034 chdir("..");
00035 require_once "./include/inc.header.php";
00036 require_once "classes/class.ilObjectGUI.php";
00037 require_once "./content/classes/class.ilObjSAHSLearningModule.php";
00038 
00039 $lng->loadLanguageModule("content");
00040 
00041 $ref_id=$_GET["ref_id"];
00042 
00043 if (!$rbacsystem->checkAccess("read", $_GET["ref_id"]))
00044 {
00045         $ilias->raiseError($lng->txt("permission_denied"), $ilias->error_obj->WARNING);
00046 }
00047 
00048 $obj_id = ilObject::_lookupObjectId($ref_id);
00049 $type = ilObjSAHSLearningModule::_lookupSubType($obj_id);
00050 
00051 
00052 // PAYMENT STUFF
00053 // check if object is purchased
00054 include_once './payment/classes/class.ilPaymentObject.php';
00055 include_once './classes/class.ilSearch.php';
00056 
00057 if(!ilPaymentObject::_hasAccess($_GET['ref_id']))
00058 {
00059         ilUtil::redirect('../payment/start_purchase.php?ref_id='.$_GET['ref_id']);
00060 }
00061 if(!ilSearch::_checkParentConditions($_GET['ref_id']))
00062 {
00063         $ilias->error_obj->raiseError($lng->txt('access_denied'),$ilias->error_obj->WARNING);
00064 }
00065 
00066 
00067 switch ($type)
00068 {
00069         case "scorm":
00070                                 //SCORM
00071                                 require_once "./content/classes/SCORM/class.ilSCORMPresentationGUI.php";
00072                                 $scorm_presentation = new ilSCORMPresentationGUI();
00073                                 break;
00074 
00075         case "aicc":
00076                                 //AICC
00077                                 require_once "./content/classes/AICC/class.ilAICCPresentationGUI.php";
00078                                 $aicc_presentation = new ilAICCPresentationGUI();
00079                                 break;
00080 
00081         case "hacp":
00082                                 //HACP
00083                                 require_once "./content/classes/HACP/class.ilHACPPresentationGUI.php";
00084                                 $hacp_presentation = new ilHACPPresentationGUI();
00085                                 break;
00086         default:
00087 
00088                 //unknown type
00089                 require_once "./content/classes/class.ilLMPresentationGUI.php";
00090                 $lm_presentation = new ilLMPresentationGUI();
00091 
00092 }
00093 
00094 $ilBench->save();
00095 
00096 ?>

Generated on Fri Dec 13 2013 09:06:36 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1