ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilAssSpecificFeedbackIdentifierList.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssSpecificFeedbackIdentifier.php'
;
6
15
class
ilAssSpecificFeedbackIdentifierList
implements
Iterator
16
{
20
protected
$map
= array();
21
25
protected
function
add
(
ilAssSpecificFeedbackIdentifier
$identifier)
26
{
27
$this->map[] = $identifier;
28
}
29
33
public
function
load
($questionId)
34
{
35
global
$DIC
;
/* @var ILIAS\DI\Container $DIC */
36
37
$res
= $DIC->database()->queryF(
38
"SELECT feedback_id, question, answer FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s"
,
39
array(
'integer'
),
40
array($questionId)
41
);
42
43
$feedbackIdByAnswerIndexMap = array();
44
45
while
(
$row
= $DIC->database()->fetchAssoc(
$res
)) {
46
$identifier =
new
ilAssSpecificFeedbackIdentifier
();
47
48
$identifier->setQuestionId($questionId);
49
50
$identifier->setQuestionIndex(
$row
[
'question'
]);
51
$identifier->setAnswerIndex(
$row
[
'answer'
]);
52
53
$identifier->setFeedbackId(
$row
[
'feedback_id'
]);
54
55
$this->
add
($identifier);
56
}
57
}
58
62
public
function
current
()
63
{
64
return
current
($this->map);
65
}
66
70
public
function
next
()
71
{
72
return
next
($this->map);
73
}
74
78
public
function
key
()
79
{
80
return
key
($this->map);
81
}
82
86
public
function
valid
()
87
{
88
return
key
($this->map) !== null;
89
}
90
94
public
function
rewind
()
95
{
96
return
reset($this->map);
97
}
98
99
protected
function
getSpecificFeedbackTableName
()
100
{
101
require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssClozeTestFeedback.php'
;
102
return
ilAssClozeTestFeedback::TABLE_NAME_SPECIFIC_FEEDBACK
;
103
}
104
}
ilAssSpecificFeedbackIdentifierList\$map
$map
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:20
ilAssSpecificFeedbackIdentifierList\load
load($questionId)
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:33
ilAssSpecificFeedbackIdentifierList\add
add(ilAssSpecificFeedbackIdentifier $identifier)
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:25
$DIC
global $DIC
Definition:
saml.php:7
ilAssMultiOptionQuestionFeedback\TABLE_NAME_SPECIFIC_FEEDBACK
const TABLE_NAME_SPECIFIC_FEEDBACK
table name for specific feedback
Definition:
class.ilAssMultiOptionQuestionFeedback.php:22
ilAssSpecificFeedbackIdentifierList\next
next()
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:70
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilAssSpecificFeedbackIdentifierList\getSpecificFeedbackTableName
getSpecificFeedbackTableName()
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:99
ilAssSpecificFeedbackIdentifier
Definition:
class.ilAssSpecificFeedbackIdentifier.php:13
$row
$row
Definition:
migrateto20.php:360
ilAssSpecificFeedbackIdentifierList\rewind
rewind()
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:94
ilAssSpecificFeedbackIdentifierList
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:15
ilAssSpecificFeedbackIdentifierList\current
current()
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:62
php
ilAssSpecificFeedbackIdentifierList\valid
valid()
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:86
Iterator
ilAssSpecificFeedbackIdentifierList\key
key()
Definition:
class.ilAssSpecificFeedbackIdentifierList.php:78
Modules
TestQuestionPool
classes
feedback
class.ilAssSpecificFeedbackIdentifierList.php
Generated on Thu Jan 16 2025 19:02:13 for ILIAS by
1.8.13 (using
Doxyfile
)