diff --git a/backup/backup.php b/backup/backup.php index 941ea8178d2ac..f5fb93d0e1269 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -13,6 +13,18 @@ $cancel = optional_param('cancel', '', PARAM_RAW); $launch = optional_param('launch', '', PARAM_ACTION); + $url = new moodle_url(); + if ($id !== 0) { + $url->param('id', $id); + } + if ($to !== 0) { + $url->param('to', $to); + } + if ($launch !== '') { + $url->param('launch', $launch); + } + $PAGE->set_url($url); + $loginurl = get_login_url(); if (!empty($id)) { diff --git a/backup/restore.php b/backup/restore.php index bc7a27f7852a8..4e5aab706fd51 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -22,6 +22,29 @@ $method = optional_param('method', '', PARAM_ACTION); $backup_unique_code = optional_param('backup_unique_code',0,PARAM_INT); + $url = new moodle_url($CFG->wwwroot.'/backup/restore.php'); + if ($id !== 0) { + $url->param('id', $id); + } + if ($file !== 0) { + $url->param('file', $file); + } + if ($cancel !== '') { + $url->param('cancel', $cancel); + } + if ($launch !== '') { + $url->param('launch', $launch); + } + if ($to !== '') { + $url->param('to', $to); + } + if ($method !== '') { + $url->param('method', $method); + } + if ($backup_unique_code !== 0) { + $url->param('backup_unique_code', $backup_unique_code); + } + //Check login require_login(); diff --git a/course/report/stats/graph.php b/course/report/stats/graph.php index 0297de7ca373f..8a5796c5c1724 100644 --- a/course/report/stats/graph.php +++ b/course/report/stats/graph.php @@ -34,7 +34,14 @@ $userid = optional_param('userid', 0, PARAM_INT); $roleid = optional_param('roleid',0,PARAM_INT); - +$url = new moodle_url($CFG->wwwroot.'/course/report/stats/graph.php', array('course'=>$courseid, 'report'=>$report, 'time'=>$time, 'mode'=>$mode)); +if ($userid !== 0) { + $url->param('userid', $userid); +} +if ($roleid !== 0) { + $url->param('roleid', $roleid); +} +$PAGE->set_url($url); if (!$course = $DB->get_record("course", array("id"=>$courseid))) { print_error("invalidcourseid");