original_string: protected function print_badge_related(badge $badge) {
          $output = '';
          $relatedbadges = $badge->get_related_badges();
          $output .= $this->heading(get_string('relatedbages', 'badges'), 3);
          if (!empty($relatedbadges)) {
              $items = array();
              foreach ($relatedbadges as $related) {
                  $relatedurl = new moodle_url('/badges/overview.php', array('id' => $related->id));
                  $items[] = html_writer::link($relatedurl->out(), $related->name, array('target' => '_blank'));
              }
              $output .= html_writer::alist($items, array(), 'ul');
          } else {
              $output .= get_string('norelated', 'badges');
          }
          return $output;
      }
code: protected function print_badge_related(badge $badge) {
          $output = '';
          $relatedbadges = $badge->get_related_badges();
          $output .= $this->heading(get_string('relatedbages', 'badges'), 3);
          if (!empty($relatedbadges)) {
              $items = array();
              foreach ($relatedbadges as $related) {
                  $relatedurl = new moodle_url('/badges/overview.php', array('id' => $related->id));
                  $items[] = html_writer::link($relatedurl->out(), $related->name, array('target' => '_blank'));
              }
              $output .= html_writer::alist($items, array(), 'ul');
          } else {
              $output .= get_string('norelated', 'badges');
          }
          return $output;
      }
code_tokens: protected function print_badge_related ( badge $ badge ) { $ output = '' ; $ relatedbadges = $ badge -> get_related_badges ( ) ; $ output .= $ this -> heading ( get_string ( 'relatedbages' , 'badges' ) , 3 ) ; if ( ! empty ( $ relatedbadges ) ) { $ items = array ( ) ; foreach ( $ relatedbadges as $ related ) { $ relatedurl = new moodle_url ( '/badges/overview.php' , array ( 'id' => $ related -> id ) ) ; $ items [ ] = html_writer :: link ( $ relatedurl -> out ( ) , $ related -> name , array ( 'target' => '_blank' ) ) ; } $ output .= html_writer :: alist ( $ items , array ( ) , 'ul' ) ; } else { $ output .= get_string ( 'norelated' , 'badges' ) ; } return $ output ; }
docstring: Print list badges related.
  
  @param badge $badge Badge objects.
  @return string $output List related badges to output.
docstring_tokens: Print list badges related .