ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ ilDoc Overview
class.assFormulaQuestionUnitCategory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
26
class
assFormulaQuestionUnitCategory
27
{
28
private
int
$id
= 0;
29
private
string
$category
=
''
;
30
private
int
$question_fi
= 0;
31
32
public
function
initFormArray
(array
$data
): void
33
{
34
$this->
id
= (
int
) $data[
'category_id'
];
35
$this->category =
$data
[
'category'
];
36
$this->question_fi = (
int
)
$data
[
'question_fi'
];
37
}
38
39
public
function
setId
(
int
$id
): void
40
{
41
$this->
id
=
$id
;
42
}
43
44
public
function
getId
():
int
45
{
46
return
$this->id
;
47
}
48
49
public
function
setCategory
(
string
$category): void
50
{
51
$this->category =
$category
;
52
}
53
54
public
function
getCategory
(): string
55
{
56
return
$this->category
;
57
}
58
59
public
function
getSanitizedCategory
(): string
60
{
61
return
$this->
sanitizeString
($this->
getCategory
());
62
}
63
64
public
function
setQuestionFi
(
int
$question_fi): void
65
{
66
$this->question_fi =
$question_fi
;
67
}
68
69
public
function
getQuestionFi
():
int
70
{
71
return
$this->question_fi
;
72
}
73
74
public
function
getDisplayString
(): string
75
{
76
global
$DIC
;
77
78
$category
= $this->
getCategory
();
79
$txt =
$DIC
->language()->txt(
"qpl_qst_formulaquestion_{$category}"
);
80
return
strcmp(
"-qpl_qst_formulaquestion_{$category}-"
, $txt) !== 0
81
? $this->
sanitizeString
($txt)
82
: $this->
getSanitizedCategory
();
83
}
84
85
private
function
sanitizeString
(
string
$string): string
86
{
87
return
htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE,
'utf-8'
);
88
}
89
}
assFormulaQuestionUnitCategory
Formula Question Unit Category.
Definition:
class.assFormulaQuestionUnitCategory.php:27
assFormulaQuestionUnitCategory\sanitizeString
sanitizeString(string $string)
Definition:
class.assFormulaQuestionUnitCategory.php:85
assFormulaQuestionUnitCategory\$question_fi
int $question_fi
Definition:
class.assFormulaQuestionUnitCategory.php:30
assFormulaQuestionUnitCategory\initFormArray
initFormArray(array $data)
Definition:
class.assFormulaQuestionUnitCategory.php:32
assFormulaQuestionUnitCategory\$id
int $id
Definition:
class.assFormulaQuestionUnitCategory.php:28
assFormulaQuestionUnitCategory\setId
setId(int $id)
Definition:
class.assFormulaQuestionUnitCategory.php:39
assFormulaQuestionUnitCategory\getDisplayString
getDisplayString()
Definition:
class.assFormulaQuestionUnitCategory.php:74
assFormulaQuestionUnitCategory\getCategory
getCategory()
Definition:
class.assFormulaQuestionUnitCategory.php:54
assFormulaQuestionUnitCategory\setCategory
setCategory(string $category)
Definition:
class.assFormulaQuestionUnitCategory.php:49
assFormulaQuestionUnitCategory\$category
string $category
Definition:
class.assFormulaQuestionUnitCategory.php:29
assFormulaQuestionUnitCategory\getSanitizedCategory
getSanitizedCategory()
Definition:
class.assFormulaQuestionUnitCategory.php:59
assFormulaQuestionUnitCategory\getId
getId()
Definition:
class.assFormulaQuestionUnitCategory.php:44
assFormulaQuestionUnitCategory\setQuestionFi
setQuestionFi(int $question_fi)
Definition:
class.assFormulaQuestionUnitCategory.php:64
assFormulaQuestionUnitCategory\getQuestionFi
getQuestionFi()
Definition:
class.assFormulaQuestionUnitCategory.php:69
$data
$data
Definition:
ltiregistration.php:29
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
TestQuestionPool
classes
class.assFormulaQuestionUnitCategory.php
Generated on Sat Dec 13 2025 23:03:50 for ILIAS by
1.9.4 (using
Doxyfile
)