original_string: public function cancel_plugin_installation($component) {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return false;
          }
  
          $plugin = $this->get_plugin_info($component);
  
          if ($this->can_cancel_plugin_installation($plugin)) {
              $this->remove_plugin_folder($plugin);
          }
  
          return false;
      }
code: public function cancel_plugin_installation($component) {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return false;
          }
  
          $plugin = $this->get_plugin_info($component);
  
          if ($this->can_cancel_plugin_installation($plugin)) {
              $this->remove_plugin_folder($plugin);
          }
  
          return false;
      }
code_tokens: public function cancel_plugin_installation ( $ component ) { global $ CFG ; if ( ! empty ( $ CFG -> disableupdateautodeploy ) ) { return false ; } $ plugin = $ this -> get_plugin_info ( $ component ) ; if ( $ this -> can_cancel_plugin_installation ( $ plugin ) ) { $ this -> remove_plugin_folder ( $ plugin ) ; } return false ; }
docstring: Removes the plugin code directory if it is not installed yet.
  
  This is intended for the plugins check screen to give the admin a chance
  to cancel the installation of just unzipped plugin before the database
  upgrade happens.
  
  @param string $component
docstring_tokens: Removes the plugin code directory if it is not installed yet .