mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-33340 completion: Incorrect logic in hidden field check
Credit to Jody Steele
This commit is contained in:
parent
1e8335fb82
commit
77a7ed6535
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue