original_string: public function get_return_url($default, $extras=null) {
          global $CFG;
  
          if (empty($this->type) or empty($this->plugin)) {
              return $default;
          }
  
          $url = $CFG->wwwroot.'/grade/'.$this->type.'/'.$this->plugin.'/index.php';
          $glue = '?';
  
          if (!empty($this->courseid)) {
              $url .= $glue.'id='.$this->courseid;
              $glue = '&amp;';
          }
  
          if (!empty($this->userid)) {
              $url .= $glue.'userid='.$this->userid;
              $glue = '&amp;';
          }
  
          if (!empty($this->groupid)) {
              $url .= $glue.'group='.$this->groupid;
              $glue = '&amp;';
          }
  
          if (!empty($this->page)) {
              $url .= $glue.'page='.$this->page;
              $glue = '&amp;';
          }
  
          if (!empty($extras)) {
              foreach ($extras as $key=>$value) {
                  $url .= $glue.$key.'='.$value;
                  $glue = '&amp;';
              }
          }
  
          return $url;
      }
code: public function get_return_url($default, $extras=null) {
          global $CFG;
  
          if (empty($this->type) or empty($this->plugin)) {
              return $default;
          }
  
          $url = $CFG->wwwroot.'/grade/'.$this->type.'/'.$this->plugin.'/index.php';
          $glue = '?';
  
          if (!empty($this->courseid)) {
              $url .= $glue.'id='.$this->courseid;
              $glue = '&amp;';
          }
  
          if (!empty($this->userid)) {
              $url .= $glue.'userid='.$this->userid;
              $glue = '&amp;';
          }
  
          if (!empty($this->groupid)) {
              $url .= $glue.'group='.$this->groupid;
              $glue = '&amp;';
          }
  
          if (!empty($this->page)) {
              $url .= $glue.'page='.$this->page;
              $glue = '&amp;';
          }
  
          if (!empty($extras)) {
              foreach ($extras as $key=>$value) {
                  $url .= $glue.$key.'='.$value;
                  $glue = '&amp;';
              }
          }
  
          return $url;
      }
code_tokens: public function get_return_url ( $ default , $ extras = null ) { global $ CFG ; if ( empty ( $ this -> type ) or empty ( $ this -> plugin ) ) { return $ default ; } $ url = $ CFG -> wwwroot . '/grade/' . $ this -> type . '/' . $ this -> plugin . '/index.php' ; $ glue = '?' ; if ( ! empty ( $ this -> courseid ) ) { $ url .= $ glue . 'id=' . $ this -> courseid ; $ glue = '&amp;' ; } if ( ! empty ( $ this -> userid ) ) { $ url .= $ glue . 'userid=' . $ this -> userid ; $ glue = '&amp;' ; } if ( ! empty ( $ this -> groupid ) ) { $ url .= $ glue . 'group=' . $ this -> groupid ; $ glue = '&amp;' ; } if ( ! empty ( $ this -> page ) ) { $ url .= $ glue . 'page=' . $ this -> page ; $ glue = '&amp;' ; } if ( ! empty ( $ extras ) ) { foreach ( $ extras as $ key => $ value ) { $ url .= $ glue . $ key . '=' . $ value ; $ glue = '&amp;' ; } } return $ url ; }
docstring: Returns return url
  
  @param string $default default url when params not set
  @param array  $extras Extra URL parameters
  
  @return string url
docstring_tokens: Returns return url