You are here

function opigno_lms_update_7105 in Opigno LMS 7

Enable new version block.

Enable new question types.

Set i18n string source to English, always.

File

./opigno_lms.install, line 631
Install, update and uninstall functions for the Opigno LMS installation profile.

Code

function opigno_lms_update_7105(&$sandbox) {
  $default_theme = variable_get('theme_default', 'platon');
  $block = array(
    'module' => 'opigno_lms',
    'delta' => 'version',
    'theme' => $default_theme,
    'status' => 1,
    'weight' => 0,
    'region' => 'footer',
    'visibility' => 0,
    'pages' => '',
    'cache' => DRUPAL_CACHE_GLOBAL,
  );
  $query = db_merge('block')
    ->key(array(
    'theme' => $default_theme,
    'module' => 'opigno_lms',
    'delta' => 'version',
  ))
    ->fields($block);
  $query
    ->execute();
  if (!module_exists('cloze')) {
    module_enable(array(
      'cloze',
    ));
  }
  if (!module_exists('quiz_drag_drop')) {
    module_enable(array(
      'quiz_drag_drop',
    ));
  }
  variable_set('i18n_string_source_language', 'en');
}