Skip to content

Commit

Permalink
tag MDL-19823 Addes set_url calls
Browse files Browse the repository at this point in the history
  • Loading branch information
samhemelryk committed Oct 16, 2009
1 parent 2e2f2d3 commit 333abbf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
12 changes: 12 additions & 0 deletions tag/coursetags_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
$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)) {
Expand Down
12 changes: 12 additions & 0 deletions tag/coursetags_more.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
$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');
}
Expand Down
2 changes: 1 addition & 1 deletion tag/tag_autocomplete.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

require_once('../config.php');
require_once('lib.php');
Expand Down

0 comments on commit 333abbf

Please sign in to comment.