ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAssQuestionProcessLockerDb Class Reference
+ Inheritance diagram for ilAssQuestionProcessLockerDb:
+ Collaboration diagram for ilAssQuestionProcessLockerDb:

Public Member Functions

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

Protected Attributes

 $db
 

Private Member Functions

 getTablesUsedDuringAssessmentLog ()
 
 getTablesUsedDuringSolutionUpdate ()
 
 getTablesUsedDuringResultUpdate ()
 

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:

◆ getTablesUsedDuringResultUpdate()

ilAssQuestionProcessLockerDb::getTablesUsedDuringResultUpdate ( )
private

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

References ilDB\LOCK_WRITE.

Referenced by requestUserQuestionResultUpdateLock(), and requestUserSolutionAdoptLock().

59  {
60  return array(
61  array('name' => 'tst_test_result', 'type' => ilDB::LOCK_WRITE),
62  array('name' => 'tst_test_result', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
63  );
64  }
const LOCK_WRITE
Definition: class.ilDB.php:30
+ Here is the caller graph for this function:

◆ getTablesUsedDuringSolutionUpdate()

ilAssQuestionProcessLockerDb::getTablesUsedDuringSolutionUpdate ( )
private

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

References ilDB\LOCK_WRITE.

Referenced by requestUserSolutionAdoptLock(), and requestUserSolutionUpdateLock().

51  {
52  return array(
53  array('name' => 'tst_solutions', 'type' => ilDB::LOCK_WRITE),
54  array('name' => 'tst_solutions', 'type' => ilDB::LOCK_WRITE, 'sequence' => true)
55  );
56  }
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 116 of file class.ilAssQuestionProcessLockerDb.php.

117  {
118  // no lock neccessary, because a single replace query is used
119 
120  //$this->db->unlockTables();
121  }

◆ releaseUserQuestionResultUpdateLock()

ilAssQuestionProcessLockerDb::releaseUserQuestionResultUpdateLock ( )

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

103  {
104  $this->db->unlockTables();
105  }

◆ releaseUserSolutionAdoptLock()

ilAssQuestionProcessLockerDb::releaseUserSolutionAdoptLock ( )

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

91  {
92  $this->db->unlockTables();
93  }

◆ releaseUserSolutionUpdateLock()

ilAssQuestionProcessLockerDb::releaseUserSolutionUpdateLock ( )

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

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

◆ releaseUserTestResultUpdateLock()

ilAssQuestionProcessLockerDb::releaseUserTestResultUpdateLock ( )

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

131  {
132  $this->db->unlockTables();
133  }

◆ requestUserPassResultUpdateLock()

ilAssQuestionProcessLockerDb::requestUserPassResultUpdateLock ( )

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

108  {
109  // no lock neccessary, because a single replace query is used
110 
111  //$this->db->lockTables(array(
112  // array('name' => 'tst_pass_result', 'type' => ilDB::LOCK_WRITE)
113  //));
114  }

◆ requestUserQuestionResultUpdateLock()

ilAssQuestionProcessLockerDb::requestUserQuestionResultUpdateLock ( )

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

References getTablesUsedDuringResultUpdate().

96  {
97  $this->db->lockTables(
99  );
100  }
+ Here is the call graph for this function:

◆ requestUserSolutionAdoptLock()

ilAssQuestionProcessLockerDb::requestUserSolutionAdoptLock ( )

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

References getTablesUsedDuringResultUpdate(), and getTablesUsedDuringSolutionUpdate().

84  {
85  $this->db->lockTables(array_merge(
87  ));
88  }
+ Here is the call graph for this function:

◆ requestUserSolutionUpdateLock()

ilAssQuestionProcessLockerDb::requestUserSolutionUpdateLock ( )

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

References getTablesUsedDuringAssessmentLog(), getTablesUsedDuringSolutionUpdate(), and isAssessmentLogEnabled().

67  {
68  $tables = $this->getTablesUsedDuringSolutionUpdate();
69 
70  if( $this->isAssessmentLogEnabled() )
71  {
72  $tables = array_merge($tables, $this->getTablesUsedDuringAssessmentLog());
73  }
74 
75  $this->db->lockTables($tables);
76  }
+ Here is the call graph for this function:

◆ requestUserTestResultUpdateLock()

ilAssQuestionProcessLockerDb::requestUserTestResultUpdateLock ( )

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

References ilDB\LOCK_WRITE.

124  {
125  $this->db->lockTables(array(
126  array('name' => 'tst_result_cache', 'type' => ilDB::LOCK_WRITE)
127  ));
128  }
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: