## General help

### Too Many Users

Too Many Users

While assigning roles, or adding students to groups, and about anything where you have to move large groups of students from one role, or group, etc to another, you will get a message that says:

Too Many Users to Show (201) Please use search.

Well, I looked at previous comments on this issue, and haven't found a fix for it. Apparently, teh Moodle programmers put an arbitrary limit of 100 on the drop down list box.

Various suggestions for modifying PHP scripts have been suggested, but I have not found a sure-fire method of fixing this issue.

Does anyone know of something that really works that will either up this limit, or allow someone to do a wildcard search of users to add them to the selection list?

Average of ratings:Useful (1)
Re: Too Many Users

I'm with you on this.  I found this limit very cummersome. I had to go through most of the letters of the alphbet to finally move all the students.  I use to have the complete list and using the shift key I could move all at once.  Lets get this fixed or tell us how to fix it.  I only have 150 students.

Average of ratings:Useful (1)
Re: Too Many Users

Hi!

Which Version are you using, because we had this hitting the 5000 user limit with Moodle 1.9.3

define("MAX_USERS_PER_PAGE", 5000);
define("MAX_USERS_TO_LIST_PER_ROLE", 10);

Perhaps you can set these constants in the config.php like the constant FRONTPAGECOURSELIMIT.

hth

Monica

Average of ratings: -
Re: Too Many Users

Monica,

I am using 2.1.1.

According to the docs I can find on this issue, those who are good at coding say it can be done, but that it would require changing code in too many places to be practical. I understand the amount of work. Nevertheless, why was this limit imposed in the first place? 100 is a ridiculously small number.

As an alternative, couldn't an advanced search option be allowed, whereby I could use wild card parameters to select who I want (like maybe *.*)?

If I remember clearly, Moodle 1.9 allowed me to choose "All Participants" as the first option in the list. That would select all who are enrolled in a class. It didn't require them to be displayed, but if I clicked on it, then all users would be selected and could be moved to the opposite box (to, say, enroll or grant roles to)

Is there anyone who could propose an easy workaround? I don't know how to get this to the top of the developers list, but it is a ridiculous limit, in my opinion.

Average of ratings: -
Re: Too Many Users

One more of those "new" Moodle 2 things... so user unfriendly, totally unefficient and extremely time consuming

Cheers!

Average of ratings: -
Re: Too Many Users

How about increasing the minimum values of $potentialmemberscount at lines 67 and 130 in enrol/manual/locallib.php ? Average of ratings: - Re: Too Many Users TN, Have you tried this fix? If so, I will certainly try it. Did you run into this problem yourself? Average of ratings: - Re: Too Many Users Yes, of course, I have tried that. It works fine. To prevent the popup menu from appearing, you also may need to transfer (or comment out) the 229th line ($function = 'M.enrol_manual.quickenrolment.init';) under the 248th in enrol/manual/lib.php.

Average of ratings: -
Re: Too Many Users

Hi Doug, how did TN's fix work for you?  I have the same issue and wonder if you were successful.

Thanks,

Mike

Average of ratings: -
Re: Too Many Users

Mike,

Actually, it did not work. I gave up. But would still like to find a fix.

Average of ratings: -
Re: Too Many Users

Has anyone managed to solve this problem? The search function is a very slow way of adding large numbers of students to a Group. At the very least, a 'Show all Potential Members' option to the Add/Remove users page would help.

Average of ratings: -
Re: Too Many Users

For Moodle 2.3 -> To increase potencial users in manual enrolment go to this file: moodle/enrol/manual/locallib.php

line67  if ($potentialmemberscount > "change here number") line130 if ($potentialmemberscount > "change here number")

Average of ratings: -
Re: Too Many Users

Worked like a treat. Thanks for posting.

Average of ratings: -
Re: Too Many Users

In the assign roles (Category), I really like the Search Options drop down on the left of the Moodle Existing Box. It would be great if this could be added to the Potential Users box

