Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit a9f19d81b96aa83dabe4af0e1aea1f2ab8758c28 1 parent 7be06fa
@dcai dcai authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 mod/data/view.php
View
15 mod/data/view.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.