ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilQuestionPoolFactory Class Reference
+ Collaboration diagram for ilQuestionPoolFactory:

Public Member Functions

 createNewInstance ($parentRef=null)
 

Detailed Description

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

Member Function Documentation

◆ createNewInstance()

ilQuestionPoolFactory::createNewInstance (   $parentRef = null)

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

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 }

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