ILIAS  release_8 Revision v8.24
class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php
Go to the documentation of this file.
1<?php
2
26{
30 private $db = null;
31
35 private $testOBJ = null;
36
42 {
43 $this->db = $db;
44 $this->testOBJ = $testOBJ;
45 }
46
51 {
52 $sourcePoolDefinition = $this->buildDefinitionInstance();
53
54 $sourcePoolDefinition->setPoolId($originalPoolData['qpl_id']);
55 $sourcePoolDefinition->setPoolRefId($originalPoolData['qpl_ref_id']);
56 $sourcePoolDefinition->setPoolTitle($originalPoolData['qpl_title']);
57 $sourcePoolDefinition->setPoolPath($originalPoolData['qpl_path']);
58 $sourcePoolDefinition->setPoolQuestionCount($originalPoolData['count']);
59
60 return $sourcePoolDefinition;
61 }
62
67 {
68 $sourcePoolDefinition = $this->buildDefinitionInstance();
69
70 $sourcePoolDefinition->loadFromDb($definitionId);
71
72 return $sourcePoolDefinition;
73 }
74
79 {
80 return $this->buildDefinitionInstance();
81 }
82
87 {
88 return new ilTestRandomQuestionSetSourcePoolDefinition($this->db, $this->testOBJ);
89 }
90}
Interface ilDBInterface.