MDL-48580 report_log: fix site errors dropdown

Thanks Renaat Debleu for pointing this bug and share a solution.
This commit is contained in:
Simey Lameze
2014-12-16 12:39:34 +08:00
parent dbe2143aba
commit 9ed4f0b3b7
+1 -1
View File
@@ -188,7 +188,7 @@ class report_log_renderable implements renderable {
// For site just return site errors option.
$sitecontext = context_system::instance();
if (empty($this->course) && has_capability('report/log:view', $sitecontext)) {
if ($this->course->id == SITEID && has_capability('report/log:view', $sitecontext)) {
$activities["site_errors"] = get_string("siteerrors");
return $activities;
}