|
| 1 | +<?php |
| 2 | +// This file is part of Moodle - http://moodle.org/ |
| 3 | +// |
| 4 | +// Moodle is free software: you can redistribute it and/or modify |
| 5 | +// it under the terms of the GNU General Public License as published by |
| 6 | +// the Free Software Foundation, either version 3 of the License, or |
| 7 | +// (at your option) any later version. |
| 8 | +// |
| 9 | +// Moodle is distributed in the hope that it will be useful, |
| 10 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +// GNU General Public License for more details. |
| 13 | +// |
| 14 | +// You should have received a copy of the GNU General Public License |
| 15 | +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + |
| 17 | +/** |
| 18 | + * Displays the installed subplugins (steps and trigger). |
| 19 | + * |
| 20 | + * @package tool_lifecycle |
| 21 | + * @copyright 2025 Thomas Niedermaier University Münster |
| 22 | + * @copyright 2022 Justus Dieckmann WWU |
| 23 | + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| 24 | + */ |
| 25 | + |
| 26 | +use tool_lifecycle\tabs; |
| 27 | +use tool_lifecycle\task\lifecycle_task; |
| 28 | +use tool_lifecycle\urls; |
| 29 | + |
| 30 | +require_once(__DIR__ . '/../../../config.php'); |
| 31 | +require_once($CFG->libdir . '/adminlib.php'); |
| 32 | + |
| 33 | +require_login(); |
| 34 | + |
| 35 | +$syscontext = context_system::instance(); |
| 36 | +$PAGE->set_url(new \moodle_url(urls::RUN)); |
| 37 | +$PAGE->set_context($syscontext); |
| 38 | + |
| 39 | +$PAGE->set_pagetype('admin-setting-' . 'tool_lifecycle'); |
| 40 | +$PAGE->set_pagelayout('admin'); |
| 41 | + |
| 42 | +$renderer = $PAGE->get_renderer('tool_lifecycle'); |
| 43 | + |
| 44 | +$heading = get_string('pluginname', 'tool_lifecycle')." / ".get_string('runtask', 'tool_lifecycle'); |
| 45 | +echo $renderer->header($heading); |
| 46 | +$tabrow = tabs::get_tabrow(); |
| 47 | +$id = 'settings'; |
| 48 | +$renderer->tabs($tabrow, $id); |
| 49 | + |
| 50 | +echo \html_writer::start_div(''); |
| 51 | + |
| 52 | +$task = new lifecycle_task(); |
| 53 | +$task->execute(); |
| 54 | + |
| 55 | +echo \html_writer::end_div(); |
| 56 | + |
| 57 | +echo $renderer->footer(); |
0 commit comments