You are here

function scale_install in Quiz 7.4

Same name and namespace in other branches
  1. 8.6 question_types/quiz_scale/quiz_scale.install \scale_install()
  2. 8.4 question_types/scale/scale.install \scale_install()
  3. 8.5 question_types/quiz_scale/quiz_scale.install \scale_install()
  4. 6.6 question_types/scale/scale.install \scale_install()
  5. 6.4 question_types/scale/scale.install \scale_install()
  6. 7.6 question_types/scale/scale.install \scale_install()
  7. 7 question_types/scale/scale.install \scale_install()
  8. 7.5 question_types/scale/scale.install \scale_install()

Implements hook_install().

File

question_types/scale/scale.install, line 15
Sponsored by: Norwegian Centre for Telemedicine Code: falcon

Code

function scale_install() {

  // Add body field to scale node
  quiz_question_add_body_field('scale');

  // TODO The drupal_(un)install_schema functions are called automatically in D7.
  // drupal_install_schema('scale')
  _scale_insert_collection(array(
    'Always',
    'Very often',
    'Some times',
    'Rarely',
    'Very rarely',
    'Never',
  ));
  _scale_insert_collection(array(
    'Excellent',
    'Very good',
    'Good',
    'Ok',
    'Poor',
    'Very poor',
  ));
  _scale_insert_collection(array(
    'Totally agree',
    'Agree',
    'Not sure',
    'Disagree',
    'Totally disagree',
  ));
  _scale_insert_collection(array(
    'Very important',
    'Important',
    'Moderately important',
    'Less important',
    'Least important',
  ));
  variable_set('node_options_scale', array(
    'status',
  ));
  cache_clear_all('autoload:', 'cache');
}