Commit a9f19d81 authored by Dongsheng Cai's avatar Dongsheng Cai
Browse files

"DATA MODULE MDL-25564 fixed $PAGE->url, credits to Davo Smith"

parent 7be06fa5
......@@ -256,8 +256,21 @@
add_to_log($course->id, 'data', 'view', "view.php?id=$cm->id", $data->id, $cm->id);
$urlparams = array('d' => $data->id);
if ($record) {
$urlparams['rid'] = $record->id;
}
if ($page) {
$urlparams['page'] = $page;
}
if ($mode) {
$urlparams['mode'] = $mode;
}
if ($filter) {
$urlparams['filter'] = $filter;
}
// Initialize $PAGE, compute blocks
$PAGE->set_url('/mod/data/view.php', array('id' => $cm->id));
$PAGE->set_url('/mod/data/view.php', $urlparams);
if (($edit != -1) and $PAGE->user_allowed_editing()) {
$USER->editing = $edit;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment