ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTestVirtualSequenceRandomQuestionSet Class Reference
+ Inheritance diagram for ilTestVirtualSequenceRandomQuestionSet:
+ Collaboration diagram for ilTestVirtualSequenceRandomQuestionSet:

Public Member Functions

 __construct (ilDBInterface $db, ilObjTest $testOBJ, ilTestSequenceFactory $testSequenceFactory)
 
 getResponsibleSourcePoolDefinitionId ($questionId)
 
- Public Member Functions inherited from ilTestVirtualSequence
 __construct (ilDBInterface $db, ilObjTest $testOBJ, ilTestSequenceFactory $testSequenceFactory)
 
 getActiveId ()
 
 setActiveId ($activeId)
 
 getQuestionIds ()
 
 getQuestionsPassMap ()
 
 getUniquePasses ()
 
 init ()
 

Protected Member Functions

 fetchQuestionsFromPasses ($activeId, $passes)
 
- Protected Member Functions inherited from ilTestVirtualSequence
 getTestSequence ($activeId, $pass)
 
 wasAnsweredInThisPass (ilTestSequence $testSequence, $questionId)
 
 fetchQuestionsFromPasses ($activeId, $passes)
 

Private Attributes

 $questionsSourcePoolDefinitionMap
 

Additional Inherited Members

- Protected Attributes inherited from ilTestVirtualSequence
 $db
 
 $testOBJ
 
 $testSequenceFactory
 
 $activeId
 
 $questionsPassMap
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTestVirtualSequenceRandomQuestionSet::__construct ( ilDBInterface  $db,
ilObjTest  $testOBJ,
ilTestSequenceFactory  $testSequenceFactory 
)

Definition at line 17 of file class.ilTestVirtualSequenceRandomQuestionSet.php.

References array.

18  {
19  parent::__construct($db, $testOBJ, $testSequenceFactory);
20 
21  $this->questionsSourcePoolDefinitionMap = array();
22  }
Create styles array
The data for the language used.

Member Function Documentation

◆ fetchQuestionsFromPasses()

ilTestVirtualSequenceRandomQuestionSet::fetchQuestionsFromPasses (   $activeId,
  $passes 
)
protected

Definition at line 29 of file class.ilTestVirtualSequenceRandomQuestionSet.php.

References ilTestVirtualSequence\$activeId, $pass, array, ilTestVirtualSequence\getTestSequence(), and ilTestVirtualSequence\wasAnsweredInThisPass().

30  {
31  $this->questionsPassMap = array();
32 
33  foreach ($passes as $pass) {
34  $handledSourcePoolDefinitions = array_flip($this->questionsSourcePoolDefinitionMap);
35 
36  $testSequence = $this->getTestSequence($activeId, $pass);
37 
38  foreach ($testSequence->getOrderedSequenceQuestions() as $questionId) {
39  $definitionId = $testSequence->getResponsibleSourcePoolDefinitionId($questionId);
40 
41  if (isset($handledSourcePoolDefinitions[$definitionId])) {
42  continue;
43  }
44 
45  if ($this->wasAnsweredInThisPass($testSequence, $questionId)) {
46  $this->questionsPassMap[$questionId] = $pass;
47 
48  $this->questionsSourcePoolDefinitionMap[$questionId] = $definitionId;
49  }
50  }
51  }
52  }
Create styles array
The data for the language used.
wasAnsweredInThisPass(ilTestSequence $testSequence, $questionId)
+ Here is the call graph for this function:

◆ getResponsibleSourcePoolDefinitionId()

ilTestVirtualSequenceRandomQuestionSet::getResponsibleSourcePoolDefinitionId (   $questionId)

Implements ilTestRandomQuestionSequence.

Definition at line 24 of file class.ilTestVirtualSequenceRandomQuestionSet.php.

25  {
26  return $this->questionsSourcePoolDefinitionMap[$questionId];
27  }

Field Documentation

◆ $questionsSourcePoolDefinitionMap

ilTestVirtualSequenceRandomQuestionSet::$questionsSourcePoolDefinitionMap
private

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