Commit 035c8387 authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Bug #1050292: Fix pagination for viewing blogpost artefacts

When not in a block (ie viewing one individual artefact) the
blockid was appended to the container, this should be removed
when not in block context

Change-Id: I7c131b761ee8c1006164eb6c918bb67b5e785171
Signed-off-by: default avatarHugh Davenport <>
parent 7e25149d
......@@ -65,7 +65,10 @@ else {
if (!can_view_view($viewid)) {
json_reply(true, get_string('accessdenied', 'error'));
$options = array('viewid' => $viewid);
$options = array(
'viewid' => $viewid,
'countcomments' => true,
$posts = ArtefactTypeBlogpost::get_posts($blogid, $limit, $offset, $options);
$template = 'artefact:blog:viewposts.tpl';
......@@ -10,19 +10,19 @@
<div id="blogdescription">{$description|clean_html|safe}
{if $tags}<p class="tags s"><label>{str tag=tags}:</label> {list_tags owner=$owner tags=$tags}</p>{/if}
<table id="postlist_{$blockid}" class="postlist">
<table id="postlist{if $blockid}_{$blockid}{/if}" class="postlist">
{if $posts.pagination}
<div id="blogpost_page_container_{$blockid}" class="hidden center">{$posts.pagination|safe}</div>
<div id="blogpost_page_container{if $blockid}_{$blockid}{/if}" class="hidden center">{$posts.pagination|safe}</div>
{if $posts.pagination_js}
addLoadEvent(function() {literal}{{/literal}
removeElementClass('blogpost_page_container_{$blockid}', 'hidden');
removeElementClass('blogpost_page_container{if $blockid}_{$blockid}{/if}', 'hidden');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment