original_string: public function col_grader(\stdClass $history) {
          if (empty($history->usermodified)) {
              // Not every row has a valid usermodified.
              return '';
          }
  
          $grader = new \stdClass();
          $grader = username_load_fields_from_object($grader, $history, 'grader');
          $name = fullname($grader);
  
          if ($this->download) {
              return $name;
          }
  
          $userid = $history->usermodified;
          $profileurl = new \moodle_url('/user/view.php', array('id' => $userid, 'course' => $this->courseid));
  
          return \html_writer::link($profileurl, $name);
      }
code: public function col_grader(\stdClass $history) {
          if (empty($history->usermodified)) {
              // Not every row has a valid usermodified.
              return '';
          }
  
          $grader = new \stdClass();
          $grader = username_load_fields_from_object($grader, $history, 'grader');
          $name = fullname($grader);
  
          if ($this->download) {
              return $name;
          }
  
          $userid = $history->usermodified;
          $profileurl = new \moodle_url('/user/view.php', array('id' => $userid, 'course' => $this->courseid));
  
          return \html_writer::link($profileurl, $name);
      }
code_tokens: public function col_grader ( \ stdClass $ history ) { if ( empty ( $ history -> usermodified ) ) { // Not every row has a valid usermodified. return '' ; } $ grader = new \ stdClass ( ) ; $ grader = username_load_fields_from_object ( $ grader , $ history , 'grader' ) ; $ name = fullname ( $ grader ) ; if ( $ this -> download ) { return $ name ; } $ userid = $ history -> usermodified ; $ profileurl = new \ moodle_url ( '/user/view.php' , array ( 'id' => $ userid , 'course' => $ this -> courseid ) ) ; return \ html_writer :: link ( $ profileurl , $ name ) ; }
docstring: Method to display column grader.
  
  @param \stdClass $history an entry of history record.
  
  @return string HTML to display
docstring_tokens: Method to display column grader .