Average of ratings: -
Re: Too Many Users

Hello Folks,

I administer Moodle on our small campus, but am not a programmer or DBA. As a result, when I need a change, I have to contact them and request the change. They are often loathe to make changes to code for various reasonable reasons.  1.9 allowed me to search by a single letter or even @, which should return all users if their email is part of the search. Alas, neither of these works with 2.2 or 2.3 that I can see. I appreciate all the work the developers put into Moodle (thanks!!), but it would be great to be able to search the list of potential users in ever so slightly more flexible and robust ways. Just being able to search for @ would help a lot in finding all users and I have occassion to do so often.

Thanks,

Toni

Average of ratings: -
Re: Too Many Users

It is well hidden, but you can enable this.

You need to find a page that uses the 'User selector' widget. For example the add/remove group member's page. Underneat the first user selector on the page, there it a thing saying "Search options". If you click there, the options will appear. One of the options is "Match the search text anywhere in the user's name". Turn that one.

Once you turn that on, Moodle will remember that setting, and it should apply everywhere you search for users.

Average of ratings: -
Re: Too Many Users

This does not seem to work for me. How can I display all users in the Potential members box? I used to be able to do that but now if the potential members exceed 100, it doesn't display anybody. Staff would like to be able to view their list of students to allocate them to groups... .

Thanks

Average of ratings: -
Re: Too Many Users

Well the limit of 100 users is fixed in the code. If you search for "const MAX_USERS_PER_PAGE = 100;" you should find three matches (why have we duplicated that in three places?) and you can change 100 to something else, if you are confident editing the code.

Average of ratings: -
Re: Too Many Users

We have changed the number in 2 places in this file : moodle/enrol/manual/locallib.php

line67 if ($potentialmemberscount > "change here number") line130 if ($potentialmemberscount > "change here number")

But it has not make any diffrences.

Could you please let me know in which other file(s) I need to change the "MAX_USERS_PER_PAGE"

Thanks

Average of ratings: -
Re: Too Many Users

You'll find this constant in /user/selector/lib.php line 739.

I've found a knock on effect that the value of this also means that if there are more than 100 potential users that can be added to the group then the data to provide their existing group memberships isn't loaded.

It also doesn't appear to then be loaded when the search is performed (at least when it's done by ajax).

Average of ratings: -
Re: Too Many Users

I think I can confirm that the "Selected user's membership" wont update if the number of potential users is initially greater than the limit set by MAX_USERS_PER_PAGE.

In this case:

1) The userSummaries variable which should be set in group/members.php will return no items (@L162).

2 )When search.php is called by send_query() method of the user_selector (user/selector/module.js) this doesn't look up the userSummaries and return it in the JSON returned.

3) This means that the function updateUserSummary() (in group/clientlib.js) gets called (by virtue of addselect.onchange handler), but the userSummaries variable is still empty since it hasn't changed since the page was initially loaded.

...phew...

Average of ratings: -
Re: Too Many Users

Fixed at 100 users in the code???

I can understand it has to do with performance issues, but jeezlouise, since our upgrade to 2.3 my Moodle is hardly managable. Moodle HQ has to start thinking big.

We are at 5000+ users and I'm constantly running into these problems. Moodle seems perfectly fine for a small school with teachers doing manual course enrollments etc. But for Moodle administrators like me life is getting much much worse after the 1.9 -> 2.3 upgrade.

And no, I'm not able to change Moodle code. Another thing you can't do when working professionally with a hosted application for 5000+ users. I could have done it in 2006 when one school had it's own webserver running Moodle for 100 students, but we are way past that point.

Average of ratings:Useful (1)
Re: Too Many Users

I created a tracker for this, please vote:

http://tracker.moodle.org/browse/MDL-36395

Average of ratings: -
Re: Too Many Users

