You are here

function opigno_moxtra_app_install in Opigno Moxtra App 7

Implements hook_install()

File

./opigno_moxtra_app.install, line 11
Contains install instructions and logic

Code

function opigno_moxtra_app_install() {
  opigno_moxtra_app_install_default_permissions();

  /*if (function_exists('opigno_lms_refresh_strings_and_import')) {
      opigno_lms_refresh_strings_and_import(array('default', 'field'));
    }*/

  // Update the org information if the organization is already registered in the opigno.org platform
  if (variable_get('opigno_moxtra_app_org_id', '') != '' && variable_get('opigno_moxtra_app_client_id', '') != '') {
    $response = opigno_moxtra_app_api_opigno_update_organization(variable_get('site_name', 'Undefined name'), variable_get('site_mail', 'Undefined email'));
    if ($response->http_code != 200) {
      drupal_set_message(t('Error while updating your site name on Opigno servers. Please try again in your site administration'));
    }
  }
}