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
00032 chdir("../..");
00033 require_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 $cmd = ($_GET["cmd"] == "")
00046 ? $_POST["cmd"]
00047 : $_GET["cmd"];
00048
00049 $ref_id=$_GET["ref_id"];
00050
00051
00052 if (!empty($ref_id))
00053 {
00054 require_once "./include/inc.header.php";
00055
00056 $obj_id = ilObject::_lookupObjectId($ref_id);
00057 $type = ilObjSAHSLearningModule::_lookupSubType($obj_id);
00058
00059 }
00060 else
00061 {
00062
00063
00064 $requiredKeys=array("command", "version", "session_id");
00065 if (count(array_diff ($requiredKeys, array_keys(array_change_key_case($HTTP_POST_VARS, CASE_LOWER))))==0)
00066 {
00067
00068
00069
00070
00071
00072 $param=urldecode($HTTP_POST_VARS["session_id"]);
00073 if (!empty($param) && substr_count($param, "_")==2)
00074 {
00075 list($session_id, $ref_id, $obj_id)=explode("_",$param);
00076
00077
00078 require_once "./include/inc.header.php";
00079
00080
00081 $type="hacp";
00082
00083 }
00084 }
00085 }
00086
00087 switch ($type)
00088 {
00089 case "scorm":
00090
00091 require_once "./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php";
00092 $track = new ilObjSCORMTracking();
00093 $track->$cmd();
00094 break;
00095 case "aicc":
00096
00097 require_once "./Modules/ScormAicc/classes/AICC/class.ilObjAICCTracking.php";
00098 $track = new ilObjAICCTracking();
00099 $track->$cmd();
00100 break;
00101 case "hacp":
00102
00103 require_once "./Modules/ScormAicc/classes/HACP/class.ilObjHACPTracking.php";
00104 $track = new ilObjHACPTracking($ref_id, $obj_id);
00105
00106 break;
00107 default:
00108
00109 $fp=fopen("./Modules/ScormAicc/log/scorm.log", "a+");
00110 fputs($fp, "unknown type >$type< in sahs_server\n");
00111 foreach ($HTTP_POST_VARS as $k=>$v)
00112 fputs($fp, "HTTP_POST_VARS[$k]=$v \n");
00113 fclose($fp);
00114 }
00115
00116 exit;
00117
00118 ?>