ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
class.ilLMObjectFactory.php
Go to the documentation of this file.
1
<?php
2
25
class
ilLMObjectFactory
26
{
27
public
static
function
getInstance
(
28
ilObjLearningModule
$a_content_obj,
29
int
$a_id = 0,
30
bool
$a_halt =
true
31
): ?
ilLMObject
{
32
global
$DIC
;
33
34
$ilDB
= $DIC->database();
35
36
$query =
"SELECT * FROM lm_data WHERE obj_id = "
.
37
$ilDB
->quote($a_id,
"integer"
);
38
$obj_set =
$ilDB
->query($query);
39
$obj_rec =
$ilDB
->fetchAssoc($obj_set);
40
41
$obj =
null
;
42
if
($obj_rec) {
43
switch
($obj_rec[
"type"
]) {
44
case
"st"
:
45
$obj =
new
ilStructureObject
($a_content_obj);
46
$obj->setId($obj_rec[
"obj_id"
]);
47
$obj->setDataRecord($obj_rec);
48
$obj->read();
49
break
;
50
51
case
"pg"
:
52
$obj =
new
ilLMPageObject
($a_content_obj, 0, $a_halt);
53
$obj->setId($obj_rec[
"obj_id"
]);
54
$obj->setDataRecord($obj_rec);
55
$obj->read();
56
break
;
57
}
58
}
59
return
$obj;
60
}
61
}
ilObjLearningModule
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilObjLearningModule.php:22
ilLMObjectFactory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilLMObjectFactory.php:25
ilLMObjectFactory\getInstance
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
Definition:
class.ilLMObjectFactory.php:27
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:142
$ilDB
$ilDB
Definition:
storeScorm2004.php:25
ilLMPageObject
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilLMPageObject.php:31
$DIC
global $DIC
Definition:
shib_login.php:22
ilLMObject
ilStructureObject
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilStructureObject.php:26
components
ILIAS
LearningModule
classes
class.ilLMObjectFactory.php
Generated on Sun Apr 13 2025 23:03:10 for ILIAS by
1.8.13 (using
Doxyfile
)