original_string: protected function render_badge_recipients(badge_recipients $recipients) {
          $paging = new paging_bar($recipients->totalcount, $recipients->page, $recipients->perpage, $this->page->url, 'page');
          $htmlpagingbar = $this->render($paging);
          $table = new html_table();
          $table->attributes['class'] = 'generaltable boxaligncenter boxwidthwide';
  
          $sortbyfirstname = $this->helper_sortable_heading(get_string('firstname'),
                  'firstname', $recipients->sort, $recipients->dir);
          $sortbylastname = $this->helper_sortable_heading(get_string('lastname'),
                  'lastname', $recipients->sort, $recipients->dir);
          if ($this->helper_fullname_format() == 'lf') {
              $sortbyname = $sortbylastname . ' / ' . $sortbyfirstname;
          } else {
              $sortbyname = $sortbyfirstname . ' / ' . $sortbylastname;
          }
  
          $sortbydate = $this->helper_sortable_heading(get_string('dateawarded', 'badges'),
                  'dateissued', $recipients->sort, $recipients->dir);
  
          $table->head = array($sortbyname, $sortbydate, '');
  
          foreach ($recipients->userids as $holder) {
              $fullname = fullname($holder);
              $fullname = html_writer::link(
                              new moodle_url('/user/profile.php', array('id' => $holder->userid)),
                              $fullname
                          );
              $awarded  = userdate($holder->dateissued);
              $badgeurl = html_writer::link(
                              new moodle_url('/badges/badge.php', array('hash' => $holder->uniquehash)),
                              get_string('viewbadge', 'badges')
                          );
  
              $row = array($fullname, $awarded, $badgeurl);
              $table->data[] = $row;
          }
  
          $htmltable = html_writer::table($table);
  
          return $htmlpagingbar . $htmltable . $htmlpagingbar;
      }
code: protected function render_badge_recipients(badge_recipients $recipients) {
          $paging = new paging_bar($recipients->totalcount, $recipients->page, $recipients->perpage, $this->page->url, 'page');
          $htmlpagingbar = $this->render($paging);
          $table = new html_table();
          $table->attributes['class'] = 'generaltable boxaligncenter boxwidthwide';
  
          $sortbyfirstname = $this->helper_sortable_heading(get_string('firstname'),
                  'firstname', $recipients->sort, $recipients->dir);
          $sortbylastname = $this->helper_sortable_heading(get_string('lastname'),
                  'lastname', $recipients->sort, $recipients->dir);
          if ($this->helper_fullname_format() == 'lf') {
              $sortbyname = $sortbylastname . ' / ' . $sortbyfirstname;
          } else {
              $sortbyname = $sortbyfirstname . ' / ' . $sortbylastname;
          }
  
          $sortbydate = $this->helper_sortable_heading(get_string('dateawarded', 'badges'),
                  'dateissued', $recipients->sort, $recipients->dir);
  
          $table->head = array($sortbyname, $sortbydate, '');
  
          foreach ($recipients->userids as $holder) {
              $fullname = fullname($holder);
              $fullname = html_writer::link(
                              new moodle_url('/user/profile.php', array('id' => $holder->userid)),
                              $fullname
                          );
              $awarded  = userdate($holder->dateissued);
              $badgeurl = html_writer::link(
                              new moodle_url('/badges/badge.php', array('hash' => $holder->uniquehash)),
                              get_string('viewbadge', 'badges')
                          );
  
              $row = array($fullname, $awarded, $badgeurl);
              $table->data[] = $row;
          }
  
          $htmltable = html_writer::table($table);
  
          return $htmlpagingbar . $htmltable . $htmlpagingbar;
      }
code_tokens: protected function render_badge_recipients ( badge_recipients $ recipients ) { $ paging = new paging_bar ( $ recipients -> totalcount , $ recipients -> page , $ recipients -> perpage , $ this -> page -> url , 'page' ) ; $ htmlpagingbar = $ this -> render ( $ paging ) ; $ table = new html_table ( ) ; $ table -> attributes [ 'class' ] = 'generaltable boxaligncenter boxwidthwide' ; $ sortbyfirstname = $ this -> helper_sortable_heading ( get_string ( 'firstname' ) , 'firstname' , $ recipients -> sort , $ recipients -> dir ) ; $ sortbylastname = $ this -> helper_sortable_heading ( get_string ( 'lastname' ) , 'lastname' , $ recipients -> sort , $ recipients -> dir ) ; if ( $ this -> helper_fullname_format ( ) == 'lf' ) { $ sortbyname = $ sortbylastname . ' / ' . $ sortbyfirstname ; } else { $ sortbyname = $ sortbyfirstname . ' / ' . $ sortbylastname ; } $ sortbydate = $ this -> helper_sortable_heading ( get_string ( 'dateawarded' , 'badges' ) , 'dateissued' , $ recipients -> sort , $ recipients -> dir ) ; $ table -> head = array ( $ sortbyname , $ sortbydate , '' ) ; foreach ( $ recipients -> userids as $ holder ) { $ fullname = fullname ( $ holder ) ; $ fullname = html_writer :: link ( new moodle_url ( '/user/profile.php' , array ( 'id' => $ holder -> userid ) ) , $ fullname ) ; $ awarded = userdate ( $ holder -> dateissued ) ; $ badgeurl = html_writer :: link ( new moodle_url ( '/badges/badge.php' , array ( 'hash' => $ holder -> uniquehash ) ) , get_string ( 'viewbadge' , 'badges' ) ) ; $ row = array ( $ fullname , $ awarded , $ badgeurl ) ; $ table -> data [ ] = $ row ; } $ htmltable = html_writer :: table ( $ table ) ; return $ htmlpagingbar . $ htmltable . $ htmlpagingbar ; }
docstring: Based on stamps collection plugin.
docstring_tokens: Based on stamps collection plugin .