ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilTestQuestionSetConfig.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
13{
19 protected $tree = null;
20
26 protected $db = null;
27
33 protected $pluginAdmin = null;
34
40 protected $testOBJ = null;
41
49 {
50 $this->tree = $tree;
51 $this->db = $db;
52 $this->pluginAdmin = $pluginAdmin;
53 $this->testOBJ = $testOBJ;
54 }
55
59 abstract public function loadFromDb();
60
64 abstract public function saveToDb();
65
71 abstract public function cloneToDbForTestId($testId);
72
76 abstract public function deleteFromDb();
77
79 {
80 return false;
81 }
82
84 {
85 return '';
86 }
87
88 public function areDepenciesBroken()
89 {
90 return false;
91 }
92
94 {
95 return '';
96 }
97
98 public function isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd)
99 {
100 return true;
101 }
102
104 {
105 return array();
106 }
107
108 abstract public function isQuestionSetConfigured();
109
113 abstract public function doesQuestionSetRelatedDataExist();
114
118 abstract public function removeQuestionSetRelatedData();
119
123 abstract public function resetQuestionSetRelatedTestSettings();
124
130 abstract public function cloneQuestionSetRelatedData(ilObjTest $cloneTestOBJ);
131
136 public function getQuestionPoolPathString($poolId)
137 {
138 $nodePath = $this->tree->getNodePath(
139 current(ilObject::_getAllReferences($poolId))
140 );
141
142 $questionPoolPathString = '';
143
144 $i = 0;
145 $j = count($nodePath) - 2;
146
147 foreach ($nodePath as $node) {
148 if ($i > 0) {
149 $questionPoolPathString .= ' > ';
150 }
151
152 $questionPoolPathString .= $node['title'];
153
154 if ($i == $j) {
155 break;
156 }
157
158 $i++;
159 }
160
161 return $questionPoolPathString;
162 }
163
164 abstract public function isResultTaxonomyFilterSupported();
165}
An exception for terminatinating execution or to throw for unit testing.
language handling
static _getAllReferences($a_id)
get all reference ids of object
Administration class for plugins.
isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd)
loadFromDb()
loads the question set config for current test from the database
removeQuestionSetRelatedData()
removes all question set config related data
resetQuestionSetRelatedTestSettings()
resets all test settings that depends on a non changed question set config
deleteFromDb()
deletes the question set config for current test from the database
saveToDb()
saves the question set config for current test to the database
cloneQuestionSetRelatedData(ilObjTest $cloneTestOBJ)
removes all question set config related data for cloned/copied test
getDepenciesInVulnerableStateMessage(ilLanguage $lng)
__construct(ilTree $tree, ilDBInterface $db, ilPluginAdmin $pluginAdmin, ilObjTest $testOBJ)
doesQuestionSetRelatedDataExist()
checks wether question set config related data exists or not
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
$i
Definition: disco.tpl.php:19
Interface ilDBInterface.
global $lng
Definition: privfeed.php:17