ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 = []
 

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 ( )

Definition at line 63 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

◆ key()

ilAssSpecificFeedbackIdentifierList::key ( )

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

73 : ?int
74 {
75 return key($this->map);
76 }

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 ['integer'],
46 [$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)
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

◆ next()

ilAssSpecificFeedbackIdentifierList::next ( )

Definition at line 68 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 ( )

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

83 : void
84 {
85 reset($this->map);
86 }

◆ valid()

ilAssSpecificFeedbackIdentifierList::valid ( )

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

78 : bool
79 {
80 return key($this->map) !== null;
81 }

References key().

+ Here is the call graph for this function:

Field Documentation

◆ $map

array ilAssSpecificFeedbackIdentifierList::$map = []
protected

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