original_string: protected function get_allgradeitems() {
          if (!empty($this->allgradeitems)) {
              return $this->allgradeitems;
          }
          $allgradeitems = grade_item::fetch_all(array('courseid' => $this->courseid));
          // But hang on - don't include ones which are set to not show the grade at all.
          $this->allgradeitems = array_filter($allgradeitems, function($item) {
              return $item->gradetype != GRADE_TYPE_NONE;
          });
  
          return $this->allgradeitems;
      }
code: protected function get_allgradeitems() {
          if (!empty($this->allgradeitems)) {
              return $this->allgradeitems;
          }
          $allgradeitems = grade_item::fetch_all(array('courseid' => $this->courseid));
          // But hang on - don't include ones which are set to not show the grade at all.
          $this->allgradeitems = array_filter($allgradeitems, function($item) {
              return $item->gradetype != GRADE_TYPE_NONE;
          });
  
          return $this->allgradeitems;
      }
code_tokens: protected function get_allgradeitems ( ) { if ( ! empty ( $ this -> allgradeitems ) ) { return $ this -> allgradeitems ; } $ allgradeitems = grade_item :: fetch_all ( array ( 'courseid' => $ this -> courseid ) ) ; // But hang on - don't include ones which are set to not show the grade at all. $ this -> allgradeitems = array_filter ( $ allgradeitems , function ( $ item ) { return $ item -> gradetype != GRADE_TYPE_NONE ; } ) ; return $ this -> allgradeitems ; }
docstring: Load all grade items.
docstring_tokens: Load all grade items .