Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-30798 Blog: link param for entries about this course link is fixed

  • Loading branch information...
commit 0c9b8dc4b354daeda9162a57333e073001daf355 1 parent 9a7c3d5
Rajesh Taneja authored July 16, 2012
4  blocks/blog_recent/block_blog_recent.php
@@ -82,17 +82,20 @@ function get_content() {
82 82
 
83 83
         $context = $this->page->context;
84 84
 
  85
+        $url = new moodle_url('/blog/index.php');
85 86
         $filter = array();
86 87
         if ($context->contextlevel == CONTEXT_MODULE) {
87 88
             $filter['module'] = $context->instanceid;
88 89
             $a = new stdClass;
89 90
             $a->type = get_string('modulename', $this->page->cm->modname);
90 91
             $strview = get_string('viewallmodentries', 'blog', $a);
  92
+            $url->param('modid', $context->instanceid);
91 93
         } else if ($context->contextlevel == CONTEXT_COURSE) {
92 94
             $filter['course'] = $context->instanceid;
93 95
             $a = new stdClass;
94 96
             $a->type = get_string('course');
95 97
             $strview = get_string('viewblogentries', 'blog', $a);
  98
+            $url->param('courseid', $context->instanceid);
96 99
         } else {
97 100
             $strview = get_string('viewsiteentries', 'blog');
98 101
         }
@@ -100,7 +103,6 @@ function get_content() {
100 103
 
101 104
         $bloglisting = new blog_listing($filter);
102 105
         $entries = $bloglisting->get_entries(0, $this->config->numberofrecentblogentries, 4);
103  
-        $url = new moodle_url('/blog/index.php', $filter);
104 106
 
105 107
         if (!empty($entries)) {
106 108
             $entrieslist = array();

0 notes on commit 0c9b8dc

Please sign in to comment.
Something went wrong with that request. Please try again.