-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
51 lines (43 loc) · 1.82 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* List available alerts
*
* @package local_solalerts
* @author Mark Sharp <[email protected]>
* @copyright 2022 Solent University {@link https://www.solent.ac.uk}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../../config.php');
require_once($CFG->libdir . '/adminlib.php');
$context = context_system::instance();
$url = new moodle_url('/local/solalerts/index.php');
admin_externalpage_setup('solalerts', null, null, $url);
$PAGE->set_context($context);
$PAGE->set_heading(get_string('pluginname', 'local_solalerts'));
$PAGE->set_pagelayout('admin');
$PAGE->set_title(get_string('pluginname', 'local_solalerts'));
$PAGE->set_url($url);
echo $OUTPUT->header();
echo clean_text(get_string('displayconditions_desc', 'local_solalerts'));
$new = new action_link(new moodle_url('/local/solalerts/edit.php', ['action' => 'new']),
get_string('newsolalert', 'local_solalerts'), null,
['class' => 'btn btn-primary'],
new pix_icon('i/calendareventtime', null));
echo $OUTPUT->render($new);
$table = new \local_solalerts\tables\solalerts_table('solalerts');
$table->out(100, false);
echo $OUTPUT->footer();