original_string: public function init($selfitemisempty = false) {
  
          $this->items = $this->load_users();
          $this->totalitemcount = count($this->items);
  
          if ($selfitemisempty) {
              return;
          }
  
          $params = array(
              'id' => $this->itemid,
              'courseid' => $this->courseid
          );
  
          $this->item = grade_item::fetch($params);
          if (!self::filter($this->item)) {
              $this->items = array();
              $this->set_init_error(get_string('gradeitemcannotbeoverridden', 'gradereport_singleview'));
          }
  
          $this->requiresextra = !$this->item->is_manual_item();
  
          $this->setup_structure();
  
          $this->set_definition($this->original_definition());
          $this->set_headers($this->original_headers());
      }
code: public function init($selfitemisempty = false) {
  
          $this->items = $this->load_users();
          $this->totalitemcount = count($this->items);
  
          if ($selfitemisempty) {
              return;
          }
  
          $params = array(
              'id' => $this->itemid,
              'courseid' => $this->courseid
          );
  
          $this->item = grade_item::fetch($params);
          if (!self::filter($this->item)) {
              $this->items = array();
              $this->set_init_error(get_string('gradeitemcannotbeoverridden', 'gradereport_singleview'));
          }
  
          $this->requiresextra = !$this->item->is_manual_item();
  
          $this->setup_structure();
  
          $this->set_definition($this->original_definition());
          $this->set_headers($this->original_headers());
      }
code_tokens: public function init ( $ selfitemisempty = false ) { $ this -> items = $ this -> load_users ( ) ; $ this -> totalitemcount = count ( $ this -> items ) ; if ( $ selfitemisempty ) { return ; } $ params = array ( 'id' => $ this -> itemid , 'courseid' => $ this -> courseid ) ; $ this -> item = grade_item :: fetch ( $ params ) ; if ( ! self :: filter ( $ this -> item ) ) { $ this -> items = array ( ) ; $ this -> set_init_error ( get_string ( 'gradeitemcannotbeoverridden' , 'gradereport_singleview' ) ) ; } $ this -> requiresextra = ! $ this -> item -> is_manual_item ( ) ; $ this -> setup_structure ( ) ; $ this -> set_definition ( $ this -> original_definition ( ) ) ; $ this -> set_headers ( $ this -> original_headers ( ) ) ; }
docstring: Init this page
  
  @param bool $selfitemisempty True if we have not selected a user.
docstring_tokens: Init this page