original_string: protected function print_badge_alignments(badge $badge) {
          $output = '';
          $output .= $this->heading(get_string('alignment', 'badges'), 3);
          $alignments = $badge->get_alignments();
          if (!empty($alignments)) {
              $items = array();
              foreach ($alignments as $alignment) {
                  $urlaligment = new moodle_url('alignment.php',
                      array('id' => $badge->id, 'alignmentid' => $alignment->id)
                  );
                  $items[] = html_writer::link($urlaligment, $alignment->targetname, array('target' => '_blank'));
              }
              $output .= html_writer::alist($items, array(), 'ul');
          } else {
              $output .= get_string('noalignment', 'badges');
          }
          return $output;
      }
code: protected function print_badge_alignments(badge $badge) {
          $output = '';
          $output .= $this->heading(get_string('alignment', 'badges'), 3);
          $alignments = $badge->get_alignments();
          if (!empty($alignments)) {
              $items = array();
              foreach ($alignments as $alignment) {
                  $urlaligment = new moodle_url('alignment.php',
                      array('id' => $badge->id, 'alignmentid' => $alignment->id)
                  );
                  $items[] = html_writer::link($urlaligment, $alignment->targetname, array('target' => '_blank'));
              }
              $output .= html_writer::alist($items, array(), 'ul');
          } else {
              $output .= get_string('noalignment', 'badges');
          }
          return $output;
      }
code_tokens: protected function print_badge_alignments ( badge $ badge ) { $ output = '' ; $ output .= $ this -> heading ( get_string ( 'alignment' , 'badges' ) , 3 ) ; $ alignments = $ badge -> get_alignments ( ) ; if ( ! empty ( $ alignments ) ) { $ items = array ( ) ; foreach ( $ alignments as $ alignment ) { $ urlaligment = new moodle_url ( 'alignment.php' , array ( 'id' => $ badge -> id , 'alignmentid' => $ alignment -> id ) ) ; $ items [ ] = html_writer :: link ( $ urlaligment , $ alignment -> targetname , array ( 'target' => '_blank' ) ) ; } $ output .= html_writer :: alist ( $ items , array ( ) , 'ul' ) ; } else { $ output .= get_string ( 'noalignment' , 'badges' ) ; } return $ output ; }
docstring: Print list badge alignments.
  
  @param badge $badge Badge objects.
  @return string $output List alignments to output.
docstring_tokens: Print list badge alignments .