function opigno_quiz_app_rules_quiz_get_highest_score in Opigno Quiz App 7
Action: Get the best score for the quiz and user.
File
- ./
opigno_quiz_app.rules.inc, line 228 - 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_quiz_get_highest_score($node, $user, $settings) {
$score = current(quiz_get_score_data(array(
$node->nid,
), $user->uid));
return array(
'quiz_score' => !empty($score) ? $score : 0,
);
}