ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilTestRandomQuestionCollectionSubsetApplication.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetQuestionCollection.php'
;
5
12
class
ilTestRandomQuestionCollectionSubsetApplication
extends
ilTestRandomQuestionSetQuestionCollection
13
{
17
protected
$applicantId
;
18
22
protected
$requiredAmount
;
23
27
public
function
getApplicantId
()
28
{
29
return
$this->applicantId
;
30
}
31
35
public
function
setApplicantId
(
$applicantId
)
36
{
37
$this->applicantId =
$applicantId
;
38
}
39
43
public
function
getRequiredAmount
()
44
{
45
return
$this->requiredAmount
;
46
}
47
51
public
function
setRequiredAmount
(
$requiredAmount
)
52
{
53
$this->requiredAmount =
$requiredAmount
;
54
}
55
56
/*
57
* returns the fact if required amount is still positive
58
*/
59
public
function
hasRequiredAmountLeft
()
60
{
61
return
$this->
getRequiredAmount
() > 0;
62
}
63
67
public
function
decrementRequiredAmount
()
68
{
69
$this->
setRequiredAmount
($this->
getRequiredAmount
() - 1);
70
}
71
75
public
function
hasQuestion
($questionId)
76
{
77
return
$this->
getQuestion
($questionId) !== null;
78
}
79
83
public
function
getQuestion
($questionId)
84
{
85
foreach
($this as $question) {
86
if
($question->getQuestionId() != $questionId) {
87
continue
;
88
}
89
90
return
$question;
91
}
92
93
return
null;
94
}
95
}
ilTestRandomQuestionCollectionSubsetApplication\getQuestion
getQuestion($questionId)
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:83
ilTestRandomQuestionSetQuestionCollection
Definition:
class.ilTestRandomQuestionSetQuestionCollection.php:13
ilTestRandomQuestionCollectionSubsetApplication\setRequiredAmount
setRequiredAmount($requiredAmount)
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:51
ilTestRandomQuestionCollectionSubsetApplication\getRequiredAmount
getRequiredAmount()
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:43
ilTestRandomQuestionCollectionSubsetApplication\decrementRequiredAmount
decrementRequiredAmount()
decrements the amount required by applicant
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:67
ilTestRandomQuestionCollectionSubsetApplication\$requiredAmount
$requiredAmount
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:22
ilTestRandomQuestionCollectionSubsetApplication\hasQuestion
hasQuestion($questionId)
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:75
ilTestRandomQuestionCollectionSubsetApplication
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:12
ilTestRandomQuestionCollectionSubsetApplication\$applicantId
$applicantId
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:17
ilTestRandomQuestionCollectionSubsetApplication\hasRequiredAmountLeft
hasRequiredAmountLeft()
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:59
ilTestRandomQuestionCollectionSubsetApplication\setApplicantId
setApplicantId($applicantId)
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:35
ilTestRandomQuestionCollectionSubsetApplication\getApplicantId
getApplicantId()
Definition:
class.ilTestRandomQuestionCollectionSubsetApplication.php:27
Modules
Test
classes
class.ilTestRandomQuestionCollectionSubsetApplication.php
Generated on Sat Jan 18 2025 19:01:22 for ILIAS by
1.8.13 (using
Doxyfile
)