diff --git a/classes/template_table.php b/classes/template_table.php index ab49801..99e05c3 100644 --- a/classes/template_table.php +++ b/classes/template_table.php @@ -89,9 +89,6 @@ public function __construct() { /** * Generate title. - * - * @param \stdClass $data - * @return mixed */ public function col_title($data) { return format_string($data->title); diff --git a/lib.php b/lib.php index b08c549..8c13cd9 100644 --- a/lib.php +++ b/lib.php @@ -26,6 +26,9 @@ require_once($CFG->dirroot. '/course/format/lib.php'); + +use format_kickstart\output\course_template_list; + /** * Main class for the Kickstart course format * @@ -44,6 +47,34 @@ public function supports_news() { return false; } + + /** + * Course-specific information to be output on any course page (usually above navigation bar) + * + * Example of usage: + * define + * class format_FORMATNAME_XXX implements renderable {} + * + * create format renderer in course/format/FORMATNAME/renderer.php, define rendering function: + * class format_FORMATNAME_renderer extends plugin_renderer_base { + * protected function render_format_FORMATNAME_XXX(format_FORMATNAME_XXX $xxx) { + * return html_writer::tag('div', 'This is my header/footer'); + * } + * } + * + * Return instance of format_FORMATNAME_XXX in this function, the appropriate method from + * plugin renderer will be called + * + * @return null|\renderable null for no output or object with data for plugin renderer + */ + public function course_header() { + global $CFG; + if (format_kickstart_has_pro()) { + require_once($CFG->dirroot. "/local/kickstart_pro/lib.php"); + local_kickstart_pro_redirect_automatictemplate(); + } + } + /** * Definitions of the additional options that this course format uses for course * diff --git a/version.php b/version.php index 6fa1497..0bd67e3 100644 --- a/version.php +++ b/version.php @@ -18,15 +18,15 @@ * Version details * * @package format_kickstart - * @copyright 2023 bdecent gmbh + * @copyright 2021 bdecent gmbh * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2023112703; // The current plugin version (Date: YYYYMMDDXX). -$plugin->requires = 2022041900; // Requires this Moodle version. +$plugin->requires = 2022030300; // Requires this Moodle version. $plugin->release = 'Version 1.3'; $plugin->component = 'format_kickstart'; // Full name of the plugin (used for diagnostics). -$plugin->supported = [400, 403]; +$plugin->supported = [40, 402]; $plugin->maturity = MATURITY_STABLE;