-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackups.php
More file actions
44 lines (35 loc) · 1.48 KB
/
backups.php
File metadata and controls
44 lines (35 loc) · 1.48 KB
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
<?php
// This file is part of the blocks/disk_quota Moodle plugin
//
// 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/>.
require_once("../../config.php");
require_once($CFG->dirroot.'/mod/assign/locallib.php');
require_login();
$systemcontext = context_system::instance();
require_capability('block/disk_quota:viewusage', $systemcontext);
$PAGE->set_url('/blocks/disk_quota/backups.php');
$PAGE->set_context($systemcontext);
$PAGE->set_pagelayout('report');
// Print the header.
$title = get_string("backup_page_title", "block_disk_quota");
$PAGE->navbar->add($title, new moodle_url('/blocks/disk_quota/index.php'));
$PAGE->navbar->add("Backups");
$PAGE->set_title($title);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($title));
$page = optional_param('page', 1, PARAM_INT);
$perpage = 15;
$renderer = $PAGE->get_renderer('block_disk_quota');
echo $renderer->disk_backup_usage($page, $perpage);
echo $OUTPUT->footer();