You are here

function opigno_lms_install_tasks_alter in Opigno LMS 7

Implements hook_install_tasks_alter().

Hides messages for non english installs.

File

./opigno_lms.profile, line 175
Enables modules and site configuration for a standard site installation. Provides a default API for Apps and modules to use. This will simplify the user experience.

Code

function opigno_lms_install_tasks_alter(&$tasks, $install_state) {
  if (isset($tasks['opigno_lms_verify_requirements'])) {
    $pos = array_search('opigno_lms_verify_requirements', array_keys($tasks));
    if ($pos == '11') {
      $save = $tasks['opigno_lms_verify_requirements'];
      unset($tasks['opigno_lms_verify_requirements']);
      $first_array = array_splice($tasks, 0, 4);
      $tasks = array_merge($first_array, array(
        'opigno_lms_verify_requirements' => $save,
      ), $tasks);
    }
  }
  if ($install_state['active_task'] == "install_import_locales") {
    drupal_get_messages('status');
    drupal_get_messages('warning');
  }

  // Remove core steps for translation imports.
  unset($tasks['install_import_locales']);
  unset($tasks['install_import_locales_remaining']);
}