ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
storeScorm2004.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
require_once(
"Services/Init/classes/class.ilInitialisation.php"
);
21
ilContext::init
(
ilContext::CONTEXT_SCORM
);
22
ilInitialisation::initILIAS
();
23
24
//conditions for storing data
25
global
$DIC
;
26
$ilDB
=
$DIC
->database();
27
28
$packageId
=
$DIC
->http()->wrapper()->query()->retrieve(
'package_id'
,
$DIC
->refinery()->kindlyTo()->int());
29
$refId
=
$DIC
->http()->wrapper()->query()->retrieve(
'ref_id'
,
$DIC
->refinery()->kindlyTo()->int());
30
$doUnload
=
false
;
31
if
(
$DIC
->http()->wrapper()->query()->has(
'do'
)) {
32
if
(
$DIC
->http()->wrapper()->query()->retrieve(
'do'
,
$DIC
->refinery()->kindlyTo()->string()) ==
"unload"
) {
33
$doUnload
=
true
;
34
}
35
}
36
37
$defaultLessonMode
=
"normal"
;
38
$comments
=
true
;
39
$interactions
=
true
;
40
$objectives
=
true
;
41
$time_from_lms
=
false
;
42
43
$lm_set
=
$ilDB
->queryF(
44
'SELECT default_lesson_mode, interactions, objectives, time_from_lms, comments FROM sahs_lm WHERE id = %s'
,
45
array(
'integer'
),
46
array(
$packageId
)
47
);
48
while
($lm_rec =
$ilDB
->fetchAssoc(
$lm_set
)) {
49
$defaultLessonMode
= ($lm_rec[
"default_lesson_mode"
]);
50
$interactions
=
ilUtil::yn2tf
($lm_rec[
"interactions"
]);
51
$objectives
=
ilUtil::yn2tf
($lm_rec[
"objectives"
]);
52
$time_from_lms
=
ilUtil::yn2tf
($lm_rec[
"time_from_lms"
]);
53
$comments
=
ilUtil::yn2tf
($lm_rec[
"comments"
]);
54
}
55
56
if
(
$doUnload
) {
57
ilSCORM2004StoreData::scormPlayerUnload
(
$packageId
,
$refId
,
$time_from_lms
, null);
58
}
else
{
59
// $data = file_get_contents('php://input');
60
ilSCORM2004StoreData::persistCMIData
(
$packageId
,
$refId
,
$defaultLessonMode
,
$comments
,
$interactions
,
$objectives
,
$time_from_lms
, null, null);
61
}
ilSCORM2004StoreData\persistCMIData
static persistCMIData(int $packageId, int $refId, string $defaultLessonMode, bool $comments, bool $interactions, bool $objectives, bool $time_from_lms, ?string $data=null, ?int $userId=null)
Definition:
class.ilSCORM2004StoreData.php:125
$time_from_lms
$time_from_lms
Definition:
storeScorm2004.php:41
$defaultLessonMode
if($DIC->http() ->wrapper() ->query() ->has('do')) $defaultLessonMode
Definition:
storeScorm2004.php:37
ilContext\CONTEXT_SCORM
const CONTEXT_SCORM
Definition:
class.ilContext.php:42
$interactions
$interactions
Definition:
storeScorm2004.php:39
$doUnload
$doUnload
Definition:
storeScorm2004.php:30
$objectives
$objectives
Definition:
storeScorm2004.php:40
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:1225
ilSCORM2004StoreData\scormPlayerUnload
static scormPlayerUnload(int $packageId, int $refId, bool $time_from_lms, ?int $userId=null)
Definition:
class.ilSCORM2004StoreData.php:28
$ilDB
$ilDB
Definition:
storeScorm2004.php:26
$comments
$comments
Definition:
storeScorm2004.php:38
$lm_set
$lm_set
Definition:
storeScorm2004.php:43
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
class.ilContext.php:52
$packageId
$packageId
Definition:
storeScorm2004.php:28
ilUtil\yn2tf
static yn2tf(string $a_yn)
Definition:
class.ilUtil.php:907
$refId
$refId
Definition:
storeScorm2004.php:29
$DIC
global $DIC
Definition:
storeScorm2004.php:25
storeScorm2004.php
Generated on Wed Apr 23 2025 22:02:42 for ILIAS by
1.8.13 (using
Doxyfile
)