public function display($forum)
 {
     $params = $forum->get_link_params_array();
     if ($forum->get_group_mode()) {
         $params['group'] = forum::get_activity_group($forum->get_course_module());
     }
     return parent::get_button($forum, get_string('markallread', 'forumng'), 'markread.php', true, $params);
 }
 public function display($forum)
 {
     // Work out current status
     $manualmark = !forum::mark_read_automatically();
     $current = get_string($manualmark ? 'manualmark_manual' : 'manualmark_auto', 'forumng');
     // Make a help button
     $change = get_string('manualmark_change', 'forumng');
     $helpbutton = helpbutton('manualmark', $change, 'forumng', true, false, '', true);
     // Get the button form
     $params = $forum->get_link_params_array();
     return parent::get_button($forum, $change, 'feature/manualmark/change.php', true, $params, $helpbutton, 'forumng-manualmark', $current . ' ', 'forumng-button-to-link');
 }
 /**
  * Displays discussion list features for this forum. Features are the
  * plugins in the 'feature' subfolder - basically a row of buttons along
  * the bottom.
  * @param int $groupid Group ID
  * @return string HTML code for discussion list features
  */
 public function display_discussion_list_features($groupid)
 {
     // Print discussion list feature buttons (userposts button)
     $features = '';
     foreach (discussion_list_feature::get_all() as $feature) {
         if ($feature->should_display($this, $groupid)) {
             $features .= $feature->display($this, $groupid);
         }
     }
     if ($features) {
         return '<div id="forumng-features">' . $features . '</div>';
     } else {
         return '';
     }
 }
 public function display($forum)
 {
     $name = get_string('viewpostsbyuser', 'forumng');
     $script = 'feature/userposts/list.php';
     return parent::get_button($forum, $name, $script);
 }