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

Public Member Functions

 __construct (ilSetting $settings, ilDB $db)
 setQuestionId ($questionId)
 getQuestionId ()
 setUserId ($userId)
 getUserId ()
 setAssessmentLogEnabled ($assessmentLogEnabled)
 isAssessmentLogEnabled ()
 getLocker ()

Protected Attributes

 $settings
 $db
 $questionId
 $userId
 $assessmentLogEnabled

Private Member Functions

 getLockModeSettingValue ()

Detailed Description

Definition at line 16 of file class.ilAssQuestionProcessLockerFactory.php.

Constructor & Destructor Documentation

ilAssQuestionProcessLockerFactory::__construct ( ilSetting  $settings,
ilDB  $db 
)
Parameters
ilSetting$settings
ilDB$db

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

References $db, and $settings.

{
$this->settings = $settings;
$this->db = $db;
$this->questionId = null;
$this->userId = null;
$this->assessmentLogEnabled = false;
}

Member Function Documentation

ilAssQuestionProcessLockerFactory::getLocker ( )
Returns
ilAssQuestionProcessLockerDb|ilAssQuestionProcessLockerFile|ilAssQuestionProcessLockerNone

Definition at line 113 of file class.ilAssQuestionProcessLockerFactory.php.

References ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_DB, ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_FILE, ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE, getLockModeSettingValue(), getQuestionId(), getUserId(), and isAssessmentLogEnabled().

{
switch( $this->getLockModeSettingValue() )
{
break;
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionProcessLockFileStorage.php';
$storage = new ilAssQuestionProcessLockFileStorage($this->getQuestionId(), $this->getUserId());
$storage->create();
$locker = new ilAssQuestionProcessLockerFile($storage);
break;
$locker = new ilAssQuestionProcessLockerDb($this->db);
$locker->setAssessmentLogEnabled($this->isAssessmentLogEnabled());
break;
}
return $locker;
}

+ Here is the call graph for this function:

ilAssQuestionProcessLockerFactory::getLockModeSettingValue ( )
private

Definition at line 105 of file class.ilAssQuestionProcessLockerFactory.php.

References ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE.

Referenced by getLocker().

{
return $this->settings->get('ass_process_lock_mode', ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE);
}

+ Here is the caller graph for this function:

ilAssQuestionProcessLockerFactory::getQuestionId ( )
Returns
int

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

References $questionId.

Referenced by getLocker().

{
}

+ Here is the caller graph for this function:

ilAssQuestionProcessLockerFactory::getUserId ( )
Returns
int

Definition at line 84 of file class.ilAssQuestionProcessLockerFactory.php.

References $userId.

Referenced by getLocker().

{
return $this->userId;
}

+ Here is the caller graph for this function:

ilAssQuestionProcessLockerFactory::isAssessmentLogEnabled ( )
Returns
bool

Definition at line 100 of file class.ilAssQuestionProcessLockerFactory.php.

References $assessmentLogEnabled.

Referenced by getLocker().

+ Here is the caller graph for this function:

ilAssQuestionProcessLockerFactory::setAssessmentLogEnabled (   $assessmentLogEnabled)
Parameters
bool$assessmentLogEnabled

Definition at line 92 of file class.ilAssQuestionProcessLockerFactory.php.

References $assessmentLogEnabled.

{
$this->assessmentLogEnabled = $assessmentLogEnabled;
}
ilAssQuestionProcessLockerFactory::setQuestionId (   $questionId)
Parameters
int$questionId

Definition at line 60 of file class.ilAssQuestionProcessLockerFactory.php.

References $questionId.

{
$this->questionId = $questionId;
}
ilAssQuestionProcessLockerFactory::setUserId (   $userId)
Parameters
int$userId

Definition at line 76 of file class.ilAssQuestionProcessLockerFactory.php.

References $userId.

{
$this->userId = $userId;
}

Field Documentation

ilAssQuestionProcessLockerFactory::$assessmentLogEnabled
protected
ilAssQuestionProcessLockerFactory::$db
protected

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

Referenced by __construct().

ilAssQuestionProcessLockerFactory::$questionId
protected

Definition at line 31 of file class.ilAssQuestionProcessLockerFactory.php.

Referenced by getQuestionId(), and setQuestionId().

ilAssQuestionProcessLockerFactory::$settings
protected

Definition at line 21 of file class.ilAssQuestionProcessLockerFactory.php.

Referenced by __construct().

ilAssQuestionProcessLockerFactory::$userId
protected

Definition at line 36 of file class.ilAssQuestionProcessLockerFactory.php.

Referenced by getUserId(), and setUserId().


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