original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: This function returns true if it can upgrade an assignment from the 2 . 2 module .