You are here

function opigno_quiz_app_opigno_tool in Opigno Quiz App 7

Implements hook_opigno_tool().

File

./opigno_quiz_app.module, line 684
Module file. Defines module hooks.

Code

function opigno_quiz_app_opigno_tool($node = NULL) {
  return array(
    'quiz' => array(
      'name' => t("Quiz"),
      'path' => isset($node) ? "node/{$node->nid}/quizzes" : '',
      'description' => t("Quizzes allow teachers to assess students and provide scenario-like information."),
      'actions' => array(
        'add_quiz' => array(
          'title' => t("Add a new Quiz"),
          'href' => 'node/add/quiz',
          'access_arguments' => array(
            'node',
            isset($node) ? $node->nid : 0,
            'create quiz content',
          ),
          'access_callback' => 'og_user_access',
          'query' => array(
            'og_group_ref' => isset($node) ? $node->nid : '',
          ),
        ),
      ),
    ),
  );
}