You are here

function multichoice_access in Quiz 5.2

Same name and namespace in other branches
  1. 5 multichoice.module \multichoice_access()
  2. 6.6 question_types/multichoice/multichoice.module \multichoice_access()
  3. 6.2 multichoice.module \multichoice_access()
  4. 6.3 question_types/multichoice/multichoice.module \multichoice_access()
  5. 6.5 question_types/multichoice/multichoice.module \multichoice_access()

Implementation of hook_access().

File

./multichoice.module, line 23
Multiple choice question type for the Quiz module.

Code

function multichoice_access($op, $node) {
  global $user;
  if ($op == 'create') {
    return user_access('create multichoice');
  }
  if ($op == 'update' || $op == 'delete') {
    if (user_access('edit own multichoice') && $user->uid == $node->uid) {
      return TRUE;
    }
  }
}