original_string: public function neighbouring_discussion_navigation($prev, $next) {
          $html = '';
          if ($prev || $next) {
              $html .= html_writer::start_tag('div', array('class' => 'discussion-nav clearfix'));
              $html .= html_writer::start_tag('ul');
              if ($prev) {
                  $url = new moodle_url('/mod/forum/discuss.php', array('d' => $prev->id));
                  $html .= html_writer::start_tag('li', array('class' => 'prev-discussion'));
                  $html .= html_writer::link($url, format_string($prev->name),
                      array('aria-label' => get_string('prevdiscussiona', 'mod_forum', format_string($prev->name))));
                  $html .= html_writer::end_tag('li');
              }
              if ($next) {
                  $url = new moodle_url('/mod/forum/discuss.php', array('d' => $next->id));
                  $html .= html_writer::start_tag('li', array('class' => 'next-discussion'));
                  $html .= html_writer::link($url, format_string($next->name),
                      array('aria-label' => get_string('nextdiscussiona', 'mod_forum', format_string($next->name))));
                  $html .= html_writer::end_tag('li');
              }
              $html .= html_writer::end_tag('ul');
              $html .= html_writer::end_tag('div');
          }
          return $html;
      }
code: public function neighbouring_discussion_navigation($prev, $next) {
          $html = '';
          if ($prev || $next) {
              $html .= html_writer::start_tag('div', array('class' => 'discussion-nav clearfix'));
              $html .= html_writer::start_tag('ul');
              if ($prev) {
                  $url = new moodle_url('/mod/forum/discuss.php', array('d' => $prev->id));
                  $html .= html_writer::start_tag('li', array('class' => 'prev-discussion'));
                  $html .= html_writer::link($url, format_string($prev->name),
                      array('aria-label' => get_string('prevdiscussiona', 'mod_forum', format_string($prev->name))));
                  $html .= html_writer::end_tag('li');
              }
              if ($next) {
                  $url = new moodle_url('/mod/forum/discuss.php', array('d' => $next->id));
                  $html .= html_writer::start_tag('li', array('class' => 'next-discussion'));
                  $html .= html_writer::link($url, format_string($next->name),
                      array('aria-label' => get_string('nextdiscussiona', 'mod_forum', format_string($next->name))));
                  $html .= html_writer::end_tag('li');
              }
              $html .= html_writer::end_tag('ul');
              $html .= html_writer::end_tag('div');
          }
          return $html;
      }
code_tokens: public function neighbouring_discussion_navigation ( $ prev , $ next ) { $ html = '' ; if ( $ prev || $ next ) { $ html .= html_writer :: start_tag ( 'div' , array ( 'class' => 'discussion-nav clearfix' ) ) ; $ html .= html_writer :: start_tag ( 'ul' ) ; if ( $ prev ) { $ url = new moodle_url ( '/mod/forum/discuss.php' , array ( 'd' => $ prev -> id ) ) ; $ html .= html_writer :: start_tag ( 'li' , array ( 'class' => 'prev-discussion' ) ) ; $ html .= html_writer :: link ( $ url , format_string ( $ prev -> name ) , array ( 'aria-label' => get_string ( 'prevdiscussiona' , 'mod_forum' , format_string ( $ prev -> name ) ) ) ) ; $ html .= html_writer :: end_tag ( 'li' ) ; } if ( $ next ) { $ url = new moodle_url ( '/mod/forum/discuss.php' , array ( 'd' => $ next -> id ) ) ; $ html .= html_writer :: start_tag ( 'li' , array ( 'class' => 'next-discussion' ) ) ; $ html .= html_writer :: link ( $ url , format_string ( $ next -> name ) , array ( 'aria-label' => get_string ( 'nextdiscussiona' , 'mod_forum' , format_string ( $ next -> name ) ) ) ) ; $ html .= html_writer :: end_tag ( 'li' ) ; } $ html .= html_writer :: end_tag ( 'ul' ) ; $ html .= html_writer :: end_tag ( 'div' ) ; } return $ html ; }
docstring: Returns the navigation to the previous and next discussion.
  
  @param mixed $prev Previous discussion record, or false.
  @param mixed $next Next discussion record, or false.
  @return string The output.
docstring_tokens: Returns the navigation to the previous and next discussion .