From e456edf9b790ddde284fc08ba1cd7f74aabbf13c Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Thu, 13 Jun 2013 10:25:44 +1000 Subject: [PATCH] MDL-21933 course: Allow users to search participants course permission Capability checks are performed at the top of the page and do not need to be completed again. Search is an expected feature for users and it was confusion to only appear after 3 pages. This has been changed to enable search when there are more records than are visible on the screen. If users are unable to use browser search, they will be able to use Moodle's search. --- user/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user/index.php b/user/index.php index bfa603d168f..7aa5e2daca2 100644 --- a/user/index.php +++ b/user/index.php @@ -811,7 +811,8 @@ $PAGE->requires->js_init_call('M.core_user.init_participation', null, false, $module); } - if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) { + // Show a search box if all participants don't fit on a single screen + if ($totalcount > $perpage) { echo '
'; echo ''; echo ' 
'."\n";