You are here

function quiz_get_pass_rate in Quiz 7

Same name and namespace in other branches
  1. 5.2 quiz.module \quiz_get_pass_rate()
  2. 5 quiz.module \quiz_get_pass_rate()
  3. 6.6 quiz.module \quiz_get_pass_rate()
  4. 6.2 quiz.module \quiz_get_pass_rate()
  5. 6.3 quiz.module \quiz_get_pass_rate()
  6. 6.4 quiz.module \quiz_get_pass_rate()
  7. 6.5 quiz.module \quiz_get_pass_rate()
  8. 7.4 quiz.module \quiz_get_pass_rate()

Finds out the pass rate for the quiz.

Parameters

$nid: The quiz ID.

Return value

Returns the passing percentage of the quiz.

Related topics

File

./quiz.module, line 1690
Quiz Module

Code

function quiz_get_pass_rate($nid, $vid) {
  return db_query('SELECT pass_rate FROM {quiz_node_properties} WHERE nid = :nid AND vid = :vid', array(
    ':nid' => $nid,
    ':vid' => $vid,
  ))
    ->fetchField();
}