You are here

function opigno_quiz_app_rules_has_answered_quiz in Opigno Quiz App 7

Condition: User has answered quiz.

File

./opigno_quiz_app.rules.inc, line 128
Rules hook definitions. Many of these should be moved back to the Quiz Rules module once it's ported.

Code

function opigno_quiz_app_rules_has_answered_quiz($node, $user) {
  $score = @current(quiz_get_score_data(array(
    $node->nid,
  ), $user->uid));
  return isset($score->percent_score);
}