original_string: public function add_url_params(moodle_url $url) {
          if (empty($this->type)) {
              return $url;
          }
  
          $url->param('gpr_type', $this->type);
  
          if (!empty($this->plugin)) {
              $url->param('gpr_plugin', $this->plugin);
          }
  
          if (!empty($this->courseid)) {
              $url->param('gpr_courseid' ,$this->courseid);
          }
  
          if (!empty($this->userid)) {
              $url->param('gpr_userid', $this->userid);
          }
  
          if (!empty($this->groupid)) {
              $url->param('gpr_groupid', $this->groupid);
          }
  
          if (!empty($this->page)) {
              $url->param('gpr_page', $this->page);
          }
  
          return $url;
      }
code: public function add_url_params(moodle_url $url) {
          if (empty($this->type)) {
              return $url;
          }
  
          $url->param('gpr_type', $this->type);
  
          if (!empty($this->plugin)) {
              $url->param('gpr_plugin', $this->plugin);
          }
  
          if (!empty($this->courseid)) {
              $url->param('gpr_courseid' ,$this->courseid);
          }
  
          if (!empty($this->userid)) {
              $url->param('gpr_userid', $this->userid);
          }
  
          if (!empty($this->groupid)) {
              $url->param('gpr_groupid', $this->groupid);
          }
  
          if (!empty($this->page)) {
              $url->param('gpr_page', $this->page);
          }
  
          return $url;
      }
code_tokens: public function add_url_params ( moodle_url $ url ) { if ( empty ( $ this -> type ) ) { return $ url ; } $ url -> param ( 'gpr_type' , $ this -> type ) ; if ( ! empty ( $ this -> plugin ) ) { $ url -> param ( 'gpr_plugin' , $ this -> plugin ) ; } if ( ! empty ( $ this -> courseid ) ) { $ url -> param ( 'gpr_courseid' , $ this -> courseid ) ; } if ( ! empty ( $ this -> userid ) ) { $ url -> param ( 'gpr_userid' , $ this -> userid ) ; } if ( ! empty ( $ this -> groupid ) ) { $ url -> param ( 'gpr_groupid' , $ this -> groupid ) ; } if ( ! empty ( $ this -> page ) ) { $ url -> param ( 'gpr_page' , $ this -> page ) ; } return $ url ; }
docstring: Add return tracking params into url
  
  @param moodle_url $url A URL
  
  @return string $url with return tracking params
docstring_tokens: Add return tracking params into url