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
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
00053
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
00071 require_once "./content/classes/SCORM/class.ilSCORMPresentationGUI.php";
00072 $scorm_presentation = new ilSCORMPresentationGUI();
00073 break;
00074
00075 case "aicc":
00076
00077 require_once "./content/classes/AICC/class.ilAICCPresentationGUI.php";
00078 $aicc_presentation = new ilAICCPresentationGUI();
00079 break;
00080
00081 case "hacp":
00082
00083 require_once "./content/classes/HACP/class.ilHACPPresentationGUI.php";
00084 $hacp_presentation = new ilHACPPresentationGUI();
00085 break;
00086 default:
00087
00088
00089 require_once "./content/classes/class.ilLMPresentationGUI.php";
00090 $lm_presentation = new ilLMPresentationGUI();
00091
00092 }
00093
00094 $ilBench->save();
00095
00096 ?>