ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 {
30 // create a reference for the questionpool object in the ILIAS database (object_reference table)
31 $newObj->createReference();
32
33 // put the questionpool object in the administration tree
34 $newObj->putInTree($parentRef);
35
36 // get default permissions and set the permissions for the questionpool object
37 $newObj->setPermissions($parentRef);
38 }
39
40 return $newObj;
41 }

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