function quiz_schema in Quiz 8.5
Same name and namespace in other branches
- 8.6 quiz.install \quiz_schema()
- 8.4 quiz.install \quiz_schema()
- 6.6 quiz.install \quiz_schema()
- 6.2 quiz.install \quiz_schema()
- 6.3 quiz.install \quiz_schema()
- 6.4 quiz.install \quiz_schema()
- 6.5 quiz.install \quiz_schema()
- 7.6 quiz.install \quiz_schema()
- 7 quiz.install \quiz_schema()
- 7.4 quiz.install \quiz_schema()
- 7.5 quiz.install \quiz_schema()
Implements hook_schema().
File
- ./
quiz.install, line 22 - Quiz install schema for installing the quiz module.
Code
function quiz_schema() {
return;
$schema['quiz_terms'] = array(
'description' => 'Table storing what terms belongs to what quiz for categorized random quizzes',
'fields' => array(
'nid' => array(
'description' => 'The quiz ID of this quiz term.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'description' => 'The quiz version ID of this quiz term.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'weight' => array(
'description' => 'The terms weight decides the order of the terms',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'tid' => array(
'description' => 'Taxonomy term ID from which to pull questions.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'max_score' => array(
'description' => 'Max score for each question marked with this term.',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
),
'number' => array(
'description' => 'Number of questions to be drawn from this term.',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'vid',
'tid',
),
'indexes' => array(
'version' => array(
'vid',
),
),
);
return $schema;
}