Hi all, the correct setting in Moodle 2.3.x is here: webroot/moodle/admin/roles/lib.php on line 988 : const MAX_USERS_PER_PAGE = 100 It is the only change and it works Cheers Andreas

Average of ratings: -
Re: Too Many Users

I did make the change for the admin/roles/lib.php on 988 as Andreas Stoeffer suggested, but it didn't help.  I did, however, find the same setting on user/selector/lib.php at line 740 and changed that also.  That seems to have worked.

I have read the notices here and I understand about the big sites, but I'm only running 5,000 users and 400 instructors and I needed just a little bit more.  I just increased the setting to 200 and we're happy campers over here now.

Last semester most of the newer instructors were using one classroom per class section.  This semester they are game to try using groups in one classroom. Having finally gotten instructors to use this resource, I really don't want them to be put off by having trouble with something like this.

I do love having this forum to refer to.  Thank all of you for adding your answers/thoughts here.  Really.  It does help a lot.

Average of ratings: -
Re: Too Many Users

Well done Dixie.

I've come across this limitation at times, and would be good to get it adjustable in the core.  Don't forget to vote here: http://tracker.moodle.org/browse/MDL-36395

-Derek

Average of ratings: -
Re: Too Many Users

For people having this problem, what are you searching for?  All users with a certain role?  All users in a certain course?  If most se cases have in common that you're looking for "all users in (some set), perhaps it would be better to add a UI like this:

Select all users in:

• Course
• Group
• Role
• Cohort

Regardless of ones opinion about the limit, having the same constant defined in different places, and possibly with different names, is objectively incorrect™. It should be a setting, or a single constant. ONE setting if it has the same meaning in various places, possibly two settings if the same constant is used for two distinctly different things which logically might be set differently.

Average of ratings: -
Re: Too Many Users

I wasn't looking to select _all_ users of any type.  The issue was adding students to specific groups within the classroom itself and some of the classrooms had as many as 190+ students which needed to be divided into their respective course sections for purposes such as taking attendance or entering grades.

As I understand it 2.4 allows us to associate a cohort with a group which would actually have served our purpose, but I couldn't upgrade to 2.4 because some of the pluggins we use aren't ready.

And I did vote!

Average of ratings: -
Re: Too Many Users

Just so you know, I work at the Open University where we have 200,000+ users. It is exactly because we are thinking big that search results have to be limited to a reasonable number. 100 seems reasonsable to me.

If you need to adminster Moodle at larger scale, look at the the various authentication and enrolment plugins that let you integrate with the data in your institution's other database, without requiring manual enrolment in Moodle at all. Alternatively, look at the various bulk upload options.

Average of ratings: -
Re: Too Many Users

Just a +1 / what Tim said.

40,000 users here and never been an issue. You really don't want to be manipulating huge lists of users like that. Get it automated

Average of ratings: -
Re: Too Many Users

It is automated.

We have ldap-cohort synch We have external database authentication We have ldap authentication We have autocreation of metacourses

Please tell me how to automatically add users to groups inside courses.

Average of ratings: -
Re: Too Many Users

Hmmm.... we wrote something. However, database sync and ldap sync can handle course groups can they not? I don't use the feature personally.

Average of ratings: -
Re: Too Many Users

They can not handle course groups.

Nevertheless: searching for users is just something you should be able to do. Simple example: On the Moodle homepage I have a news forum. I want to post something just for staff, or just for students from Amsterdam, or just for students Psychology.

What you do is create a group of these persons and post the news just for this group. It's a simple basic Moodle functionality which always works if you have a little amount of users.

Now, when I try to make a group from the users who study Psychology, live in Amsterdam or for the staff this is not possible. Moodle says 'to many users' and that's all she wrote.

Workarounds are all outside Moodle: making groups of these people in Miscorosft Active Directory or using Excel to upload a CSV file... but that's not my idea of good usermanagement.

Average of ratings: -
Re: Too Many Users

I agree with Richard, because many of us are not full programmers but are limited to what we can figure out and tease out of the systems we have access to. Some are locked down but am looking for a definative hack to fix this for our moodle.

This has bitten me several times (2.2) and took me some time to get some things sorted that before (1.9) relied on this method to add staff by searching for (Staff), Students were (Students) but because there are more than 100 available when I first set it up, It will not display any of them.

We have some automation in place that forms cohorts so I can add All staff/ students, or by year to a course on Moodle. But, to "make it work like x" on many things on Moodle, you learn workarounds and using the search and being able to add 100+ (maybe 100,200 or rarely 1100+) the system in 1.9 would search and worked fine for this sort of thing.

Yes it is neater to have stuff automated, and we have it so that teachers can enrol groups as they like onto the courses, and that syncs up the MIS. But where you do not have the ability, time or resources to program a custom enrollment for that. This limit is causing me to have to completely rethink/rework things that were "OK" before but is no longer possible using the search interface if the returned list could be above 100. Saying that we are doing something wrong is a bit mean as not everyone has the staffing or resources of a major college to work around this Moodle 2.x issue. Perhaps is more of an issue to those who did use this before and is no longer working. Practically, a High school often finds such functionality useful, but now is Broken (to all intents and purposes). Imagine Google returning no results when you searched for news - this is the same in terms of usability.

Average of ratings: -
Re: Too Many Users

I would love to make this change, unfortunately our hosting company (a Moodle Partner) has us locked down so tight that we are not allowed to change code anymore. They want to change us thousands for any minor change such as this.

Average of ratings: -
Re: Too Many Users

We looked into hosted solutions and that really was _the_ determining factor - we couldn't get to the files to make custom changes.  We don't have many and they are rather small, but the potential problems of getting them taken care of (and the cost!) definately dampened some eagerness.

These guys are sooooo spoiled!  Imagine if they actually had a programmer to work on Moodle here!  LOL

Average of ratings: -
Re: Too Many Users

Hey Doug,

I know this was an old post but I hope you or anyone can help me.

After I create a new user, I must click on the left side panel and click "Assign System Roles" to assign the users. Once I clicked on it, the page will show "Potential Users" on the right side. I would love to see the list of user who don't have any roles assign to them under the "Potential User".

Help! Thanks!

Average of ratings: -
Re: Too Many Users

On the topic for the original post...Maybe I'm imagining things...but fixing this issue wasn't nearly as complicated for me (2.5) as this basic post implied.  Initially, I was told I couldn't change it without changing code and then I found somewhere that did:  Administration->Site Administration->Users->Permissions->User Policies.

This page lets me identify other fields I can search by (very nice) and lets me choose "Maximum users per page."  I set mine to 500.  Generally it works.  Every so often it gets snotty and reverts to 100 but I poke it a bit and it starts working again.

Now, on to your question.  I really doubt you want to assign system roles.  That gives them that role in every area of the site.  By default, all users are authenticated users.  So, a Student role means enrollment in every course.  The Assign System Roles page lists the roles that are available at the system level and how many/who has which role.  If you click the role, you will see a list of people on the left who have the role.  On  the right, is who does not.  If it exceeds 100 (or the number you picked) it give a blank Too many to display message.

Average of ratings: -
Re: Too Many Users

Hey!

Thanks for your quick response! But no matter which role I click be it students or teachers to assign a user to, I want the Potential User's list to show only the users which have no role being assign to them before. Is it possible?

Thanks!

Average of ratings: -
Re: Too Many Users

I really doubt it.  It shows who doesn't not have that role for the course/category but not no role at all.  I can think of ways to find out who has no role at all but they are all pretty labor intensive and, honestly, ugly.

Average of ratings: -
Increase Size of user on moodle

Hi monika,

i have a problem that when i open assign.php file than  the file is read only mode so i can not change on assign.php file. tell me how can i make editable and how to increse the size of accessable user on moodle

Thank you monica

Average of ratings: -