original_string: public function setup_from_params() {
          $this->attempts   = optional_param('attempts', $this->attempts, PARAM_ALPHAEXT);
          $this->group      = groups_get_activity_group($this->cm, true);
          $this->onlygraded = optional_param('onlygraded', $this->onlygraded, PARAM_BOOL);
          $this->pagesize   = optional_param('pagesize', $this->pagesize, PARAM_INT);
  
          $states = optional_param('states', '', PARAM_ALPHAEXT);
          if (!empty($states)) {
              $this->states = explode('-', $states);
          }
  
          $this->download   = optional_param('download', $this->download, PARAM_ALPHA);
      }
code: public function setup_from_params() {
          $this->attempts   = optional_param('attempts', $this->attempts, PARAM_ALPHAEXT);
          $this->group      = groups_get_activity_group($this->cm, true);
          $this->onlygraded = optional_param('onlygraded', $this->onlygraded, PARAM_BOOL);
          $this->pagesize   = optional_param('pagesize', $this->pagesize, PARAM_INT);
  
          $states = optional_param('states', '', PARAM_ALPHAEXT);
          if (!empty($states)) {
              $this->states = explode('-', $states);
          }
  
          $this->download   = optional_param('download', $this->download, PARAM_ALPHA);
      }
code_tokens: public function setup_from_params ( ) { $ this -> attempts = optional_param ( 'attempts' , $ this -> attempts , PARAM_ALPHAEXT ) ; $ this -> group = groups_get_activity_group ( $ this -> cm , true ) ; $ this -> onlygraded = optional_param ( 'onlygraded' , $ this -> onlygraded , PARAM_BOOL ) ; $ this -> pagesize = optional_param ( 'pagesize' , $ this -> pagesize , PARAM_INT ) ; $ states = optional_param ( 'states' , '' , PARAM_ALPHAEXT ) ; if ( ! empty ( $ states ) ) { $ this -> states = explode ( '-' , $ states ) ; } $ this -> download = optional_param ( 'download' , $ this -> download , PARAM_ALPHA ) ; }
docstring: Set the fields of this object from the URL parameters.
docstring_tokens: Set the fields of this object from the URL parameters .