ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestSequenceFactory Class Reference
+ Collaboration diagram for ilTestSequenceFactory:

Public Member Functions

 __construct (ilDB $db, ilLanguage $lng, ilPluginAdmin $pluginAdmin, ilObjTest $testOBJ)
 constructor
 getSequence ($testSession)
 creates and returns an instance of a test sequence that corresponds to the current test mode and the pass stored in test session
 getSequenceByPass ($testSession, $pass)
 creates and returns an instance of a test sequence that corresponds to the current test mode and given pass

Private Attributes

 $testSequence = null
 $db = null
 $lng = null
 $pluginAdmin = null
 $testOBJ = null

Detailed Description

Definition at line 12 of file class.ilTestSequenceFactory.php.

Constructor & Destructor Documentation

ilTestSequenceFactory::__construct ( ilDB  $db,
ilLanguage  $lng,
ilPluginAdmin  $pluginAdmin,
ilObjTest  $testOBJ 
)

constructor

Parameters
ilObjTest$testOBJ

Definition at line 54 of file class.ilTestSequenceFactory.php.

References $db, $lng, $pluginAdmin, and $testOBJ.

{
$this->db = $db;
$this->lng = $lng;
$this->pluginAdmin = $pluginAdmin;
$this->testOBJ = $testOBJ;
}

Member Function Documentation

ilTestSequenceFactory::getSequence (   $testSession)

creates and returns an instance of a test sequence that corresponds to the current test mode and the pass stored in test session

Parameters
ilTestSession | ilTestSessionDynamicQuestionSet$testSession
Returns
ilTestSequence|ilTestSequenceDynamicQuestionSet

Definition at line 69 of file class.ilTestSequenceFactory.php.

References getSequenceByPass().

{
return $this->getSequenceByPass($testSession, $testSession->getPass());
}

+ Here is the call graph for this function:

ilTestSequenceFactory::getSequenceByPass (   $testSession,
  $pass 
)

creates and returns an instance of a test sequence that corresponds to the current test mode and given pass

Parameters
ilTestSession | ilTestSessionDynamicQuestionSet$testSession
integer$pass
Returns
ilTestSequence|ilTestSequenceDynamicQuestionSet

Definition at line 82 of file class.ilTestSequenceFactory.php.

References $pass, $testSequence, ilObjTest\QUESTION_SET_TYPE_DYNAMIC, ilObjTest\QUESTION_SET_TYPE_FIXED, and ilObjTest\QUESTION_SET_TYPE_RANDOM.

Referenced by getSequence().

{
if($this->testSequence === null)
{
switch( $this->testOBJ->getQuestionSetType() )
{
require_once 'Modules/Test/classes/class.ilTestSequenceFixedQuestionSet.php';
$this->testSequence = new ilTestSequenceFixedQuestionSet(
$testSession->getActiveId(), $pass, $this->testOBJ->isRandomTest()
);
break;
require_once 'Modules/Test/classes/class.ilTestSequenceRandomQuestionSet.php';
$this->testSequence = new ilTestSequenceRandomQuestionSet(
$testSession->getActiveId(), $pass, $this->testOBJ->isRandomTest()
);
break;
require_once 'Modules/Test/classes/class.ilTestSequenceDynamicQuestionSet.php';
require_once 'Modules/Test/classes/class.ilTestDynamicQuestionSet.php';
$questionSet = new ilTestDynamicQuestionSet(
$this->db, $this->lng, $this->pluginAdmin, $this->testOBJ
);
$this->testSequence = new ilTestSequenceDynamicQuestionSet(
$this->db, $questionSet, $testSession->getActiveId()
);
#$this->testSequence->setPreventCheckedQuestionsFromComingUpEnabled(
# $this->testOBJ->isInstantFeedbackAnswerFixationEnabled()
#); // checked questions now has to come up any time, so they can be set to unchecked right at this moment
break;
}
}
}

+ Here is the caller graph for this function:

Field Documentation

ilTestSequenceFactory::$db = null
private

Definition at line 26 of file class.ilTestSequenceFactory.php.

Referenced by __construct().

ilTestSequenceFactory::$lng = null
private

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

Referenced by __construct().

ilTestSequenceFactory::$pluginAdmin = null
private

Definition at line 40 of file class.ilTestSequenceFactory.php.

Referenced by __construct().

ilTestSequenceFactory::$testOBJ = null
private

Definition at line 47 of file class.ilTestSequenceFactory.php.

Referenced by __construct().

ilTestSequenceFactory::$testSequence = null
private

Definition at line 19 of file class.ilTestSequenceFactory.php.

Referenced by getSequenceByPass().


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