ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilAssQuestionSolutionComparisonExpressionList.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/TestQuestionPool/classes/class.ilAssQuestionSolutionComparisonExpression.php'
;
5
12
class
ilAssQuestionSolutionComparisonExpressionList
13
{
17
protected
$db
;
18
22
private
$questionId
;
23
27
private
$skillBaseId
;
28
32
private
$skillTrefId
;
33
37
private
$expressions
;
38
42
public
function
__construct
(
ilDBInterface
$db
)
43
{
44
$this->db =
$db
;
45
46
$this->questionId = null;
47
$this->skillBaseId = null;
48
$this->skillTrefId = null;
49
50
$this->expressions = array();
51
}
52
53
public
function
load
()
54
{
55
$query
=
"
56
SELECT *
57
FROM qpl_qst_skl_sol_expr
58
WHERE question_fi = %s AND skill_base_fi = %s AND skill_tref_fi = %s
59
"
;
60
61
$res
= $this->db->queryF(
62
$query
,
63
array(
'integer'
,
'integer'
,
'integer'
),
64
array($this->
getQuestionId
(), $this->
getSkillBaseId
(), $this->
getSkillTrefId
())
65
);
66
67
while
(
$row
= $this->db->fetchAssoc(
$res
)) {
68
$expression =
new
ilAssQuestionSolutionComparisonExpression
();
69
$expression->setDb($this->db);
70
$expression->initInstanceFromArray(
$row
);
71
72
$this->
add
($expression);
73
}
74
}
75
76
public
function
save
()
77
{
78
$this->
delete
();
79
80
foreach
($this->expressions as $orderIndex => $expression) {
81
/* @var ilAssQuestionSolutionComparisonExpression $expression */
82
83
$expression->setQuestionId($this->
getQuestionId
());
84
$expression->save();
85
}
86
}
87
88
public
function
delete
()
89
{
90
$query
=
"
91
DELETE FROM qpl_qst_skl_sol_expr
92
WHERE question_fi = %s AND skill_base_fi = %s AND skill_tref_fi = %s
93
"
;
94
95
$this->db->manipulateF(
96
$query
,
97
array(
'integer'
,
'integer'
,
'integer'
),
98
array($this->
getQuestionId
(), $this->
getSkillBaseId
(), $this->
getSkillTrefId
())
99
);
100
}
101
102
public
function
add
(
ilAssQuestionSolutionComparisonExpression
$expression)
103
{
104
$expression->
setDb
($this->db);
105
$expression->
setQuestionId
($this->
getQuestionId
());
106
$expression->
setSkillBaseId
($this->
getSkillBaseId
());
107
$expression->
setSkillTrefId
($this->
getSkillTrefId
());
108
109
$this->expressions[$expression->
getOrderIndex
()] = $expression;
110
}
111
112
public
function
get
()
113
{
114
return
$this->expressions
;
115
}
116
117
public
function
reset
()
118
{
119
$this->expressions = array();
120
}
121
125
public
function
getQuestionId
()
126
{
127
return
$this->questionId
;
128
}
129
133
public
function
setQuestionId
(
$questionId
)
134
{
135
$this->questionId =
$questionId
;
136
}
137
141
public
function
getSkillBaseId
()
142
{
143
return
$this->skillBaseId
;
144
}
145
149
public
function
setSkillBaseId
(
$skillBaseId
)
150
{
151
$this->skillBaseId =
$skillBaseId
;
152
}
153
157
public
function
getSkillTrefId
()
158
{
159
return
$this->skillTrefId
;
160
}
161
165
public
function
setSkillTrefId
(
$skillTrefId
)
166
{
167
$this->skillTrefId =
$skillTrefId
;
168
}
169
}
ilAssQuestionSolutionComparisonExpressionList\getSkillTrefId
getSkillTrefId()
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:157
ilAssQuestionSolutionComparisonExpressionList\reset
reset()
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:117
ilAssQuestionSolutionComparisonExpression\setDb
setDb($db)
Definition:
class.ilAssQuestionSolutionComparisonExpression.php:89
ilAssQuestionSolutionComparisonExpressionList\setSkillTrefId
setSkillTrefId($skillTrefId)
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:165
ilAssQuestionSolutionComparisonExpression\getOrderIndex
getOrderIndex()
Definition:
class.ilAssQuestionSolutionComparisonExpression.php:145
ilAssQuestionSolutionComparisonExpression
Definition:
class.ilAssQuestionSolutionComparisonExpression.php:11
ilAssQuestionSolutionComparisonExpression\setSkillBaseId
setSkillBaseId($skillBaseId)
Definition:
class.ilAssQuestionSolutionComparisonExpression.php:121
ilAssQuestionSolutionComparisonExpression\setSkillTrefId
setSkillTrefId($skillTrefId)
Definition:
class.ilAssQuestionSolutionComparisonExpression.php:137
ilAssQuestionSolutionComparisonExpressionList\$db
$db
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:17
ilAssQuestionSolutionComparisonExpressionList\add
add(ilAssQuestionSolutionComparisonExpression $expression)
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:102
ilAssQuestionSolutionComparisonExpressionList\load
load()
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:53
ilAssQuestionSolutionComparisonExpressionList
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:12
ilAssQuestionSolutionComparisonExpressionList\getSkillBaseId
getSkillBaseId()
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:141
ilAssQuestionSolutionComparisonExpressionList\getQuestionId
getQuestionId()
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:125
ilAssQuestionSolutionComparisonExpressionList\setSkillBaseId
setSkillBaseId($skillBaseId)
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:149
ilAssQuestionSolutionComparisonExpression\setQuestionId
setQuestionId($questionId)
Definition:
class.ilAssQuestionSolutionComparisonExpression.php:105
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilAssQuestionSolutionComparisonExpressionList\setQuestionId
setQuestionId($questionId)
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:133
ilDBInterface
ilAssQuestionSolutionComparisonExpressionList\$skillBaseId
$skillBaseId
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:27
$query
$query
Definition:
proxy_ylocal.php:13
ilAssQuestionSolutionComparisonExpressionList\save
save()
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:76
$row
$row
Definition:
migrateto20.php:360
ilAssQuestionSolutionComparisonExpressionList\$expressions
$expressions
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:37
ilAssQuestionSolutionComparisonExpressionList\__construct
__construct(ilDBInterface $db)
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:42
php
ilAssQuestionSolutionComparisonExpressionList\$questionId
$questionId
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:22
ilAssQuestionSolutionComparisonExpressionList\$skillTrefId
$skillTrefId
Definition:
class.ilAssQuestionSolutionComparisonExpressionList.php:32
Modules
TestQuestionPool
classes
class.ilAssQuestionSolutionComparisonExpressionList.php
Generated on Thu Jan 30 2025 19:01:48 for ILIAS by
1.8.13 (using
Doxyfile
)