MDL-51399 report_outline: Hide blog column if blogs are disabled.

This commit is contained in:
Andrew Hancox 2015-09-30 16:58:32 +01:00
parent fd57d685c7
commit fb57f15170

View file

@ -93,7 +93,7 @@ $outlinetable->cellpadding = 5;
$outlinetable->id = 'outlinetable'; $outlinetable->id = 'outlinetable';
$outlinetable->head = array($stractivity, $strviews); $outlinetable->head = array($stractivity, $strviews);
if ($CFG->useblogassociations) { if (!empty($CFG->enableblogs) && $CFG->useblogassociations) {
$outlinetable->head[] = $strrelatedblogentries; $outlinetable->head[] = $strrelatedblogentries;
} }
@ -222,7 +222,7 @@ foreach ($modinfo->sections as $sectionnum=>$section) {
$reportrow->cells[] = $numviewscell; $reportrow->cells[] = $numviewscell;
if ($CFG->useblogassociations) { if (!empty($CFG->enableblogs) && $CFG->useblogassociations) {
require_once($CFG->dirroot.'/blog/lib.php'); require_once($CFG->dirroot.'/blog/lib.php');
$blogcell = new html_table_cell(); $blogcell = new html_table_cell();
$blogcell->attributes['class'] = 'blog'; $blogcell->attributes['class'] = 'blog';