MDL-49145 report_log: Fixing condition
authorDavid Monllao <davidm@moodle.com>
Thu, 19 Feb 2015 07:44:54 +0000 (15:44 +0800)
committerDavid Monllao <davidm@moodle.com>
Mon, 23 Feb 2015 00:45:25 +0000 (08:45 +0800)
Credit and thanks to Tyler Bannister and Renaat Debleu.

report/log/classes/table_log.php

index 02e06d1..1706e57 100644 (file)
@@ -195,7 +195,7 @@ class report_log_table_log extends table_sql {
                 $context = context::instance_by_id($event->contextid, IGNORE_MISSING);
                 if ($context) {
                     $contextname = $context->get_context_name(true);
-                    if ($url = $context->get_url() && empty($this->download)) {
+                    if (($url = $context->get_url()) && empty($this->download)) {
                         $contextname = html_writer::link($url, $contextname);
                     }
                 } else {