You are here

function answers_lock_question_p in Answers 7.3

Same name and namespace in other branches
  1. 6.2 includes/answers.lock.inc \answers_lock_question_p()
  2. 7.2 includes/answers.lock.inc \answers_lock_question_p()

Determines if a question should be locked or not.

Parameters

object $question: A fully loaded question node.

string $modules: What modules to test.

Return value

bool Returns TRUE if question should be locked, FALSE otherwise.

2 calls to answers_lock_question_p()
answers_reset_question_lock in includes/answers.lock.inc
Reset the question lock for a single question.
answers_reset_question_locks in includes/answers.lock.inc
Cycle through all questions and reset their locks.

File

includes/answers.lock.inc, line 76
Question locking functions for the 'Answers' module.

Code

function answers_lock_question_p($question, $modules = NULL) {
  if (!$modules) {
    $modules = module_implements('answers_lock_question_p');
  }
  foreach ($modules as $module) {
    if (module_invoke($module, 'answers_lock_question_p', $question)) {
      return TRUE;
    }
  }
  return FALSE;
}