From 12ceaa551485f632d7542409bed77ff9fca2bea1 Mon Sep 17 00:00:00 2001
From: Sam Hemelryk <sam@moodle.com>
Date: Thu, 31 Oct 2013 09:18:08 +0800
Subject: [PATCH] MDL-42619 block_community: delete course redirect bug fix

---
 blocks/community/communitycourse.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blocks/community/communitycourse.php b/blocks/community/communitycourse.php
index a7224e5c52e..b87920c09df 100644
--- a/blocks/community/communitycourse.php
+++ b/blocks/community/communitycourse.php
@@ -130,7 +130,7 @@ $communityid = optional_param('communityid', '', PARAM_INT);
 if ($remove != -1 and !empty($communityid) and confirm_sesskey()) {
     $communitymanager->block_community_remove_course($communityid, $USER->id);
     echo $OUTPUT->header();
-    echo $renderer->remove_success(new moodle_url(get_referer(false)));
+    echo $renderer->remove_success(new moodle_url('/course/view.php', array('id' => $courseid)));
     echo $OUTPUT->footer();
     die();
 }