You are here

function opigno_lms_check_opigno_lms_updates in Opigno LMS 3.x

Same name and namespace in other branches
  1. 8.2 opigno_lms.profile \opigno_lms_check_opigno_lms_updates()
  2. 8 opigno_lms.profile \opigno_lms_check_opigno_lms_updates()

Implements opigno_lms_check_opigno_lms_updates().

Check if new Opigno LMS release is available.

Return TRUE or FALSE.

File

./opigno_lms.profile, line 90
Enables modules and site configuration for a opigno_lms site installation.

Code

function opigno_lms_check_opigno_lms_updates() {

  // Get all available updates.
  $available = update_get_available();
  if (isset($available['opigno_lms'])) {
    $all_releases = array_keys($available['opigno_lms']['releases']);
    $last_release = $all_releases[0];
    $current_release = opigno_lms_get_current_opigno_lms_release();
    $has_updates = $last_release != $current_release;
    return $has_updates;
  }
}