original_string: protected function prepare_request_params() {
          global $CFG;
  
          $this->load_current_environment();
          $this->restore_response();
  
          $params = array();
          $params['format'] = 'json';
  
          if (isset($this->recentresponse['ticket'])) {
              $params['ticket'] = $this->recentresponse['ticket'];
          }
  
          if (isset($this->currentversion)) {
              $params['version'] = $this->currentversion;
          } else {
              throw new coding_exception('Main Moodle version must be already known here');
          }
  
          if (isset($this->currentbranch)) {
              $params['branch'] = $this->currentbranch;
          } else {
              throw new coding_exception('Moodle release must be already known here');
          }
  
          $plugins = array();
          foreach ($this->currentplugins as $plugin => $version) {
              $plugins[] = $plugin.'@'.$version;
          }
          if (!empty($plugins)) {
              $params['plugins'] = implode(',', $plugins);
          }
  
          return $params;
      }
code: protected function prepare_request_params() {
          global $CFG;
  
          $this->load_current_environment();
          $this->restore_response();
  
          $params = array();
          $params['format'] = 'json';
  
          if (isset($this->recentresponse['ticket'])) {
              $params['ticket'] = $this->recentresponse['ticket'];
          }
  
          if (isset($this->currentversion)) {
              $params['version'] = $this->currentversion;
          } else {
              throw new coding_exception('Main Moodle version must be already known here');
          }
  
          if (isset($this->currentbranch)) {
              $params['branch'] = $this->currentbranch;
          } else {
              throw new coding_exception('Moodle release must be already known here');
          }
  
          $plugins = array();
          foreach ($this->currentplugins as $plugin => $version) {
              $plugins[] = $plugin.'@'.$version;
          }
          if (!empty($plugins)) {
              $params['plugins'] = implode(',', $plugins);
          }
  
          return $params;
      }
code_tokens: protected function prepare_request_params ( ) { global $ CFG ; $ this -> load_current_environment ( ) ; $ this -> restore_response ( ) ; $ params = array ( ) ; $ params [ 'format' ] = 'json' ; if ( isset ( $ this -> recentresponse [ 'ticket' ] ) ) { $ params [ 'ticket' ] = $ this -> recentresponse [ 'ticket' ] ; } if ( isset ( $ this -> currentversion ) ) { $ params [ 'version' ] = $ this -> currentversion ; } else { throw new coding_exception ( 'Main Moodle version must be already known here' ) ; } if ( isset ( $ this -> currentbranch ) ) { $ params [ 'branch' ] = $ this -> currentbranch ; } else { throw new coding_exception ( 'Moodle release must be already known here' ) ; } $ plugins = array ( ) ; foreach ( $ this -> currentplugins as $ plugin => $ version ) { $ plugins [ ] = $ plugin . '@' . $ version ; } if ( ! empty ( $ plugins ) ) { $ params [ 'plugins' ] = implode ( ',' , $ plugins ) ; } return $ params ; }
docstring: Returns the list of HTTP params to be sent to the updates provider URL
  
  @return array of (string)param => (string)value
docstring_tokens: Returns the list of HTTP params to be sent to the updates provider URL