/** * 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); // Since format_topics_renderer::section_edit_controls() only displays the 'Set current section' control when editing mode is on // we need to be sure that the link 'Turn editing mode on' is available for a user who does not have any other managing capability. $page->set_other_editing_capability('moodle/course:setcurrentsection'); }
/** * Constructor method, calls the parent constructor - MDL-21097 * * @param moodle_page $page * @param string $target one of rendering target constants */ public function __construct(moodle_page $page, $target) { parent::__construct($page, $target); $this->courseformat = course_get_format($page->course); $this->settings = $this->courseformat->get_settings(); /* Since format_grid_renderer::section_edit_controls() only displays the 'Set current section' control when editing mode is on we need to be sure that the link 'Turn editing mode on' is available for a user who does not have any other managing capability. */ $page->set_other_editing_capability('moodle/course:setcurrentsection'); }
/** * Constructor method, calls the parent constructor - MDL-21097 * * @param moodle_page $page * @param string $target one of rendering target constants */ public function __construct(moodle_page $page, $target) { parent::__construct($page, $target); $this->togglelib = new topcoll_togglelib(); $this->courseformat = course_get_format($page->course); // Needed for collapsed topics settings retrieval. /* Since format_topcoll_renderer::section_edit_controls() only displays the 'Set current section' control when editing mode is on we need to be sure that the link 'Turn editing mode on' is available for a user who does not have any other managing capability. */ $page->set_other_editing_capability('moodle/course:setcurrentsection'); global $PAGE; $this->userisediting = $PAGE->user_is_editing(); $this->tctoggleiconsize = clean_param(get_config('format_topcoll', 'defaulttoggleiconsize'), PARAM_TEXT); }
/** * 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 = null) { parent::__construct($page, $target); require "renderer.php"; $this->courserenderer = new template_course_renderer($page, $target); }