ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAssSpecificFeedbackIdentifierList Class Reference
+ Inheritance diagram for ilAssSpecificFeedbackIdentifierList:
+ Collaboration diagram for ilAssSpecificFeedbackIdentifierList:

Public Member Functions

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

Protected Member Functions

 add (ilAssSpecificFeedbackIdentifier $identifier)
 
 getSpecificFeedbackTableName ()
 

Protected Attributes

 $map = array()
 

Detailed Description

Member Function Documentation

◆ add()

ilAssSpecificFeedbackIdentifierList::add ( ilAssSpecificFeedbackIdentifier  $identifier)
protected
Parameters
ilAssSpecificFeedbackIdentifier$identifier

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

26 {
27 $this->map[] = $identifier;
28 }

Referenced by load().

+ Here is the caller graph for this function:

◆ current()

ilAssSpecificFeedbackIdentifierList::current ( )
Returns
ilAssSpecificFeedbackIdentifier

Definition at line 62 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 99 of file class.ilAssSpecificFeedbackIdentifierList.php.

100 {
101 require_once 'Modules/TestQuestionPool/classes/feedback/class.ilAssClozeTestFeedback.php';
103 }
const TABLE_NAME_SPECIFIC_FEEDBACK
table name for specific feedback

References ilAssMultiOptionQuestionFeedback\TABLE_NAME_SPECIFIC_FEEDBACK.

◆ key()

ilAssSpecificFeedbackIdentifierList::key ( )
Returns
integer|null

Definition at line 78 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 (   $questionId)
Parameters
integer$questionId

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

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 }
add(ilAssSpecificFeedbackIdentifier $identifier)
$row
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res

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

+ Here is the call graph for this function:

◆ next()

ilAssSpecificFeedbackIdentifierList::next ( )
Returns
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
ilAssSpecificFeedbackIdentifier

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

95 {
96 return reset($this->map);
97 }

◆ valid()

ilAssSpecificFeedbackIdentifierList::valid ( )
Returns
bool

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

87 {
88 return key($this->map) !== null;
89 }

References key().

+ Here is the call graph for this function:

Field Documentation

◆ $map

ilAssSpecificFeedbackIdentifierList::$map = array()
protected

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