-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patherror.php
38 lines (28 loc) · 1 KB
/
error.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
<?php
/**
* Institutions Error Page
* @copyright 2013 Bruno Sampaio
*/
require_once('../../config.php');
require_once('lib.php');
$site = get_site();
$strinstitution = get_string('institution', 'local_institutions');
$strinstitutions = get_string('institutions', 'local_institutions');
$strinstitutionerror = get_string('error-institution', 'local_institutions');
$strerror = get_string('error');
$PAGE->set_pagelayout('admin');
$PAGE->set_url('/local/institutions/error.php');
$PAGE->set_context(context_system::instance());
if(local_institutions_table_exists()) {
redirect(new moodle_url($CFG->wwwroot.'/local/institutions/'));
}
else {
$PAGE->navbar->add($strinstitutions, new moodle_url('/local/institutions/index.php'));
$PAGE->navbar->add($strerror);
$PAGE->set_title("$site->shortname: $strinstitutionerror");
$PAGE->set_heading("$strinstitutionerror");
echo $OUTPUT->header();
echo $OUTPUT->heading("$strinstitutionerror");
echo local_institutions_print_table_error();
echo $OUTPUT->footer();
}