MDL-49145 report_log: Moving conditions
authorDavid Monllao <davidm@moodle.com>
Mon, 23 Feb 2015 02:30:47 +0000 (10:30 +0800)
committerDavid Monllao <davidm@moodle.com>
Mon, 23 Feb 2015 02:30:47 +0000 (10:30 +0800)
Now get_url() does not need to be resolved when
we are downloading.

report/log/classes/table_log.php

index 1706e57..8df6db9 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 (empty($this->download) && $url = $context->get_url()) {
                         $contextname = html_writer::link($url, $contextname);
                     }
                 } else {