ILIAS
release_8 Revision v8.23
◀ 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:31
ilQuestionPoolFactory\createNewInstance
createNewInstance($parentRef=null)
Definition:
class.ilQuestionPoolFactory.php:27
ilQuestionPoolFactory
Definition:
class.ilQuestionPoolFactory.php:25
Modules
TestQuestionPool
classes
class.ilQuestionPoolFactory.php
Generated on Wed Sep 3 2025 22:01:45 for ILIAS by
1.8.13 (using
Doxyfile
)