. /** * Renderer for outputting the tiles course format. * * @package format_tiles * @copyright 2018 David Watson {@link http://evolutioncode.uk} * @copyright Based partly on previous topics format renderer and general course format renderer * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since Moodle 2.7 */ defined('MOODLE_INTERNAL') || die(); require_once($CFG->dirroot . '/course/format/renderer.php'); require_once($CFG->dirroot . '/course/format/tiles/locallib.php'); /** * Basic renderer for tiles format. * @package format_tiles * @copyright 2016 David Watson {@link http://evolutioncode.uk} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class format_tiles_renderer extends format_section_renderer_base { /** * Constructor method, calls the parent constructor * * @param moodle_page $page * @param string $target one of rendering target constants */ public function __construct(moodle_page $page, $target) { parent::__construct($page, $target); // Method format_tiles_renderer::section_edit_controls() displays 'Set current section' control when editing is on. // We need to ensure that 'Turn editing mode on' link is available for user who doesn't have other managing capability. $page->set_other_editing_capability('moodle/course:setcurrentsection'); } /** * Generate the starting container html for a list of sections as