ILIAS  release_8 Revision v8.24
ilObjTestDynamicQuestionSetConfig Class Reference
+ Inheritance diagram for ilObjTestDynamicQuestionSetConfig:
+ Collaboration diagram for ilObjTestDynamicQuestionSetConfig:

Public Member Functions

 getSourceQuestionPoolId ()
 getter for source question pool id More...
 
 setSourceQuestionPoolId ($sourceQuestionPoolId)
 getter for source question pool id More...
 
 getSourceQuestionPoolTitle ()
 getter for source question pool title More...
 
 setSourceQuestionPoolTitle ($sourceQuestionPoolTitle)
 getter for source question pool title More...
 
 isAnswerStatusFilterEnabled ()
 
 setAnswerStatusFilterEnabled ($answerStatusFilterEnabled)
 
 isTaxonomyFilterEnabled ()
 isser for taxonomie filter enabled More...
 
 setTaxonomyFilterEnabled ($taxonomyFilterEnabled)
 setter for taxonomie filter enabled More...
 
 getOrderingTaxonomyId ()
 setter for ordering taxonomy id More...
 
 setOrderingTaxonomyId ($orderingTaxonomyId)
 getter for ordering taxonomy id More...
 
 initFromArray ($dataArray)
 initialises the current object instance with values from matching properties within the passed array More...
 
 loadFromDb ()
 loads the question set config for current test from the database More...
 
 saveToDb ()
 saves the question set config for current test to the database More...
 
 cloneToDbForTestId ($testId)
 saves the question set config for test with given id to the database More...
 
 deleteFromDb ()
 deletes the question set config for current test from the database More...
 
 isQuestionSetConfigured ()
 returns the fact wether a useable question set config exists or not More...
 
 doesQuestionSetRelatedDataExist ()
 returns the fact wether a useable question set config exists or not More...
 
 removeQuestionSetRelatedData ()
 removes all question set config related data (in this case it's only the config itself) More...
 
 resetQuestionSetRelatedTestSettings ()
 resets all test settings that depends on a non changed question set config More...
 
 cloneQuestionSetRelatedData (ilObjTest $cloneTestOBJ)
 removes all question set config related data for cloned/copied test More...
 
 getSourceQuestionPoolSummaryString (ilLanguage $lng)
 
 areDepenciesInVulnerableState ()
 
 getDepenciesInVulnerableStateMessage (ilLanguage $lng)
 
 areDepenciesBroken ()
 
 getDepenciesBrokenMessage (ilLanguage $lng)
 
 isValidRequestOnBrokenQuestionSetDepencies ($nextClass, $cmd)
 
 getHiddenTabsOnBrokenDepencies ()
 
 getSourceQuestionPoolRefIds ()
 
 isResultTaxonomyFilterSupported ()
 
 isAnyQuestionFilterEnabled ()
 
 getSourceQuestionPoolLink ()
 
- Public Member Functions inherited from ilTestQuestionSetConfig
 __construct (ilTree $tree, ilDBInterface $db, ilComponentRepository $component_repository, ilObjTest $testOBJ)
 
 loadFromDb ()
 loads the question set config for current test from the database More...
 
 saveToDb ()
 saves the question set config for current test to the database More...
 
 cloneToDbForTestId ($testId)
 saves the question set config for test with given id to the database More...
 
 deleteFromDb ()
 deletes the question set config for current test from the database More...
 
 areDepenciesInVulnerableState ()
 
 getDepenciesInVulnerableStateMessage (ilLanguage $lng)
 
 areDepenciesBroken ()
 
 getDepenciesBrokenMessage (ilLanguage $lng)
 
 isValidRequestOnBrokenQuestionSetDepencies ($nextClass, $cmd)
 
 getHiddenTabsOnBrokenDepencies ()
 
 isQuestionSetConfigured ()
 
 doesQuestionSetRelatedDataExist ()
 checks wether question set config related data exists or not More...
 
 removeQuestionSetRelatedData ()
 removes all question set config related data More...
 
 resetQuestionSetRelatedTestSettings ()
 resets all test settings that depends on a non changed question set config More...
 
 cloneQuestionSetRelatedData (ilObjTest $cloneTestOBJ)
 removes all question set config related data for cloned/copied test More...
 
 getQuestionPoolPathString ($poolId)
 
 getFirstQuestionPoolRefIdByObjId (int $pool_obj_id)
 
 isResultTaxonomyFilterSupported ()
 

Private Member Functions

 dbRecordExists ($testId)
 checks wether a question set config for current test exists in the database More...
 
 updateDbRecord ($testId)
 updates the record in the database that corresponds to the question set config for the current test More...
 
 insertDbRecord ($testId)
 inserts a new record for the question set config for the current test into the database More...
 
 getSourceQuestionPoolNumQuestions ()
 

Private Attributes

 $sourceQuestionPoolId = null
 
 $answerStatusFilterEnabled = null
 
 $taxonomyFilterEnabled = null
 
 $orderingTaxonomyId = null
 
 $sourceQuestionPoolRefIds = null
 

Additional Inherited Members

- Protected Attributes inherited from ilTestQuestionSetConfig
ilTree $tree
 
ilDBInterface $db
 
ilComponentRepository $component_repository
 
ilObjTest $testOBJ
 

Detailed Description

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

Member Function Documentation

◆ areDepenciesBroken()

ilObjTestDynamicQuestionSetConfig::areDepenciesBroken ( )

Reimplemented from ilTestQuestionSetConfig.

Definition at line 424 of file class.ilObjTestDynamicQuestionSetConfig.php.

424 : bool
425 {
426 if (!$this->getSourceQuestionPoolId()) {
427 return false;
428 }
429
430 $poolRefs = $this->getSourceQuestionPoolRefIds();
431
432 if (count($poolRefs)) {
433 return false;
434 }
435
436 return true;
437 }
getSourceQuestionPoolId()
getter for source question pool id

References getSourceQuestionPoolId(), and getSourceQuestionPoolRefIds().

+ Here is the call graph for this function:

◆ areDepenciesInVulnerableState()

ilObjTestDynamicQuestionSetConfig::areDepenciesInVulnerableState ( )

Reimplemented from ilTestQuestionSetConfig.

Definition at line 397 of file class.ilObjTestDynamicQuestionSetConfig.php.

397 : bool
398 {
399 if (!$this->getSourceQuestionPoolId()) {
400 return false;
401 }
402
403 $poolRefs = $this->getSourceQuestionPoolRefIds();
404
405 foreach ($poolRefs as $refId) {
406 if (!$this->tree->isDeleted($refId)) {
407 return false;
408 }
409 }
410
411 return true;
412 }
$refId
Definition: xapitoken.php:58

References $refId, getSourceQuestionPoolId(), and getSourceQuestionPoolRefIds().

+ Here is the call graph for this function:

◆ cloneQuestionSetRelatedData()

ilObjTestDynamicQuestionSetConfig::cloneQuestionSetRelatedData ( ilObjTest  $cloneTestOBJ)

removes all question set config related data for cloned/copied test

Parameters
ilObjTest$cloneTestOBJ

Reimplemented from ilTestQuestionSetConfig.

Definition at line 330 of file class.ilObjTestDynamicQuestionSetConfig.php.

331 {
332 $this->loadFromDb();
333 $this->cloneToDbForTestId($cloneTestOBJ->getTestId());
334 }
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database
loadFromDb()
loads the question set config for current test from the database
getTestId()
Gets the database id of the additional test data.

References cloneToDbForTestId(), ilObjTest\getTestId(), and loadFromDb().

+ Here is the call graph for this function:

◆ cloneToDbForTestId()

ilObjTestDynamicQuestionSetConfig::cloneToDbForTestId (   $testId)

saves the question set config for test with given id to the database

Parameters
$testId

Reimplemented from ilTestQuestionSetConfig.

Definition at line 210 of file class.ilObjTestDynamicQuestionSetConfig.php.

211 {
212 $this->insertDbRecord($testId);
213 }
insertDbRecord($testId)
inserts a new record for the question set config for the current test into the database

References insertDbRecord().

Referenced by cloneQuestionSetRelatedData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dbRecordExists()

ilObjTestDynamicQuestionSetConfig::dbRecordExists (   $testId)
private

checks wether a question set config for current test exists in the database

Parameters
$testId
Returns
boolean

Definition at line 237 of file class.ilObjTestDynamicQuestionSetConfig.php.

237 : bool
238 {
239 $res = $this->db->queryF(
240 "SELECT COUNT(*) cnt FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
241 array('integer'),
242 array($testId)
243 );
244
245 $row = $this->db->fetchAssoc($res);
246
247 return (bool) $row['cnt'];
248 }
$res
Definition: ltiservices.php:69

References $res.

Referenced by saveToDb().

+ Here is the caller graph for this function:

◆ deleteFromDb()

ilObjTestDynamicQuestionSetConfig::deleteFromDb ( )

deletes the question set config for current test from the database

Returns
boolean

Reimplemented from ilTestQuestionSetConfig.

Definition at line 220 of file class.ilObjTestDynamicQuestionSetConfig.php.

220 : bool
221 {
222 $aff = $this->db->manipulateF(
223 "DELETE FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
224 array('integer'),
225 array($this->testOBJ->getTestId())
226 );
227
228 return (bool) $aff;
229 }

Referenced by removeQuestionSetRelatedData().

+ Here is the caller graph for this function:

◆ doesQuestionSetRelatedDataExist()

ilObjTestDynamicQuestionSetConfig::doesQuestionSetRelatedDataExist ( )

returns the fact wether a useable question set config exists or not

Returns
boolean

Reimplemented from ilTestQuestionSetConfig.

Definition at line 306 of file class.ilObjTestDynamicQuestionSetConfig.php.

306 : bool
307 {
308 return $this->isQuestionSetConfigured();
309 }
isQuestionSetConfigured()
returns the fact wether a useable question set config exists or not

References isQuestionSetConfigured().

+ Here is the call graph for this function:

◆ getDepenciesBrokenMessage()

ilObjTestDynamicQuestionSetConfig::getDepenciesBrokenMessage ( ilLanguage  $lng)

Reimplemented from ilTestQuestionSetConfig.

Definition at line 439 of file class.ilObjTestDynamicQuestionSetConfig.php.

439 : string
440 {
441 $msg = sprintf(
442 $lng->txt('tst_dyn_quest_set_pool_deleted'),
443 $this->getSourceQuestionPoolTitle()
444 );
445
446 return $msg;
447 }
$lng

References $lng.

◆ getDepenciesInVulnerableStateMessage()

ilObjTestDynamicQuestionSetConfig::getDepenciesInVulnerableStateMessage ( ilLanguage  $lng)

Reimplemented from ilTestQuestionSetConfig.

Definition at line 414 of file class.ilObjTestDynamicQuestionSetConfig.php.

414 : string
415 {
416 $msg = sprintf(
417 $lng->txt('tst_dyn_quest_set_pool_trashed'),
418 $this->getSourceQuestionPoolTitle()
419 );
420
421 return $msg;
422 }

References $lng.

◆ getHiddenTabsOnBrokenDepencies()

ilObjTestDynamicQuestionSetConfig::getHiddenTabsOnBrokenDepencies ( )

Reimplemented from ilTestQuestionSetConfig.

Definition at line 484 of file class.ilObjTestDynamicQuestionSetConfig.php.

484 : array
485 {
486 return array(
487 'settings', 'manscoring', 'scoringadjust', 'statistics', 'history', 'export'
488 );
489 }

◆ getOrderingTaxonomyId()

ilObjTestDynamicQuestionSetConfig::getOrderingTaxonomyId ( )

setter for ordering taxonomy id

Returns
integer $orderingTaxonomyId

Definition at line 137 of file class.ilObjTestDynamicQuestionSetConfig.php.

References $orderingTaxonomyId.

Referenced by ilTestDynamicQuestionSet\initActualQuestionSequence(), ilTestDynamicQuestionSet\initFilteredQuestionList(), insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

◆ getSourceQuestionPoolId()

◆ getSourceQuestionPoolLink()

ilObjTestDynamicQuestionSetConfig::getSourceQuestionPoolLink ( )

Definition at line 520 of file class.ilObjTestDynamicQuestionSetConfig.php.

520 : string
521 {
523 $href = ilLink::_getLink($refId, 'qpl');
524 $title = $this->getSourceQuestionPoolTitle();
525
526 return "<a href=\"$href\" alt=\"$title\">$title</a>";
527 }
getSourceQuestionPoolTitle()
getter for source question pool title
static _getAllReferences(int $id)
get all reference ids for object ID

References $refId, ilObject\_getAllReferences(), ilLink\_getLink(), getSourceQuestionPoolId(), and getSourceQuestionPoolTitle().

+ Here is the call graph for this function:

◆ getSourceQuestionPoolNumQuestions()

ilObjTestDynamicQuestionSetConfig::getSourceQuestionPoolNumQuestions ( )
private
Returns
integer

Definition at line 379 of file class.ilObjTestDynamicQuestionSetConfig.php.

379 : int
380 {
381 $query = "
382 SELECT COUNT(*) num from qpl_questions
383 WHERE obj_fi = %s AND original_id IS NULL
384 ";
385
386 $res = $this->db->queryF(
387 $query,
388 array('integer'),
389 array($this->getSourceQuestionPoolId())
390 );
391
392 $row = $this->db->fetchAssoc($res);
393
394 return $row['num'];
395 }
$query

References $query, $res, and getSourceQuestionPoolId().

+ Here is the call graph for this function:

◆ getSourceQuestionPoolRefIds()

ilObjTestDynamicQuestionSetConfig::getSourceQuestionPoolRefIds ( )

Definition at line 493 of file class.ilObjTestDynamicQuestionSetConfig.php.

493 : array
494 {
495 if ($this->sourceQuestionPoolRefIds === null) {
496 $this->sourceQuestionPoolRefIds = ilObject::_getAllReferences($this->getSourceQuestionPoolId());
497 }
498
500 }

References $sourceQuestionPoolRefIds, ilObject\_getAllReferences(), and getSourceQuestionPoolId().

Referenced by areDepenciesBroken(), areDepenciesInVulnerableState(), and getSourceQuestionPoolSummaryString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSourceQuestionPoolSummaryString()

ilObjTestDynamicQuestionSetConfig::getSourceQuestionPoolSummaryString ( ilLanguage  $lng)
Parameters
ilLanguage$lng
ilTree$tree
Returns
string

Definition at line 341 of file class.ilObjTestDynamicQuestionSetConfig.php.

341 : string
342 {
343 $poolRefs = $this->getSourceQuestionPoolRefIds();
344
345 if (!count($poolRefs)) {
346 $sourceQuestionPoolSummaryString = sprintf(
347 $lng->txt('tst_dyn_quest_set_src_qpl_summary_string_deleted'),
348 $this->getSourceQuestionPoolTitle()
349 );
350
351 return $sourceQuestionPoolSummaryString;
352 }
353
354 foreach ($poolRefs as $refId) {
355 if (!$this->tree->isDeleted($refId)) {
356 $sourceQuestionPoolSummaryString = sprintf(
357 $lng->txt('tst_dynamic_question_set_source_questionpool_summary_string'),
358 $this->getSourceQuestionPoolTitle(),
359 $this->getQuestionPoolPathString($this->getSourceQuestionPoolId()),
360 $this->getSourceQuestionPoolNumQuestions()
361 );
362
363 return $sourceQuestionPoolSummaryString;
364 }
365 }
366
367 $sourceQuestionPoolSummaryString = sprintf(
368 $lng->txt('tst_dyn_quest_set_src_qpl_summary_string_trashed'),
369 $this->getSourceQuestionPoolTitle(),
370 $this->getSourceQuestionPoolNumQuestions()
371 );
372
373 return $sourceQuestionPoolSummaryString;
374 }

References $lng, $refId, and getSourceQuestionPoolRefIds().

+ Here is the call graph for this function:

◆ getSourceQuestionPoolTitle()

ilObjTestDynamicQuestionSetConfig::getSourceQuestionPoolTitle ( )

getter for source question pool title

Returns
string

Definition at line 81 of file class.ilObjTestDynamicQuestionSetConfig.php.

81 : string
82 {
83 return $this->sourceQuestionPoolTitle;
84 }

Referenced by getSourceQuestionPoolLink(), insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

◆ initFromArray()

ilObjTestDynamicQuestionSetConfig::initFromArray (   $dataArray)

initialises the current object instance with values from matching properties within the passed array

Parameters
array$dataArray

Definition at line 158 of file class.ilObjTestDynamicQuestionSetConfig.php.

159 {
160 foreach ($dataArray as $field => $value) {
161 switch ($field) {
162 case 'source_qpl_fi': $this->setSourceQuestionPoolId($value); break;
163 case 'source_qpl_title': $this->setSourceQuestionPoolTitle($value); break;
164 case 'answer_filter_enabled': $this->setAnswerStatusFilterEnabled($value); break;
165 case 'tax_filter_enabled': $this->setTaxonomyFilterEnabled($value); break;
166 case 'order_tax': $this->setOrderingTaxonomyId($value); break;
167 }
168 }
169 }
setTaxonomyFilterEnabled($taxonomyFilterEnabled)
setter for taxonomie filter enabled
setSourceQuestionPoolId($sourceQuestionPoolId)
getter for source question pool id
setOrderingTaxonomyId($orderingTaxonomyId)
getter for ordering taxonomy id
setSourceQuestionPoolTitle($sourceQuestionPoolTitle)
getter for source question pool title

References setAnswerStatusFilterEnabled(), setOrderingTaxonomyId(), setSourceQuestionPoolId(), setSourceQuestionPoolTitle(), and setTaxonomyFilterEnabled().

Referenced by loadFromDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertDbRecord()

ilObjTestDynamicQuestionSetConfig::insertDbRecord (   $testId)
private

inserts a new record for the question set config for the current test into the database

Parameters
$testId

Definition at line 279 of file class.ilObjTestDynamicQuestionSetConfig.php.

280 {
281 $this->db->insert('tst_dyn_quest_set_cfg', array(
282 'test_fi' => array('integer', $testId),
283 'source_qpl_fi' => array('integer', $this->getSourceQuestionPoolId()),
284 'source_qpl_title' => array('text', $this->getSourceQuestionPoolTitle()),
285 'answer_filter_enabled' => array('integer', $this->isAnswerStatusFilterEnabled()),
286 'tax_filter_enabled' => array('integer', $this->isTaxonomyFilterEnabled()),
287 'order_tax' => array('integer', $this->getOrderingTaxonomyId())
288 ));
289 }
isTaxonomyFilterEnabled()
isser for taxonomie filter enabled

References getOrderingTaxonomyId(), getSourceQuestionPoolId(), getSourceQuestionPoolTitle(), isAnswerStatusFilterEnabled(), and isTaxonomyFilterEnabled().

Referenced by cloneToDbForTestId(), and saveToDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAnswerStatusFilterEnabled()

ilObjTestDynamicQuestionSetConfig::isAnswerStatusFilterEnabled ( )

◆ isAnyQuestionFilterEnabled()

ilObjTestDynamicQuestionSetConfig::isAnyQuestionFilterEnabled ( )

Definition at line 507 of file class.ilObjTestDynamicQuestionSetConfig.php.

507 : bool
508 {
509 if ($this->isTaxonomyFilterEnabled()) {
510 return true;
511 }
512
513 if ($this->isAnswerStatusFilterEnabled()) {
514 return true;
515 }
516
517 return false;
518 }

References isAnswerStatusFilterEnabled(), and isTaxonomyFilterEnabled().

+ Here is the call graph for this function:

◆ isQuestionSetConfigured()

ilObjTestDynamicQuestionSetConfig::isQuestionSetConfigured ( )

returns the fact wether a useable question set config exists or not

Returns
boolean

Reimplemented from ilTestQuestionSetConfig.

Definition at line 296 of file class.ilObjTestDynamicQuestionSetConfig.php.

296 : bool
297 {
298 return $this->getSourceQuestionPoolId() > 0;
299 }

References getSourceQuestionPoolId().

Referenced by doesQuestionSetRelatedDataExist().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isResultTaxonomyFilterSupported()

ilObjTestDynamicQuestionSetConfig::isResultTaxonomyFilterSupported ( )

Reimplemented from ilTestQuestionSetConfig.

Definition at line 502 of file class.ilObjTestDynamicQuestionSetConfig.php.

502 : bool
503 {
504 return false;
505 }

◆ isTaxonomyFilterEnabled()

ilObjTestDynamicQuestionSetConfig::isTaxonomyFilterEnabled ( )

◆ isValidRequestOnBrokenQuestionSetDepencies()

ilObjTestDynamicQuestionSetConfig::isValidRequestOnBrokenQuestionSetDepencies (   $nextClass,
  $cmd 
)

Reimplemented from ilTestQuestionSetConfig.

Definition at line 449 of file class.ilObjTestDynamicQuestionSetConfig.php.

449 : bool
450 {
451 //vd($nextClass, $cmd);
452
453 if (!$this->testOBJ->participantDataExist()) {
454 return true;
455 }
456
457 switch ($nextClass) {
458 case 'ilobjtestdynamicquestionsetconfiggui':
459
460 case 'ilobjectmetadatagui':
461 case 'ilpermissiongui':
462
463 return true;
464
465 case 'ilobjtestgui':
466 case '':
467
468 $cmds = array(
469 'infoScreen', 'participants', 'npSetFilter', 'npResetFilter',
470 'deleteAllUserResults', 'confirmDeleteAllUserResults',
471 'deleteSingleUserResults', 'confirmDeleteSelectedUserData', 'cancelDeleteSelectedUserData'
472 );
473
474 if (in_array($cmd, $cmds)) {
475 return true;
476 }
477
478 break;
479 }
480
481 return false;
482 }

◆ loadFromDb()

ilObjTestDynamicQuestionSetConfig::loadFromDb ( )

loads the question set config for current test from the database

Returns
boolean

Reimplemented from ilTestQuestionSetConfig.

Definition at line 176 of file class.ilObjTestDynamicQuestionSetConfig.php.

176 : bool
177 {
178 $res = $this->db->queryF(
179 "SELECT * FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
180 array('integer'),
181 array($this->testOBJ->getTestId())
182 );
183
184 while ($row = $this->db->fetchAssoc($res)) {
185 $this->initFromArray($row);
186
187 return true;
188 }
189
190 return false;
191 }
initFromArray($dataArray)
initialises the current object instance with values from matching properties within the passed array

References $res, and initFromArray().

Referenced by cloneQuestionSetRelatedData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeQuestionSetRelatedData()

ilObjTestDynamicQuestionSetConfig::removeQuestionSetRelatedData ( )

removes all question set config related data (in this case it's only the config itself)

Reimplemented from ilTestQuestionSetConfig.

Definition at line 315 of file class.ilObjTestDynamicQuestionSetConfig.php.

315 : void
316 {
317 $this->deleteFromDb();
318 }
deleteFromDb()
deletes the question set config for current test from the database

References deleteFromDb().

+ Here is the call graph for this function:

◆ resetQuestionSetRelatedTestSettings()

ilObjTestDynamicQuestionSetConfig::resetQuestionSetRelatedTestSettings ( )

resets all test settings that depends on a non changed question set config

Reimplemented from ilTestQuestionSetConfig.

Definition at line 320 of file class.ilObjTestDynamicQuestionSetConfig.php.

321 {
322 // nothing to do
323 }

◆ saveToDb()

ilObjTestDynamicQuestionSetConfig::saveToDb ( )

saves the question set config for current test to the database

Reimplemented from ilTestQuestionSetConfig.

Definition at line 196 of file class.ilObjTestDynamicQuestionSetConfig.php.

197 {
198 if ($this->dbRecordExists($this->testOBJ->getTestId())) {
199 $this->updateDbRecord($this->testOBJ->getTestId());
200 } else {
201 $this->insertDbRecord($this->testOBJ->getTestId());
202 }
203 }
updateDbRecord($testId)
updates the record in the database that corresponds to the question set config for the current test
dbRecordExists($testId)
checks wether a question set config for current test exists in the database

References dbRecordExists(), insertDbRecord(), and updateDbRecord().

+ Here is the call graph for this function:

◆ setAnswerStatusFilterEnabled()

ilObjTestDynamicQuestionSetConfig::setAnswerStatusFilterEnabled (   $answerStatusFilterEnabled)
Parameters
boolean$answerStatusFilterEnabled

Definition at line 107 of file class.ilObjTestDynamicQuestionSetConfig.php.

108 {
109 $this->answerStatusFilterEnabled = $answerStatusFilterEnabled;
110 }

References $answerStatusFilterEnabled.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setOrderingTaxonomyId()

ilObjTestDynamicQuestionSetConfig::setOrderingTaxonomyId (   $orderingTaxonomyId)

getter for ordering taxonomy id

Parameters
integer$orderingTaxonomyId

Definition at line 147 of file class.ilObjTestDynamicQuestionSetConfig.php.

148 {
149 $this->orderingTaxonomyId = $orderingTaxonomyId;
150 }

References $orderingTaxonomyId.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setSourceQuestionPoolId()

ilObjTestDynamicQuestionSetConfig::setSourceQuestionPoolId (   $sourceQuestionPoolId)

getter for source question pool id

Parameters
integer$sourceQuestionPoolId

Definition at line 71 of file class.ilObjTestDynamicQuestionSetConfig.php.

72 {
73 $this->sourceQuestionPoolId = (int) $sourceQuestionPoolId;
74 }

References $sourceQuestionPoolId, and ILIAS\Repository\int().

Referenced by initFromArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSourceQuestionPoolTitle()

ilObjTestDynamicQuestionSetConfig::setSourceQuestionPoolTitle (   $sourceQuestionPoolTitle)

getter for source question pool title

Parameters
string$sourceQuestionPoolTitle

Definition at line 91 of file class.ilObjTestDynamicQuestionSetConfig.php.

92 {
93 $this->sourceQuestionPoolTitle = $sourceQuestionPoolTitle;
94 }

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setTaxonomyFilterEnabled()

ilObjTestDynamicQuestionSetConfig::setTaxonomyFilterEnabled (   $taxonomyFilterEnabled)

setter for taxonomie filter enabled

Parameters
boolean$taxonomyFilterEnabled

Definition at line 127 of file class.ilObjTestDynamicQuestionSetConfig.php.

128 {
129 $this->taxonomyFilterEnabled = (bool) $taxonomyFilterEnabled;
130 }

References $taxonomyFilterEnabled.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ updateDbRecord()

ilObjTestDynamicQuestionSetConfig::updateDbRecord (   $testId)
private

updates the record in the database that corresponds to the question set config for the current test

Parameters
$testId

Definition at line 256 of file class.ilObjTestDynamicQuestionSetConfig.php.

257 {
258 $this->db->update(
259 'tst_dyn_quest_set_cfg',
260 array(
261 'source_qpl_fi' => array('integer', $this->getSourceQuestionPoolId()),
262 'source_qpl_title' => array('text', $this->getSourceQuestionPoolTitle()),
263 'answer_filter_enabled' => array('integer', $this->isAnswerStatusFilterEnabled()),
264 'tax_filter_enabled' => array('integer', $this->isTaxonomyFilterEnabled()),
265 'order_tax' => array('integer', $this->getOrderingTaxonomyId())
266 ),
267 array(
268 'test_fi' => array('integer', $testId)
269 )
270 );
271 }

References getOrderingTaxonomyId(), getSourceQuestionPoolId(), getSourceQuestionPoolTitle(), isAnswerStatusFilterEnabled(), and isTaxonomyFilterEnabled().

Referenced by saveToDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $answerStatusFilterEnabled

ilObjTestDynamicQuestionSetConfig::$answerStatusFilterEnabled = null
private

◆ $orderingTaxonomyId

ilObjTestDynamicQuestionSetConfig::$orderingTaxonomyId = null
private

◆ $sourceQuestionPoolId

ilObjTestDynamicQuestionSetConfig::$sourceQuestionPoolId = null
private

◆ $sourceQuestionPoolRefIds

ilObjTestDynamicQuestionSetConfig::$sourceQuestionPoolRefIds = null
private

◆ $taxonomyFilterEnabled

ilObjTestDynamicQuestionSetConfig::$taxonomyFilterEnabled = null
private

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