public function can_upgrade($type, $version) {
        if ($type == 'offline' && $version >= 2011112900) {
            return true;
        }
        foreach ($this->submissionplugins as $plugin) {
            if ($plugin->can_upgrade($type, $version)) {
                return true;
            }
        }
        foreach ($this->feedbackplugins as $plugin) {
            if ($plugin->can_upgrade($type, $version)) {
                return true;
            }
        }
        return false;
    }
public function can_upgrade($type, $version) {
        if ($type == 'offline' && $version >= 2011112900) {
            return true;
        }
        foreach ($this->submissionplugins as $plugin) {
            if ($plugin->can_upgrade($type, $version)) {
                return true;
            }
        }
        foreach ($this->feedbackplugins as $plugin) {
            if ($plugin->can_upgrade($type, $version)) {
                return true;
            }
        }
        return false;
    }
public function can_upgrade ( $ type , $ version ) { if ( $ type == 'offline' && $ version >= 2011112900 ) { return true ; } foreach ( $ this -> submissionplugins as $ plugin ) { if ( $ plugin -> can_upgrade ( $ type , $ version ) ) { return true ; } } foreach ( $ this -> feedbackplugins as $ plugin ) { if ( $ plugin -> can_upgrade ( $ type , $ version ) ) { return true ; } } return false ; }
This function returns true if it can upgrade an assignment from the 2.2 module.

@param string $type The plugin type
@param int $version The plugin version
@return bool
This function returns true if it can upgrade an assignment from the 2 . 2 module .