. namespace theme_ilb\output; use moodle_url; defined('MOODLE_INTERNAL') || die; /** * Renderers to align Moodle's HTML with that expected by Bootstrap * * @package theme_ilb * @copyright 2012 Bas Brands, www.basbrands.nl * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class core_renderer extends \core_renderer { public function edit_button(moodle_url $url) { $url->param('sesskey', sesskey()); if ($this->page->user_is_editing()) { $url->param('edit', 'off'); $editstring = get_string('turneditingoff'); } else { $url->param('edit', 'on'); $editstring = get_string('turneditingon'); } $button = new \single_button($url, $editstring, 'post', ['class' => 'btn btn-primary']); return $this->render_single_button($button); } }