You are here

function _quiz_user_results_access in Quiz 7.6

Same name and namespace in other branches
  1. 8.4 quiz.module \_quiz_user_results_access()
  2. 6.4 quiz.module \_quiz_user_results_access()
  3. 7 quiz.module \_quiz_user_results_access()
  4. 7.4 quiz.module \_quiz_user_results_access()

Determine who should have access to the My results tab.

File

./quiz.module, line 3337
quiz.module Main file for the Quiz module.

Code

function _quiz_user_results_access($user_id) {
  global $user;
  return $user_id == $user->uid && user_access('view own quiz results') || user_access('view any quiz results');
}