static public function disable($license) {
        global $DB, $CFG;
        // Site default license cannot be disabled!
        if ($license == $CFG->sitedefaultlicense) {
            print_error('error');
        }
        if ($license = self::get_license_by_shortname($license)) {
            $license->enabled = 0;
            $DB->update_record('license', $license);
        }
        self::set_active_licenses();
        return true;
    }
static public function disable($license) {
        global $DB, $CFG;
        // Site default license cannot be disabled!
        if ($license == $CFG->sitedefaultlicense) {
            print_error('error');
        }
        if ($license = self::get_license_by_shortname($license)) {
            $license->enabled = 0;
            $DB->update_record('license', $license);
        }
        self::set_active_licenses();
        return true;
    }
static public function disable ( $ license ) { global $ DB , $ CFG ; // Site default license cannot be disabled! if ( $ license == $ CFG -> sitedefaultlicense ) { print_error ( 'error' ) ; } if ( $ license = self :: get_license_by_shortname ( $ license ) ) { $ license -> enabled = 0 ; $ DB -> update_record ( 'license' , $ license ) ; } self :: set_active_licenses ( ) ; return true ; }
Disable a license
@param string $license the shortname of license
@return boolean
Disable a license