ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
class.ilQuestionPoolFactory.php
Go to the documentation of this file.
1
<?php
2
25
class
ilQuestionPoolFactory
26
{
27
public
function
createNewInstance
($parentRef =
null
):
ilObjQuestionPool
28
{
29
// create new questionpool object
30
$newObj =
new
ilObjQuestionPool
(0,
true
);
31
32
// set title of questionpool object to "dummy"
33
$newObj->setTitle(
"dummy"
);
34
35
// set description of questionpool object
36
$newObj->setDescription(
"derived questionpool"
);
37
38
// create the questionpool class in the ILIAS database (object_data table)
39
$newObj->create(
true
);
40
41
if
($parentRef) {
42
// create a reference for the questionpool object in the ILIAS database (object_reference table)
43
$newObj->createReference();
44
45
// put the questionpool object in the administration tree
46
$newObj->putInTree($parentRef);
47
48
// get default permissions and set the permissions for the questionpool object
49
$newObj->setPermissions($parentRef);
50
}
51
52
return
$newObj;
53
}
54
}
ilObjQuestionPool
Definition:
class.ilObjQuestionPool.php:34
ilQuestionPoolFactory
Definition:
class.ilQuestionPoolFactory.php:26
ilQuestionPoolFactory\createNewInstance
createNewInstance($parentRef=null)
Definition:
class.ilQuestionPoolFactory.php:27
components
ILIAS
TestQuestionPool
classes
class.ilQuestionPoolFactory.php
Generated on Sat Oct 18 2025 23:04:34 for ILIAS by
1.9.4 (using
Doxyfile
)