From 073a538d44e68fb30b3fff780fa1813e1ef476e1 Mon Sep 17 00:00:00 2001 From: Jason Platts Date: Fri, 25 Jul 2014 10:22:39 +0100 Subject: [PATCH] OUBlog: Update My Participation screen design #9824 --- lang/en/oublog.php | 15 ++-- locallib.php | 46 ++++++++---- participation_table.php | 14 ++-- renderer.php | 36 +++++----- styles.css | 6 ++ tests/participation_test.php | 13 +++- userparticipation.php | 134 ++++++++++++++++++++++++----------- version.php | 4 +- view.php | 2 +- 9 files changed, 173 insertions(+), 97 deletions(-) diff --git a/lang/en/oublog.php b/lang/en/oublog.php index 114b0d5..4f40fc0 100644 --- a/lang/en/oublog.php +++ b/lang/en/oublog.php @@ -402,12 +402,13 @@ $string['foruser'] = ' for {$a}'; $string['postsby'] = 'Posts by {$a}'; $string['commentsby'] = 'Comments by {$a}'; -$string['commentonby'] = 'Comment on {$a->title} by {$a->author}'; +$string['commentonby'] = 'Comment on post {$a->title} {$a->date} by {$a->author}'; $string['nouserposts'] = 'No posts made.'; $string['nousercomments'] = 'No comments made.'; $string['savegrades'] = 'Save grades'; $string['gradesupdated'] = 'Grades updated'; $string['usergrade'] = 'User grade'; +$string['nousergrade'] = 'User grade not available.'; // Participation download strings. $string['downloadas'] = 'Download data as'; @@ -526,14 +527,14 @@ $string['import_step2_conflicts_submit'] = 'Import conflicting posts'; // My Participation. -$string['contribution'] = 'Contribution'; -$string['contribution_all'] = 'Contribution - All time'; -$string['contribution_from'] = 'Contribution - From {$a}'; -$string['contribution_to'] = 'Contribution - To {$a}'; -$string['contribution_fromto'] = 'Contribution - From {$a->start} To {$a->end}'; +$string['contribution'] = 'Participation'; +$string['contribution_all'] = 'Participation - All time'; +$string['contribution_from'] = 'Participation - From {$a}'; +$string['contribution_to'] = 'Participation - To {$a}'; +$string['contribution_fromto'] = 'Participation - From {$a->start} To {$a->end}'; $string['start'] = 'From'; $string['end'] = 'To'; -$string['displayperiod'] = 'Contribution selector From date - To date.'; +$string['displayperiod'] = 'Participation selector From date - To date.'; $string['info'] = 'Participation within the selected period.'; $string['displayperiod_help'] = '

The default selects all entries.

You can select \'From\' a date until todays entries.

