ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
storeScorm2004.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
10 include_once "Services/Context/classes/class.ilContext.php";
12 
13 require_once("Services/Init/classes/class.ilInitialisation.php");
15 
16 include_once 'Modules/Scorm2004/classes/class.ilSCORM2004StoreData.php';
17 
18 //conditions for storing data
19 global $ilDB;
20 $packageId=(int)$_GET['package_id'];
21 $lm_set = $ilDB->queryF('SELECT default_lesson_mode, interactions, objectives, time_from_lms, comments FROM sahs_lm WHERE id = %s',
22  array('integer'),array($packageId));
23 while($lm_rec = $ilDB->fetchAssoc($lm_set))
24 {
25  $defaultLessonMode=($lm_rec["default_lesson_mode"]);
26  $interactions=(ilUtil::yn2tf($lm_rec["interactions"]));
27  $objectives=(ilUtil::yn2tf($lm_rec["objectives"]));
28  $time_from_lms=(ilUtil::yn2tf($lm_rec["time_from_lms"]));
29  $comments=(ilUtil::yn2tf($lm_rec["comments"]));
30 }
31 
32 if ((string) $_GET['do'] == "unload") {
34 } else {
35  global $ilUser;
36  $data = file_get_contents('php://input');
37  $ilUser->setId($data->p);
38 
39  //until now only 2004
40  ilSCORM2004StoreData::persistCMIData(null, $packageId, $defaultLessonMode, $comments, $interactions, $objectives, $time_from_lms, $data);
41 }
42 
43 
44 ?>
$_GET["client_id"]
const CONTEXT_SCORM
static scormPlayerUnload($userId=null, $packageId, $time_from_lms)
static initILIAS()
ilias initialisation
$ilUser
Definition: imgupload.php:18
static persistCMIData($userId=null, $packageId, $defaultLessonMode, $comments, $interactions, $objectives, $time_from_lms, $data=null)
Create styles array
The data for the language used.
static init($a_type)
Init context by type.
$lm_set
global $ilDB
$packageId
static yn2tf($a_yn)
convert "y"/"n" to true/false