ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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  {
35  $handledSourcePoolDefinitions = array_flip($this->questionsSourcePoolDefinitionMap);
36 
37  $testSequence = $this->getTestSequence($activeId, $pass);
38 
39  foreach($testSequence->getOrderedSequenceQuestions() as $questionId)
40  {
41  $definitionId = $testSequence->getResponsibleSourcePoolDefinitionId($questionId);
42 
43  if( isset($handledSourcePoolDefinitions[$definitionId]) )
44  {
45  continue;
46  }
47 
48  if($this->wasAnsweredInThisPass($testSequence, $questionId))
49  {
50  $this->questionsPassMap[$questionId] = $pass;
51 
52  $this->questionsSourcePoolDefinitionMap[$questionId] = $definitionId;
53  }
54  }
55  }
56  }
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: