mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-33340 completion: Incorrect logic in hidden field check
Credit to Jody Steele
This commit is contained in:
parent
dd89f61e68
commit
986095771b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user