From 77a7ed6535b8928547a2120979dadf95185d857a Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Mon, 25 Jun 2012 14:10:42 +0800 Subject: [PATCH] MDL-33340 completion: Incorrect logic in hidden field check Credit to Jody Steele --- report/outline/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report/outline/index.php b/report/outline/index.php index c7abae3e4a0..7c82e66be08 100644 --- a/report/outline/index.php +++ b/report/outline/index.php @@ -42,7 +42,7 @@ add_to_log($course->id, 'course', 'report outline', "report/outline/index.php?id $showlastaccess = true; $hiddenfields = explode(',', $CFG->hiddenuserfields); -if (array_search('lastaccess', $hiddenfields) and !has_capability('moodle/user:viewhiddendetails', $context)) { +if (array_search('lastaccess', $hiddenfields) !== false and !has_capability('moodle/user:viewhiddendetails', $context)) { $showlastaccess = false; } -- 2.43.0