/** * Construct this renderable. * * @param context $pagecontext The page context */ public function __construct(context $pagecontext) { $this->pagecontext = $pagecontext; if (competency_framework::can_manage_context($this->pagecontext)) { $addpage = new single_button(new moodle_url('/admin/tool/lp/editcompetencyframework.php', array('pagecontextid' => $this->pagecontext->id)), get_string('addnewcompetencyframework', 'tool_lp'), 'get'); $this->navigation[] = $addpage; } $this->competencyframeworks = api::list_frameworks('shortname', 'ASC', 0, 0, $this->pagecontext); }