Scheduler in 1.9.5 - admins showing up as needing appointments

Scheduler in 1.9.5 - admins showing up as needing appointments

by Peter Roberts -
Number of replies: 4
We're in the final stages of testing a planned upgrade to 1.9.5 and have found that the scheduler plugin is behaving differently from our old Moodle (1.9.3).

If I add a new scheduler activity to a course - it lists all the Administrators on the site as requiring appointments.

Previously admins didn't show up.

I'm using the same version of the scheduler plugin (Moodle reports it as 2008061700).

I've done some rooting around and it looks like the actual SQL queries are returning the same records, but for some reason get_users_by_capability in accesslib seems to be returning different results for the particular context.

Has anyone else found this (and hopefully can suggest a quick fix)?

Cheers!
Average of ratings: -
In reply to Peter Roberts

Re: Scheduler in 1.9.5 - admins showing up as needing appointments

by Peter Roberts -
Here's the fix that seems to sort it out - if anyone has the same problem.

In teacherview.php - change the call to get_users_by_capability to add doanything=false.

$students = get_users_by_capability ($context, 'mod/scheduler:appoint', 'u.id,lastname,firstname,email,picture', 'lastname','','','','',false);


Average of ratings: Useful (3)
In reply to Peter Roberts

Re: Scheduler in 1.9.5 - admins showing up as needing appointments

by Jez H -
Thanks for posting this, we had the same issue after upgrading to 1.9.5, your mod seems to have fixed it.
In reply to Peter Roberts

Re: Scheduler in 1.9.5 - admins showing up as needing appointments

by Jean-Luc Delghust -
Thanks, we had the same problem and your fix worked!