ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
32 private $db = null;
33
37 private $testOBJ = null;
38
44 {
45 $this->db = $db;
46 $this->testOBJ = $testOBJ;
47 }
48
53 {
54 $sourcePoolDefinition = $this->buildDefinitionInstance();
55
56 $sourcePoolDefinition->setPoolId($originalPoolData['qpl_id']);
57 $sourcePoolDefinition->setPoolRefId($originalPoolData['qpl_ref_id']);
58 $sourcePoolDefinition->setPoolTitle($originalPoolData['qpl_title']);
59 $sourcePoolDefinition->setPoolPath($originalPoolData['qpl_path']);
60 $sourcePoolDefinition->setPoolQuestionCount($originalPoolData['count']);
61
62 return $sourcePoolDefinition;
63 }
64
69 {
70 $sourcePoolDefinition = $this->buildDefinitionInstance();
71
72 $sourcePoolDefinition->loadFromDb($definitionId);
73
74 return $sourcePoolDefinition;
75 }
76
81 {
82 return $this->buildDefinitionInstance();
83 }
84
89 {
90 return new ilTestRandomQuestionSetSourcePoolDefinition($this->db, $this->testOBJ);
91 }
92}
Interface ilDBInterface.