ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilQuestionPoolFactory Class Reference
+ Collaboration diagram for ilQuestionPoolFactory:

Public Member Functions

 createNewInstance ($parentRef=null)
 

Detailed Description

Definition at line 12 of file class.ilQuestionPoolFactory.php.

Member Function Documentation

◆ createNewInstance()

ilQuestionPoolFactory::createNewInstance (   $parentRef = null)

Definition at line 14 of file class.ilQuestionPoolFactory.php.

15 {
16 // create new questionpool object
17 $newObj = new ilObjQuestionPool(0, true);
18
19 // set title of questionpool object to "dummy"
20 $newObj->setTitle("dummy");
21
22 // set description of questionpool object
23 $newObj->setDescription("derived questionpool");
24
25 // create the questionpool class in the ILIAS database (object_data table)
26 $newObj->create(true);
27
28 if ($parentRef) {
29 // create a reference for the questionpool object in the ILIAS database (object_reference table)
30 $newObj->createReference();
31
32 // put the questionpool object in the administration tree
33 $newObj->putInTree($parentRef);
34
35 // get default permissions and set the permissions for the questionpool object
36 $newObj->setPermissions($parentRef);
37 }
38
39 return $newObj;
40 }

The documentation for this class was generated from the following file: