Getting a report of all "Teachers"

Getting a report of all "Teachers"

by Roger Sorensen -
Number of replies: 7
Is there a way to get a report that lists all those who have been assigned a given role? I'd like to get a list of all the Teachers on our system.
Average of ratings: -
In reply to Roger Sorensen

Re: Getting a report of all "Teachers"

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The attached report should do what you want.

Unzip it into your moodle folder, and it should add the files admin/report/userroles/index.php and one other.

It is not designed to work efficiently on huge sites, (it really needs to be made to print a paging bar if there are too many results returned), but it should be OK up to a few thousand users with a particular role.
In reply to Tim Hunt

Re: Getting a report of all "Teachers"

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Thanks a lot Tim - very helpful! approve

To help others find your report, I've added a link to this discussion from the Course overview reports documentation. In addition, perhaps the report could be added to the modules and plugins database?
In reply to Helen Foster

Re: Getting a report of all "Teachers"

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, this version is just a quick hack, becuase I wanted to see how hard it was to write a report like this. When I get back from holiday I need to do a more sophisticated version for work, that also lets you get an overview all all the assignments for a particular user (perhaps only for selected roles) and then gives you an easy way to remove some of those enrollments. Currently, removing a teacher from 10 courses is a painfully slow manual process.

So, once it is in a better state, I will of course, put it in contrib and the MnP database.
In reply to Tim Hunt

Re: Getting a report of all "Teachers"

by A. T. Wyatt -
Greetings, Tim!
I am getting a blank page. I will try to get my sysadmin to turn on debugging and see what is up. I have a WIMP server. Do you think there is a problem with IIS? Seems like I do occasionally run into stuff that doesn't play well with IIS. Sigh.

atw
In reply to A. T. Wyatt

Re: Getting a report of all "Teachers"

by A. T. Wyatt -
Debug report:
I did this on my own instance, not the production server, but I think the first problem I had was that question/upgrade.php did not exist. I must have an older version of Moodle installed.

So then I upgraded my moodle instance to the latest, downloaded today (Aug 25 2007) and get these errors (which, of course, make no sense to me!) I surely would like to have this report, so perhaps some of this will help you. I am using the Moodle4Windows install, so that is WAMP.

atw

Warning: Missing argument 2 for admin_externalpage_setup(), called in D:\moms_stuff\moodle_18\moodle\admin\report\userroles\index.php on line 16 and defined in D:\moodle_18\moodle\lib\adminlib.php on line 2603

Notice: Undefined variable: adminroot in D:\moodle_18\moodle\lib\adminlib.php on line 2616

Fatal error: Call to a member function locate() on a non-object in D:\moodle_18\moodle\lib\adminlib.php on line 2616
In reply to Tim Hunt

Re: Getting a report of all "Teachers"

by Roger Sorensen -
Thanks, Tim. I'll have my server admin install it & test it out.

Roger
In reply to Roger Sorensen

Re: Getting a report of all "Teachers"

by Jalil K -

Hi Roger,

Did you manage to te this hack working? I've installed it on my site (1.8.2), and although under the "reports" menu, I get the option to click on userroles, I get a blank page on my local test machine OR HP 500 (Website cannot display the page) message.

JalilK