Hi all,
We're running Moodle 2.0 (build 20101130) on a trial server and our helpdesk staff have noticed a problem. When they attempt to browse the list of users, they get a blank white page. Viewing source on the resultant page shows absolutely no content whatsoever. The helpdesk staff have their own role defined, which has the rights to admin user accounts.
After turning on debugging, I found this in the error log after each browse attempt:
PHP Fatal error: Call to undefined function make_categories_list() in /var/www/moodle/html/user/filters/courserole.php on line 36
For some reason, it seems that the make_categories_list() function is undefined for users with our Help Desk role, but defined for Admins. Doing some digging, it looks like make_categories_list() is defined in course/lib.php
So I added the following require statement to the PHP file where the error occurred:
at top of courserole.php:
require_once($CFG->dirroot . '/course/lib.php');
This appears to have fixed the problem. But my question is why does this error only happen for non-admin roles? Obviously, the function is being included for admins somewhere along the line.
While we are running an older build of 2.0, I haven't seen anything in moodle-latest to indicate the problem has been fixed. Any suggestions as to why this might be happening and whether or not there's a better way to fix it?