diff --git a/locallib.php b/locallib.php index 6f60ee3..e586838 100644 --- a/locallib.php +++ b/locallib.php @@ -3036,10 +3036,16 @@ function oublog_get_participation($oublog, $context, $groupid=0, $cm, * @param object $course current course object * @param int $start optional start date * @param int $end optional end date + * @param bool $getposts Return post data + * @param bool $getcomments Return comment data + * @param int $limitfrom limit posts/comments from + * @param int $limitnum number of posts/comments (data only) to limit to + * @param bool $getgrades return grade info * @return array user participation */ function oublog_get_user_participation($oublog, $context, - $userid, $groupid=0, $cm, $course, $start = null, $end = null) { + $userid, $groupid = 0, $cm, $course, $start = null, $end = null, + $getposts = true, $getcomments = true, $limitfrom = null, $limitnum = null, $getgrades = false) { global $DB; $testgroupid = $groupid; if ($oublog->individual > 0) { @@ -3071,12 +3077,14 @@ function oublog_get_user_participation($oublog, $context, $cperiod .= 'AND c.timeposted < :timeend '; } $authornamefields = get_all_user_name_fields(true, 'a'); + $postauthornamefields = get_all_user_name_fields(true, 'pa', '', 'poster'); $commentssql = 'SELECT c.id, c.postid, c.title, c.message, c.timeposted, - a.id AS authorid, ' . $authornamefields . ', + a.id AS authorid, ' . $authornamefields . ',' . $postauthornamefields . ', p.title AS posttitle, p.timeposted AS postdate FROM {user} a, {oublog_comments} c INNER JOIN {oublog_posts} p ON (c.postid = p.id) INNER JOIN {oublog_instances} bi ON (bi.id = p.oubloginstancesid) + INNER JOIN {user} pa on bi.userid = pa.id WHERE bi.oublogid = :oublogid AND a.id = bi.userid AND p.timedeleted IS NULL ' . $groupcheck . $cperiod . ' AND c.userid = :userid AND c.timedeleted IS NULL @@ -3093,11 +3101,21 @@ function oublog_get_user_participation($oublog, $context, $fields = user_picture::fields(); $fields .= ',username,idnumber'; $user = $DB->get_record('user', array('id' => $userid), $fields, MUST_EXIST); - $participation = new StdClass; + $participation = new stdClass(); $participation->user = $user; - $participation->posts = $DB->get_records_sql($postssql, $params); - $participation->comments = $DB->get_records_sql($commentssql, $params); - if (oublog_can_grade($course, $oublog, $cm, $groupid)) { + $participation->numposts = $DB->get_field_sql("SELECT COUNT(1) FROM ($postssql) as p", $params); + if ($getposts) { + $participation->posts = $DB->get_records_sql($postssql, $params, $limitfrom, $limitnum); + } else { + $participation->posts = array(); + } + $participation->numcomments = $DB->get_field_sql("SELECT COUNT(1) FROM ($commentssql) as p", $params); + if ($getcomments) { + $participation->comments = $DB->get_records_sql($commentssql, $params, $limitfrom, $limitnum); + } else { + $participation->comments = array(); + } + if ($getgrades && oublog_can_grade($course, $oublog, $cm, $groupid)) { $gradinginfo = grade_get_grades($course->id, 'mod', 'oublog', $oublog->id, array($userid)); $participation->gradeobj = $gradinginfo->items[0]->grades[$userid]; @@ -3899,15 +3917,15 @@ function oublog_stats_output_myparticipation($oublog, $cm, $renderer = null, $co $context = context_module::instance($cm->id); // Get the participation object containing User, Posts and Comments. $participation = oublog_get_user_participation($oublog, $context, - $USER->id, $curgroup, $cm, $course); + $USER->id, $curgroup, $cm, $course, null, null, true, true, null, 8); // Generate content data to send to renderer. $maintitle = get_string('myparticipation', 'oublog');// The title of the block 'section'. $content = ''; $postedcount = $commentedcount = $commenttotal = 0; $postshow = 8; - $postscount = count($participation->posts); - if (count($participation->comments) <= 4) { - $commenttotal = count($participation->comments); + $postscount = $participation->numposts; + if ($participation->numcomments <= 4) { + $commenttotal = $participation->numcomments; } else { $commenttotal = 4; } @@ -3915,7 +3933,7 @@ function oublog_stats_output_myparticipation($oublog, $cm, $renderer = null, $co $content .= html_writer::tag('p', get_string('nouserposts', 'oublog')); } else { $percent = $stat = null; - $content .= html_writer::tag('h3', get_string('numberposts', 'oublog', count($participation->posts))); + $content .= html_writer::tag('h3', get_string('numberposts', 'oublog', $participation->numposts)); foreach ($participation->posts as $post) { if ($postedcount >= ($postshow - $commenttotal)) { break; @@ -3930,7 +3948,7 @@ function oublog_stats_output_myparticipation($oublog, $cm, $renderer = null, $co } } // Pre test the numbers of posts/comments for display upto max. - $postspluscount = count($participation->posts) - $postedcount; + $postspluscount = $participation->numposts - $postedcount; if ($postspluscount >= 1) { $content .= html_writer::tag('p', get_string('numberpostsmore', 'oublog', $postspluscount)); } @@ -3938,7 +3956,7 @@ function oublog_stats_output_myparticipation($oublog, $cm, $renderer = null, $co $content .= html_writer::tag('p', get_string('nousercomments', 'oublog')); } else { $percent = $stat = null;// Removing all stats div. - $content .= html_writer::tag('h3', get_string('numbercomments', 'oublog', count($participation->comments))); + $content .= html_writer::tag('h3', get_string('numbercomments', 'oublog', $participation->numcomments)); foreach ($participation->comments as $comment) { if (($commentedcount + $postedcount) >= $postshow ) { break; @@ -3954,7 +3972,7 @@ function oublog_stats_output_myparticipation($oublog, $cm, $renderer = null, $co } } // If the number of comments is more than can be shown. - $commentspluscount = count($participation->comments) - $commentedcount; + $commentspluscount = $participation->numcomments - $commentedcount; if ($commentspluscount >= 1) { $content .= html_writer::tag('p', get_string('numbercommentsmore', 'oublog', $commentspluscount)); } diff --git a/participation_table.php b/participation_table.php index a2f60e3..c6a515d 100644 --- a/participation_table.php +++ b/participation_table.php @@ -199,8 +199,6 @@ class oublog_user_participation_table extends flexible_table { public $userfullname; public $groupname; public $groupid; - public $start; - public $end; // Customised column and header info public $detailsheader; @@ -210,7 +208,7 @@ class oublog_user_participation_table extends flexible_table { public $comments; public function __construct($cmid, $course, $oublog, $userid, $userfullname, - $groupname, $groupid, $start, $end) { + $groupname, $groupid) { $this->cmid = $cmid; $this->course = $course; @@ -219,13 +217,11 @@ public function __construct($cmid, $course, $oublog, $userid, $userfullname, $this->userfullname = $userfullname; $this->groupname = $groupname; $this->groupid = $groupid; - $this->start = $start; - $this->end = $end; parent::__construct('mod-oublog-user-participation'); } public function setup($download = '') { - global $CFG; + global $CFG, $PAGE; // Extra headers $this->postsheader = array( @@ -267,9 +263,7 @@ public function setup($download = '') { $this->define_columns($columns); $this->define_headers($headers); - $this->define_baseurl($CFG->wwwroot . '/mod/oublog/userparticipation.php?id=' . - $this->cmid . '&user=' . $this->userid . '&group=' . $this->groupid . - '&start=' . $this->start .'&end=' . $this->end); + $this->define_baseurl($PAGE->url); $this->set_attribute('cellspacing', '0'); $this->set_attribute('id', 'participation'); @@ -302,7 +296,7 @@ public function download_buttons() { $downloadoptions = $this->get_download_menu(); $html = '
'; $html .= '
'; - $html .= ''; + $html .= ' '; $html .= html_writer::select($downloadoptions, 'download', $this->defaultdownloadformat, false); $html .= '
'; diff --git a/renderer.php b/renderer.php index 5046843..d949ff4 100644 --- a/renderer.php +++ b/renderer.php @@ -527,7 +527,7 @@ public function render_participation_list($cm, $course, $oublog, $groupid, * @param string groupname group name for display, default '' */ public function render_user_participation_list($cm, $course, $oublog, $participation, $groupid, - $download, $page, $context, $viewfullnames, $groupname, $start, $end) { + $download, $page, $context, $viewfullnames, $groupname) { global $DB, $CFG; $user = $participation->user; @@ -541,7 +541,7 @@ public function render_user_participation_list($cm, $course, $oublog, $participa } $filename .= '-'.format_string($fullname, true); $table = new oublog_user_participation_table($cm->id, $course, $oublog, - $user->id, $fullname, $groupname, $groupid, $start, $end); + $user->id, $fullname, $groupname, $groupid); $table->setup($download); $table->is_downloading($download, $filename, get_string('participation', 'oublog')); @@ -549,10 +549,8 @@ public function render_user_participation_list($cm, $course, $oublog, $participa $output = ''; $modcontext = context_module::instance($cm->id); if (!$table->is_downloading()) { - $output .= html_writer::tag('h2', get_string('postsby', 'oublog', $fullname)); - if (!$participation->posts) { - $output .= html_writer::tag('p', get_string('nouserposts', 'oublog')); - } else { + if ($participation->posts) { + $output .= html_writer::tag('h2', get_string('postsby', 'oublog', $fullname)); $counter = 0; foreach ($participation->posts as $post) { $row = ($counter % 2) ? 'oublog-odd' : 'oublog-even'; @@ -617,20 +615,18 @@ public function render_user_participation_list($cm, $course, $oublog, $participa } } - $output .= html_writer::tag('h2', get_string('commentsby', 'oublog', $fullname)); - if (!$participation->comments) { - $output .= html_writer::tag('p', get_string('nousercomments', 'oublog')); - } else { + if ($participation->comments) { + $output .= html_writer::tag('h2', get_string('commentsby', 'oublog', $fullname)); $output .= html_writer::start_tag('div', array('id' => 'oublogcomments', 'class' => 'oublog-post-comments oublogpartcomments')); foreach ($participation->comments as $comment) { $output .= html_writer::start_tag('div', array('class'=>'oublog-comment')); - $author = new StdClass; + $author = new stdClass(); $author->id = $comment->authorid; - $userfields = get_all_user_name_fields(); - foreach ($userfields as $field) { - $author->$field = $comment->$field; + $userfields = get_all_user_name_fields(false, '', 'poster'); + foreach ($userfields as $field => $retfield) { + $author->$field = $comment->$retfield; } $authorurl = new moodle_url('/user/view.php', array('id' => $author->id)); $authorlink = html_writer::link($authorurl, fullname($author, $viewfullnames)); @@ -638,7 +634,7 @@ public function render_user_participation_list($cm, $course, $oublog, $participa $viewposturl = new moodle_url('/mod/oublog/viewpost.php', array('post' => $comment->postid)); $viewpostlink = html_writer::link($viewposturl, s($comment->posttitle)); - $strparams = array('title' => $viewpostlink, 'author' => $authorlink); + $strparams = array('title' => $viewpostlink, 'author' => $authorlink, 'date' => oublog_date($comment->postdate)); $output .= html_writer::tag('h3', get_string('commentonby', 'oublog', $strparams)); } else { @@ -646,7 +642,7 @@ public function render_user_participation_list($cm, $course, $oublog, $participa array('post' => $comment->postid)); $viewpostlink = html_writer::link($viewposturl, oublog_date($comment->postdate)); - $strparams = array('title' => $viewpostlink, 'author' => $authorlink); + $strparams = array('title' => $viewpostlink, 'author' => $authorlink, 'date' => ''); $output .= html_writer::tag('h3', get_string('commentonby', 'oublog', $strparams)); } @@ -675,8 +671,10 @@ public function render_user_participation_list($cm, $course, $oublog, $participa } $output .= html_writer::end_tag('div'); } - // Only printing the download buttons. - echo $table->download_buttons(); + if (!empty($participation->posts) || !empty($participation->comments)) { + // Only printing the download buttons. + echo $table->download_buttons(); + } // Print the actual output. echo $output; @@ -721,7 +719,7 @@ public function render_user_participation_list($cm, $course, $oublog, $participa $table->add_data($table->comments); $table->add_data($table->commentsheader); foreach ($participation->comments as $comment) { - $author = new StdClass; + $author = new stdClass(); $author->id = $comment->authorid; $userfields = get_all_user_name_fields(); foreach ($userfields as $field) { diff --git a/styles.css b/styles.css index 9a28623..c9f83d8 100644 --- a/styles.css +++ b/styles.css @@ -348,6 +348,12 @@ div.oublog-individualselector { margin-top: 1em; } +#page-mod-oublog-userparticipation .oublog-comment-date { + font-size: 1em; +} +#page-mod-oublog-userparticipation .tabtree { + margin-top: 1.25em; +} #oublogbuttons form, #oublogbuttons div { display: inline; diff --git a/tests/participation_test.php b/tests/participation_test.php index 3901d0e..c676e42 100644 --- a/tests/participation_test.php +++ b/tests/participation_test.php @@ -285,6 +285,16 @@ public function test_participation() { null, (time() + 3600)); $this->assertCount(2, $userparticipation->posts); $this->assertCount(2, $userparticipation->comments); + // Test oublog_get_user_participation() filtering. + $userparticipation = oublog_get_user_participation($oublog, $context, $student1->id, 0, $cm, $course, + null, null, true, false, null, 1); + $this->assertCount(1, $userparticipation->posts); + $this->assertCount(0, $userparticipation->comments); + $userparticipation = oublog_get_user_participation($oublog, $context, $student1->id, 0, $cm, $course, + null, null, false, true); + $this->assertCount(0, $userparticipation->posts); + $this->assertCount(2, $userparticipation->comments); + // Test deleted posts/comments don't show. $DB->update_record('oublog_posts', (object) array('id' => $post1, 'timedeleted' => time(), 'deletedby' => $USER->id)); $DB->update_record('oublog_comments', (object) array('id' => $comment, 'timedeleted' => time(), 'deletedby' => $USER->id)); @@ -364,7 +374,8 @@ public function test_participation_grades() { $this->assertNotEmpty($participation[$student1->id]->gradeobj); $this->assertEquals(55, $participation[$student1->id]->gradeobj->grade); - $userparticipation = oublog_get_user_participation($oublog, $context, $student1->id, 0, $cm, $course); + $userparticipation = oublog_get_user_participation($oublog, $context, $student1->id, 0, $cm, $course, + null, null, true, true, null, null, true); $this->assertTrue(isset($userparticipation->gradeobj)); $this->assertNotEmpty($userparticipation->gradeobj); $this->assertEquals(55, $userparticipation->gradeobj->grade); diff --git a/userparticipation.php b/userparticipation.php index 7aa0410..fc1cb4c 100644 --- a/userparticipation.php +++ b/userparticipation.php @@ -28,18 +28,20 @@ require_once($CFG->dirroot.'/mod/oublog/locallib.php'); require_once($CFG->libdir.'/gradelib.php'); -$id = required_param('id', PARAM_INT); // Course Module ID -$userid = required_param('user', PARAM_INT); -$groupid = optional_param('group', 0, PARAM_INT); -$download = optional_param('download', '', PARAM_TEXT); -$page = optional_param('page', 0, PARAM_INT); // flexible_table page +$id = required_param('id', PARAM_INT);// Course Module ID. +$userid = required_param('user', PARAM_INT); +$groupid = optional_param('group', 0, PARAM_INT); +$download = optional_param('download', '', PARAM_TEXT); +$page = optional_param('page', 0, PARAM_INT);// Page. +$tab = optional_param('tab', 0, PARAM_INT);// Current tab, 0:Posts,1:Comments,2:Grade. $params = array( - 'id' => $id, - 'user' => $userid, - 'group' => $groupid, - 'download' => $download, - 'page' => $page, + 'id' => $id, + 'user' => $userid, + 'group' => $groupid, + 'download' => $download, + 'page' => $page, + 'tab' => $tab ); $url = new moodle_url('/mod/oublog/userparticipation.php', $params); $PAGE->set_url($url); @@ -69,17 +71,15 @@ $coursecontext = context_course::instance($course->id); // Create time filter options form. -$default = get_user_preferences('mod_oublog_postformfilter', OUBLOG_STATS_TIMEFILTER_ALL); - // Create time filter options form. - $customdata = array( - 'options' => array(), - 'cmid' => $cm->id, - 'user' => $userid, - 'group' => $groupid, - 'download' => $download, - 'startyear' => $course->startdate, - 'params' => array() - ); +$customdata = array( + 'options' => array(), + 'cmid' => $cm->id, + 'user' => $userid, + 'group' => $groupid, + 'download' => $download, + 'startyear' => $course->startdate, + 'params' => array('tab' => $tab) +); $timefilter = new oublog_participation_timefilter_form(null, $customdata); $start = $end = 0; @@ -94,15 +94,39 @@ } else if (!$timefilter->is_submitted()) { // Recieved via post back. if ($start = optional_param('start', null, PARAM_INT)) { + $timefilter->set_data(array('start' => $start)); $start = strtotime('00:00:00', $start); } if ($end = optional_param('end', null, PARAM_INT)) { + $timefilter->set_data(array('end' => $end)); $end = strtotime('23:59:59', $end); } } - +$url->params(array('start' => $start, 'end' => $end)); +$PAGE->set_url($url); +$getposts = true; +$getcomments = false; +$getgrades = false; +$limitnum = OUBLOG_POSTS_PER_PAGE; +$limitfrom = empty($page) ? null : $page * $limitnum; +if (!empty($download)) { + $limitnum = null; + $limitfrom = null; +} +// Customise data sought based on current tab. +switch($tab) { + case 1: + $getposts = false; + $getcomments = true; + break; + case 2: + $getposts = false; + $getgrades = true; + break; +} $participation = oublog_get_user_participation($oublog, $context, - $userid, $groupid, $cm, $course, $start, $end); + $userid, $groupid, $cm, $course, $start, $end, $getposts, $getcomments, $limitfrom, + $limitnum, $getgrades); // Add extra navigation link for users who can see all participation. $canviewall = oublog_can_view_participation($course, $oublog, $cm, $groupid); if ($canviewall == OUBLOG_USER_PARTICIPATION) { @@ -116,7 +140,7 @@ $groupname = ''; if ($groupid) { - $groupname = $DB->get_field('groups', 'name', array('id' => $groupid)); + $groupname = groups_get_group_name($groupid); } $oublogoutput = $PAGE->get_renderer('mod_oublog'); @@ -147,36 +171,60 @@ $info = get_string('contribution_fromto', 'oublog', $a); } if (empty($download)) { - echo html_writer::tag('h2', $info, - array('class' => 'oublog-post-title')); + if ($oublog->individual == OUBLOG_NO_INDIVIDUAL_BLOGS) { + $groupurl = clone $url; + $groupurl->remove_params(array('page', 'tab', 'download')); + groups_print_activity_menu($cm, $groupurl); + } + echo html_writer::tag('h2', $info, array('class' => 'oublog-post-title')); $timefilter->display(); -} -if (!count($participation->posts)) { - $postsmessage = get_string('posts', 'oublog') . ': ' . get_string('nouserpostsfound', 'oublog'); -} else { - $postsmessage = get_string('posts', 'oublog') . ': ' . count($participation->posts); -} -if (!count($participation->comments)) { - $commentsmessage = get_string('comments', 'oublog') . ': ' . get_string('nousercommentsfound', 'oublog'); -} else { - $commentsmessage = get_string('comments', 'oublog') . ': ' . count($participation->comments); -} + $taburl = clone $url; + $taburl->remove_params(array('page', 'tab')); + $tabs = array( + new tabobject('tab0', $taburl, $participation->numposts . ' ' . get_string('posts', 'oublog')), + new tabobject('tab1', $taburl->out() . '&tab=1', $participation->numcomments . ' ' . + get_string('comments', 'oublog')), + ); + if (oublog_can_grade($course, $oublog, $cm, $groupid)) { + $tabs[] = new tabobject('tab2', $taburl->out() . '&tab=2', get_string('usergrade', 'oublog')); + } + echo $OUTPUT->tabtree($tabs, "tab$tab"); + + // Output message when no content for tab. + $warning = ''; + if ($tab == 0 & !$participation->numposts) { + $warning = get_string('nouserpostsfound', 'oublog'); + } else if ($tab == 1 && !$participation->numcomments) { + $warning = get_string('nousercommentsfound', 'oublog'); + } else if ($tab == 2 && !isset($participation->gradeobj)) { + $warning = get_string('nousergrade', 'oublog'); + } -$output = $OUTPUT->box_start('generalbox', 'notice'); -$output .= html_writer::tag('p', $postsmessage .'
'.$commentsmessage.'
'); -$output .= $OUTPUT->box_end(); -if (empty($download)) { - echo $output; + if (!empty($warning)) { + $output = $OUTPUT->box_start('generalbox', 'notice'); + $output .= html_writer::tag('p', $warning); + $output .= $OUTPUT->box_end(); + echo $output; + } + // Pagination. + $pag = ''; + if (!empty($participation->posts) && $participation->numposts > $limitnum) { + $pag = $OUTPUT->paging_bar($participation->numposts, $page, $limitnum, $url); + } else if (!empty($participation->comments) && $participation->numcomments > $limitnum) { + $pag = $OUTPUT->paging_bar($participation->numcomments, $page, $limitnum, $url); + } + echo $pag; } $oublogoutput->render_user_participation_list($cm, $course, $oublog, $participation, $groupid, $download, $page, $coursecontext, $viewfullnames, $groupname, $start, $end); if (empty($download)) { + echo $pag; echo $OUTPUT->footer(); } // Log visit. $logurl = 'userparticipation.php?id=' . $id . '&user=' . $userid - . '&group=' . $groupid . '&download=' . $download . '&page=' . $page; + . '&group=' . $groupid . '&download=' . $download . '&page=' . $page . '&tab=' . $tab; add_to_log($course->id, 'oublog', 'view', $logurl, $oublog->id, $cm->id); diff --git a/version.php b/version.php index cd9f0ad..cbeedd6 100644 --- a/version.php +++ b/version.php @@ -23,8 +23,8 @@ * @package oublog **/ -$module->version = 2014042500; -$module->requires = 2013040500; +$module->version = 2014072500; +$module->requires = 2013111800; $module->cron = 60*60*4; // 4 hours. $module->displayversion = 'Unused'; diff --git a/view.php b/view.php index 97c2ba3..a2d4156 100644 --- a/view.php +++ b/view.php @@ -351,7 +351,7 @@ } } echo ''; -if (!$hideunusedblog && $oublog->global) { +if (!$hideunusedblog) { // Renderer hook so extra info can be added to global blog pages in theme. echo $oublogoutput->render_viewpage_prepost(); }