]> git.mjollnir.org Git - moodle.git/commitdiff
tag MDL-19823 Addes set_url calls
authorsamhemelryk <samhemelryk>
Fri, 16 Oct 2009 03:24:19 +0000 (03:24 +0000)
committersamhemelryk <samhemelryk>
Fri, 16 Oct 2009 03:24:19 +0000 (03:24 +0000)
tag/coursetags_edit.php
tag/coursetags_more.php
tag/tag_autocomplete.php

index c06a932f2e19a3b0eea6b6ca72342cf7d295c867..00ad861324fc9dcbf1dadbaa1d0e155b9041ad5b 100644 (file)
@@ -14,6 +14,18 @@ $courseid = optional_param('courseid', 0, PARAM_INT);
 $keyword = optional_param('coursetag_new_tag', '', PARAM_TEXT);
 $deltag = optional_param('del_tag', 0, PARAM_INT);
 
+$url = new moodle_url($CFG->wwwroot.'/tag/coursetags_edit.php');
+if ($courseid !== 0) {
+    $url->param('courseid', $courseid);
+}
+if ($keyword !== '') {
+    $url->param('coursetag_new_tag', $keyword);
+}
+if ($deltag !== 0) {
+    $url->param('del_tag', $deltag);
+}
+$PAGE->set_url($url);
+
 require_login();
 
 if (empty($CFG->usetags)) {
index 1eb2728edb9fb83ed12fcf77f02608d13f9ab471..a49eccb217a2e299dbe54257d4eff8ce38f7a9ca 100644 (file)
@@ -13,6 +13,18 @@ $sort = optional_param('sort', 'alpha', PARAM_TEXT); //alpha, date or popularity
 $show = optional_param('show', 'all', PARAM_TEXT); //all, my, official, community or course
 $courseid = optional_param('courseid', 0, PARAM_INT);
 
+$url = new moodle_url($CFG->wwwroot.'/tag/coursetags_more.php');
+if ($sort !== 'alpha') {
+    $url->param('sort', $sort);
+}
+if ($show !== 'all') {
+    $url->param('show', $show);
+}
+if ($courseid !== 0) {
+    $url->param('courseid', $courseid);
+}
+$PAGE->set_url($url);
+
 if (empty($CFG->usetags)) {
     print_error('tagsaredisabled', 'tag');
 }
index 60a648d3ad70d2c26a9b0df8156e0947992a80d3..f3f24d1cab0d14516a4f2757b8a0cc7ed8d4c59e 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 require_once('../config.php');
 require_once('lib.php');