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

Public Member Functions

 __construct (ilDB $db)
 isAssessmentLogEnabled ()
 setAssessmentLogEnabled ($assessmentLogEnabled)
 requestUserSolutionUpdateLock ()
 releaseUserSolutionUpdateLock ()
 requestUserQuestionResultUpdateLock ()
 releaseUserQuestionResultUpdateLock ()
 requestUserPassResultUpdateLock ()
 releaseUserPassResultUpdateLock ()
 requestUserTestResultUpdateLock ()
 releaseUserTestResultUpdateLock ()
- Public Member Functions inherited from ilAssQuestionProcessLocker
 requestPersistWorkingStateLock ()
 releasePersistWorkingStateLock ()

Protected Attributes

 $db

Private Member Functions

 getTablesUsedDuringAssessmentLog ()

Private Attributes

 $assessmentLogEnabled = false

Detailed Description

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

Constructor & Destructor Documentation

ilAssQuestionProcessLockerDb::__construct ( ilDB  $db)
Parameters
ilDB$db

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

References $db.

{
$this->db = $db;
}

Member Function Documentation

ilAssQuestionProcessLockerDb::getTablesUsedDuringAssessmentLog ( )
private

Definition at line 39 of file class.ilAssQuestionProcessLockerDb.php.

References ilDB\LOCK_WRITE.

Referenced by requestUserSolutionUpdateLock().

{
return array(
array('name' => 'qpl_questions', 'type' => ilDB::LOCK_WRITE),
array('name' => 'tst_tests', 'type' => ilDB::LOCK_WRITE),
array('name' => 'tst_active', 'type' => ilDB::LOCK_WRITE),
array('name' => 'ass_log', 'type' => ilDB::LOCK_WRITE),
array('name' => 'ass_log', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
);
}

+ Here is the caller graph for this function:

ilAssQuestionProcessLockerDb::isAssessmentLogEnabled ( )

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

References $assessmentLogEnabled.

Referenced by requestUserSolutionUpdateLock().

+ Here is the caller graph for this function:

ilAssQuestionProcessLockerDb::releaseUserPassResultUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

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

{
// no lock neccessary, because a single replace query is used
//$this->db->unlockTables();
}
ilAssQuestionProcessLockerDb::releaseUserQuestionResultUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

Definition at line 78 of file class.ilAssQuestionProcessLockerDb.php.

{
$this->db->unlockTables();
}
ilAssQuestionProcessLockerDb::releaseUserSolutionUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

Definition at line 65 of file class.ilAssQuestionProcessLockerDb.php.

{
$this->db->unlockTables();
}
ilAssQuestionProcessLockerDb::releaseUserTestResultUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

Definition at line 106 of file class.ilAssQuestionProcessLockerDb.php.

{
$this->db->unlockTables();
}
ilAssQuestionProcessLockerDb::requestUserPassResultUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

Definition at line 83 of file class.ilAssQuestionProcessLockerDb.php.

{
// no lock neccessary, because a single replace query is used
//$this->db->lockTables(array(
// array('name' => 'tst_pass_result', 'type' => ilDB::LOCK_WRITE)
//));
}
ilAssQuestionProcessLockerDb::requestUserQuestionResultUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

Definition at line 70 of file class.ilAssQuestionProcessLockerDb.php.

References ilDB\LOCK_WRITE.

{
$this->db->lockTables(array(
array('name' => 'tst_test_result', 'type' => ilDB::LOCK_WRITE),
array('name' => 'tst_test_result', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
));
}
ilAssQuestionProcessLockerDb::requestUserSolutionUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

Definition at line 50 of file class.ilAssQuestionProcessLockerDb.php.

References getTablesUsedDuringAssessmentLog(), isAssessmentLogEnabled(), and ilDB\LOCK_WRITE.

{
$tables = array(
array('name' => 'tst_solutions', 'type' => ilDB::LOCK_WRITE),
array('name' => 'tst_solutions', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
);
if( $this->isAssessmentLogEnabled() )
{
$tables = array_merge($tables, $this->getTablesUsedDuringAssessmentLog());
}
$this->db->lockTables($tables);
}

+ Here is the call graph for this function:

ilAssQuestionProcessLockerDb::requestUserTestResultUpdateLock ( )

Reimplemented from ilAssQuestionProcessLocker.

Definition at line 99 of file class.ilAssQuestionProcessLockerDb.php.

References ilDB\LOCK_WRITE.

{
$this->db->lockTables(array(
array('name' => 'tst_result_cache', 'type' => ilDB::LOCK_WRITE)
));
}
ilAssQuestionProcessLockerDb::setAssessmentLogEnabled (   $assessmentLogEnabled)

Definition at line 34 of file class.ilAssQuestionProcessLockerDb.php.

References $assessmentLogEnabled.

{
$this->assessmentLogEnabled = $assessmentLogEnabled;
}

Field Documentation

ilAssQuestionProcessLockerDb::$assessmentLogEnabled = false
private
ilAssQuestionProcessLockerDb::$db
protected

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

Referenced by __construct().


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