"MDL-18723, role required to display search box should be viewparticipants, merged...
authordongsheng <dongsheng>
Fri, 2 Oct 2009 06:51:56 +0000 (06:51 +0000)
committerdongsheng <dongsheng>
Fri, 2 Oct 2009 06:51:56 +0000 (06:51 +0000)
user/index.php

index eaf98ff4e7ee82fa5eff5624ffc7c58505ac4d1b..ef82d707350575acbc629a0b2c539117db1253bf 100644 (file)
 
     }
 
-    if ($bulkoperations && $totalcount > ($perpage*3)) {
+    if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) {
         echo '<form action="index.php" class="searchform"><div><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n";
         echo '<input type="text" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
     }