original_string: protected function resolve_dependency_requirements(\core\plugininfo\base $plugin, $otherpluginname,
              $requiredversion, $moodlebranch) {
  
          $reqs = (object)array(
              'hasver' => null,
              'reqver' => null,
              'status' => null,
              'availability' => null,
          );
  
          $otherplugin = $this->get_plugin_info($otherpluginname);
  
          if ($otherplugin !== null) {
              // The required plugin is installed.
              $reqs->hasver = $otherplugin->versiondisk;
              $reqs->reqver = $requiredversion;
              // Check it has sufficient version.
              if ($requiredversion == ANY_VERSION or $otherplugin->versiondisk >= $requiredversion) {
                  $reqs->status = self::REQUIREMENT_STATUS_OK;
              } else {
                  $reqs->status = self::REQUIREMENT_STATUS_OUTDATED;
              }
  
          } else {
              // The required plugin is not installed.
              $reqs->hasver = null;
              $reqs->reqver = $requiredversion;
              $reqs->status = self::REQUIREMENT_STATUS_MISSING;
          }
  
          if ($reqs->status !== self::REQUIREMENT_STATUS_OK) {
              if ($this->is_remote_plugin_available($otherpluginname, $requiredversion, false)) {
                  $reqs->availability = self::REQUIREMENT_AVAILABLE;
              } else {
                  $reqs->availability = self::REQUIREMENT_UNAVAILABLE;
              }
          }
  
          return $reqs;
      }
code: protected function resolve_dependency_requirements(\core\plugininfo\base $plugin, $otherpluginname,
              $requiredversion, $moodlebranch) {
  
          $reqs = (object)array(
              'hasver' => null,
              'reqver' => null,
              'status' => null,
              'availability' => null,
          );
  
          $otherplugin = $this->get_plugin_info($otherpluginname);
  
          if ($otherplugin !== null) {
              // The required plugin is installed.
              $reqs->hasver = $otherplugin->versiondisk;
              $reqs->reqver = $requiredversion;
              // Check it has sufficient version.
              if ($requiredversion == ANY_VERSION or $otherplugin->versiondisk >= $requiredversion) {
                  $reqs->status = self::REQUIREMENT_STATUS_OK;
              } else {
                  $reqs->status = self::REQUIREMENT_STATUS_OUTDATED;
              }
  
          } else {
              // The required plugin is not installed.
              $reqs->hasver = null;
              $reqs->reqver = $requiredversion;
              $reqs->status = self::REQUIREMENT_STATUS_MISSING;
          }
  
          if ($reqs->status !== self::REQUIREMENT_STATUS_OK) {
              if ($this->is_remote_plugin_available($otherpluginname, $requiredversion, false)) {
                  $reqs->availability = self::REQUIREMENT_AVAILABLE;
              } else {
                  $reqs->availability = self::REQUIREMENT_UNAVAILABLE;
              }
          }
  
          return $reqs;
      }
code_tokens: protected function resolve_dependency_requirements ( \ core \ plugininfo \ base $ plugin , $ otherpluginname , $ requiredversion , $ moodlebranch ) { $ reqs = ( object ) array ( 'hasver' => null , 'reqver' => null , 'status' => null , 'availability' => null , ) ; $ otherplugin = $ this -> get_plugin_info ( $ otherpluginname ) ; if ( $ otherplugin !== null ) { // The required plugin is installed. $ reqs -> hasver = $ otherplugin -> versiondisk ; $ reqs -> reqver = $ requiredversion ; // Check it has sufficient version. if ( $ requiredversion == ANY_VERSION or $ otherplugin -> versiondisk >= $ requiredversion ) { $ reqs -> status = self :: REQUIREMENT_STATUS_OK ; } else { $ reqs -> status = self :: REQUIREMENT_STATUS_OUTDATED ; } } else { // The required plugin is not installed. $ reqs -> hasver = null ; $ reqs -> reqver = $ requiredversion ; $ reqs -> status = self :: REQUIREMENT_STATUS_MISSING ; } if ( $ reqs -> status !== self :: REQUIREMENT_STATUS_OK ) { if ( $ this -> is_remote_plugin_available ( $ otherpluginname , $ requiredversion , false ) ) { $ reqs -> availability = self :: REQUIREMENT_AVAILABLE ; } else { $ reqs -> availability = self :: REQUIREMENT_UNAVAILABLE ; } } return $ reqs ; }
docstring: Helper method to resolve plugin's dependecies on other plugins.
  
  @param \core\plugininfo\base $plugin the plugin we are checking
  @param string $otherpluginname
  @param string|int $requiredversion
  @param string|int $moodlebranch explicit moodle core branch to check against, defaults to $CFG->branch
  @return stdClass
docstring_tokens: Helper method to resolve plugin s dependecies on other plugins .