ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

Referenced by load().

34  : void
35  {
36  $this->map[] = $identifier;
37  }
+ Here is the caller graph for this function:

◆ current()

◆ getSpecificFeedbackTableName()

ilAssSpecificFeedbackIdentifierList::getSpecificFeedbackTableName ( )
protected

◆ key()

ilAssSpecificFeedbackIdentifierList::key ( )

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

Referenced by valid().

73  : ?int
74  {
75  return key($this->map);
76  }
+ Here is the caller graph for this function:

◆ load()

ilAssSpecificFeedbackIdentifierList::load ( int  $questionId)

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

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

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  }
$res
Definition: ltiservices.php:66
add(ilAssSpecificFeedbackIdentifier $identifier)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ next()

ilAssSpecificFeedbackIdentifierList::next ( )

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

68  : void
69  {
70  next($this->map);
71  }

◆ 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.

References key(), and null.

78  : bool
79  {
80  return key($this->map) !== null;
81  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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: