ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
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 ()
 
 requestUserSolutionUpdateLock ()
 
 releaseUserSolutionUpdateLock ()
 
 requestUserQuestionResultUpdateLock ()
 
 releaseUserQuestionResultUpdateLock ()
 
 requestUserPassResultUpdateLock ()
 
 releaseUserPassResultUpdateLock ()
 
 requestUserTestResultUpdateLock ()
 
 releaseUserTestResultUpdateLock ()
 

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

◆ __construct()

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

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

References $db.

Member Function Documentation

◆ getTablesUsedDuringAssessmentLog()

ilAssQuestionProcessLockerDb::getTablesUsedDuringAssessmentLog ( )
private

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

References ilDB\LOCK_WRITE.

Referenced by requestUserSolutionUpdateLock().

40  {
41  return array(
42  array('name' => 'qpl_questions', 'type' => ilDB::LOCK_WRITE),
43  array('name' => 'tst_tests', 'type' => ilDB::LOCK_WRITE),
44  array('name' => 'tst_active', 'type' => ilDB::LOCK_WRITE),
45  array('name' => 'ass_log', 'type' => ilDB::LOCK_WRITE),
46  array('name' => 'ass_log', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
47  );
48  }
const LOCK_WRITE
Definition: class.ilDB.php:30
+ Here is the caller graph for this function:

◆ isAssessmentLogEnabled()

ilAssQuestionProcessLockerDb::isAssessmentLogEnabled ( )

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

References $assessmentLogEnabled.

Referenced by requestUserSolutionUpdateLock().

+ Here is the caller graph for this function:

◆ releaseUserPassResultUpdateLock()

ilAssQuestionProcessLockerDb::releaseUserPassResultUpdateLock ( )

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

93  {
94  // no lock neccessary, because a single replace query is used
95 
96  //$this->db->unlockTables();
97  }

◆ releaseUserQuestionResultUpdateLock()

ilAssQuestionProcessLockerDb::releaseUserQuestionResultUpdateLock ( )

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

79  {
80  $this->db->unlockTables();
81  }

◆ releaseUserSolutionUpdateLock()

ilAssQuestionProcessLockerDb::releaseUserSolutionUpdateLock ( )

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

66  {
67  $this->db->unlockTables();
68  }

◆ releaseUserTestResultUpdateLock()

ilAssQuestionProcessLockerDb::releaseUserTestResultUpdateLock ( )

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

107  {
108  $this->db->unlockTables();
109  }

◆ requestUserPassResultUpdateLock()

ilAssQuestionProcessLockerDb::requestUserPassResultUpdateLock ( )

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

84  {
85  // no lock neccessary, because a single replace query is used
86 
87  //$this->db->lockTables(array(
88  // array('name' => 'tst_pass_result', 'type' => ilDB::LOCK_WRITE)
89  //));
90  }

◆ requestUserQuestionResultUpdateLock()

ilAssQuestionProcessLockerDb::requestUserQuestionResultUpdateLock ( )

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

References ilDB\LOCK_WRITE.

71  {
72  $this->db->lockTables(array(
73  array('name' => 'tst_test_result', 'type' => ilDB::LOCK_WRITE),
74  array('name' => 'tst_test_result', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
75  ));
76  }
const LOCK_WRITE
Definition: class.ilDB.php:30

◆ requestUserSolutionUpdateLock()

ilAssQuestionProcessLockerDb::requestUserSolutionUpdateLock ( )

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

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

51  {
52  $tables = array(
53  array('name' => 'tst_solutions', 'type' => ilDB::LOCK_WRITE),
54  array('name' => 'tst_solutions', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
55  );
56 
57  if( $this->isAssessmentLogEnabled() )
58  {
59  $tables = array_merge($tables, $this->getTablesUsedDuringAssessmentLog());
60  }
61 
62  $this->db->lockTables($tables);
63  }
const LOCK_WRITE
Definition: class.ilDB.php:30
+ Here is the call graph for this function:

◆ requestUserTestResultUpdateLock()

ilAssQuestionProcessLockerDb::requestUserTestResultUpdateLock ( )

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

References ilDB\LOCK_WRITE.

100  {
101  $this->db->lockTables(array(
102  array('name' => 'tst_result_cache', 'type' => ilDB::LOCK_WRITE)
103  ));
104  }
const LOCK_WRITE
Definition: class.ilDB.php:30

◆ setAssessmentLogEnabled()

ilAssQuestionProcessLockerDb::setAssessmentLogEnabled (   $assessmentLogEnabled)

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

References $assessmentLogEnabled.

35  {
36  $this->assessmentLogEnabled = $assessmentLogEnabled;
37  }

Field Documentation

◆ $assessmentLogEnabled

ilAssQuestionProcessLockerDb::$assessmentLogEnabled = false
private

◆ $db

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: