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

Public Member Functions

 load (int $questionId)
 
 current ()
 
 next ()
 
 key ()
 
 valid ()
 
 rewind ()
 

Protected Member Functions

 add (ilAssSpecificFeedbackIdentifier $identifier)
 
 getSpecificFeedbackTableName ()
 

Protected Attributes

array $map = array()
 

Detailed Description

Member Function Documentation

◆ add()

ilAssSpecificFeedbackIdentifierList::add ( ilAssSpecificFeedbackIdentifier  $identifier)
protected

Definition at line 34 of file class.ilAssSpecificFeedbackIdentifierList.php.

34 : void
35 {
36 $this->map[] = $identifier;
37 }

Referenced by load().

+ Here is the caller graph for this function:

◆ current()

ilAssSpecificFeedbackIdentifierList::current ( )
Returns
false|ilAssSpecificFeedbackIdentifier

Definition at line 64 of file class.ilAssSpecificFeedbackIdentifierList.php.

References current().

Referenced by current().

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

◆ getSpecificFeedbackTableName()

ilAssSpecificFeedbackIdentifierList::getSpecificFeedbackTableName ( )
protected

Definition at line 92 of file class.ilAssSpecificFeedbackIdentifierList.php.

92 : string
93 {
94 require_once 'Modules/TestQuestionPool/classes/feedback/class.ilAssClozeTestFeedback.php';
96 }
const TABLE_NAME_SPECIFIC_FEEDBACK
table name for specific feedback

References ilAssMultiOptionQuestionFeedback\TABLE_NAME_SPECIFIC_FEEDBACK.

◆ key()

ilAssSpecificFeedbackIdentifierList::key ( )
Returns
int|null|string

Definition at line 76 of file class.ilAssSpecificFeedbackIdentifierList.php.

References key().

Referenced by key(), and valid().

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

◆ load()

ilAssSpecificFeedbackIdentifierList::load ( int  $questionId)

Definition at line 39 of file class.ilAssSpecificFeedbackIdentifierList.php.

39 : void
40 {
41 global $DIC; /* @var ILIAS\DI\Container $DIC */
42
43 $res = $DIC->database()->queryF(
44 "SELECT feedback_id, question, answer FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
45 array('integer'),
46 array($questionId)
47 );
48
49 while ($row = $DIC->database()->fetchAssoc($res)) {
50 $identifier = new ilAssSpecificFeedbackIdentifier();
51
52 $identifier->setQuestionId($questionId);
53
54 $identifier->setQuestionIndex($row['question']);
55 $identifier->setAnswerIndex($row['answer']);
56
57 $identifier->setFeedbackId($row['feedback_id']);
58
59 $this->add($identifier);
60 }
61 }
add(ilAssSpecificFeedbackIdentifier $identifier)
global $DIC
Definition: feed.php:28
$res
Definition: ltiservices.php:69

References $DIC, $res, and add().

+ Here is the call graph for this function:

◆ next()

ilAssSpecificFeedbackIdentifierList::next ( )
Returns
false|ilAssSpecificFeedbackIdentifier

Definition at line 70 of file class.ilAssSpecificFeedbackIdentifierList.php.

References next().

Referenced by next().

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

◆ rewind()

ilAssSpecificFeedbackIdentifierList::rewind ( )
Returns
false|ilAssSpecificFeedbackIdentifier

Definition at line 87 of file class.ilAssSpecificFeedbackIdentifierList.php.

88 {
89 return reset($this->map);
90 }

◆ valid()

ilAssSpecificFeedbackIdentifierList::valid ( )

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

81 : bool
82 {
83 return key($this->map) !== null;
84 }

References key().

+ Here is the call graph for this function:

Field Documentation

◆ $map

array ilAssSpecificFeedbackIdentifierList::$map = array()
protected

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