original_string: public function col_creatorlastname($data) {
          // We have loaded all the name fields for the creator, with the 'creator' prefix.
          // So just remove the prefix and make up a user object.
          $user = [];
          foreach ($data as $key => $value) {
              if (strpos($key, 'creator') !== false) {
                  $newkey = str_replace('creator', '', $key);
                  $user[$newkey] = $value;
              }
          }
  
          $creatorprofileurl = new \moodle_url('/user/profile.php', ['id' => $data->creatorid]);
          return \html_writer::link($creatorprofileurl, fullname((object)$user));
      }
code: public function col_creatorlastname($data) {
          // We have loaded all the name fields for the creator, with the 'creator' prefix.
          // So just remove the prefix and make up a user object.
          $user = [];
          foreach ($data as $key => $value) {
              if (strpos($key, 'creator') !== false) {
                  $newkey = str_replace('creator', '', $key);
                  $user[$newkey] = $value;
              }
          }
  
          $creatorprofileurl = new \moodle_url('/user/profile.php', ['id' => $data->creatorid]);
          return \html_writer::link($creatorprofileurl, fullname((object)$user));
      }
code_tokens: public function col_creatorlastname ( $ data ) { // We have loaded all the name fields for the creator, with the 'creator' prefix. // So just remove the prefix and make up a user object. $ user = [ ] ; foreach ( $ data as $ key => $ value ) { if ( strpos ( $ key , 'creator' ) !== false ) { $ newkey = str_replace ( 'creator' , '' , $ key ) ; $ user [ $ newkey ] = $ value ; } } $ creatorprofileurl = new \ moodle_url ( '/user/profile.php' , [ 'id' => $ data -> creatorid ] ) ; return \ html_writer :: link ( $ creatorprofileurl , fullname ( ( object ) $ user ) ) ; }
docstring: Generate the creator column.
  
  @param \stdClass $data
  @return string
docstring_tokens: Generate the creator column .