original_string: protected function render_add_button($courseid) {
          global $CFG;
  
          $button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'), ['class' => 'btn btn-primary']);
          $addurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/edit.php', array('courseid' => $courseid));
          return \html_writer::link($addurl, $button);
      }
code: protected function render_add_button($courseid) {
          global $CFG;
  
          $button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'), ['class' => 'btn btn-primary']);
          $addurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/edit.php', array('courseid' => $courseid));
          return \html_writer::link($addurl, $button);
      }
code_tokens: protected function render_add_button ( $ courseid ) { global $ CFG ; $ button = \ html_writer :: tag ( 'button' , get_string ( 'addrule' , 'tool_monitor' ) , [ 'class' => 'btn btn-primary' ] ) ; $ addurl = new \ moodle_url ( $ CFG -> wwwroot . '/admin/tool/monitor/edit.php' , array ( 'courseid' => $ courseid ) ) ; return \ html_writer :: link ( $ addurl , $ button ) ; }
docstring: Html to add a button for adding a new rule.
  
  @param int $courseid course id.
  
  @return string html for the button.
docstring_tokens: Html to add a button for adding a new rule .