Permalink
Browse files

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

  • Loading branch information...
1 parent 904673d commit 8450069ad447ab499dd2d42aaaa9385e96f08dd8 Rajesh Taneja committed Jul 16, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 blocks/blog_recent/block_blog_recent.php
@@ -86,25 +86,27 @@ function get_content() {
$context = $this->page->context;
+ $url = new moodle_url('/blog/index.php');
$filter = array();
if ($context->contextlevel == CONTEXT_MODULE) {
$filter['module'] = $context->instanceid;
$a = new stdClass;
$a->type = get_string('modulename', $this->page->cm->modname);
$strview = get_string('viewallmodentries', 'blog', $a);
+ $url->param('modid', $context->instanceid);
} else if ($context->contextlevel == CONTEXT_COURSE) {
$filter['course'] = $context->instanceid;
$a = new stdClass;
$a->type = get_string('course');
$strview = get_string('viewblogentries', 'blog', $a);
+ $url->param('courseid', $context->instanceid);
} else {
$strview = get_string('viewsiteentries', 'blog');
}
$filter['since'] = $this->config->recentbloginterval;
$bloglisting = new blog_listing($filter);
$entries = $bloglisting->get_entries(0, $this->config->numberofrecentblogentries, 4);
- $url = new moodle_url('/blog/index.php', $filter);
if (!empty($entries)) {
$entrieslist = array();

0 comments on commit 8450069

Please sign in to comment.