Too Many Users

Too Many Users

by Doug Moody -
Number of replies: 40

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)
In reply to Doug Moody

Re: Too Many Users

by Mel Ausman -

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)
In reply to Doug Moody

Re: Too Many Users

by Monica Franz -

Hi!

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

Have  a look at moodle/admin/roles/assign.php:

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


In reply to Monica Franz

Re: Too Many Users

by Doug Moody -

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.

In reply to Doug Moody

Re: Too Many Users

by Guillermo Madero -

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

Cheers!

In reply to Doug Moody

Re: Too Many Users

by T N -

How about increasing the minimum values of $potentialmemberscount at lines 67 and 130 in enrol/manual/locallib.php ?

In reply to T N

Re: Too Many Users

by Doug Moody -

TN,

Have you tried this fix? If so, I will certainly try it. Did you run into this problem yourself?

In reply to Doug Moody

Re: Too Many Users

by T N -

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.

In reply to Doug Moody

Re: Too Many Users

by Michael Dumais -

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

Thanks,

Mike

In reply to Michael Dumais

Re: Too Many Users

by Doug Moody -

Mike,

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

In reply to Doug Moody

Re: Too Many Users

by George Argyrous -

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.

In reply to George Argyrous

Re: Too Many Users

by Educational Technology Leaders LLC -

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")

In reply to Educational Technology Leaders LLC

Re: Too Many Users

by Aaron Saxton -
Worked like a treat. Thanks for posting.
In reply to Aaron Saxton

Re: Too Many Users

by Andrew C -

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

In reply to Andrew C

Re: Too Many Users

by Toni Roberts -

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

In reply to Toni Roberts

Re: Too Many Users

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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.

In reply to Tim Hunt

Re: Too Many Users

by Annick F -

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

In reply to Annick F

Re: Too Many Users

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 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.

In reply to Tim Hunt

Re: Too Many Users

by Annick F -

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

In reply to Annick F

Re: Too Many Users

by Michael Hughes -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

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).

In reply to Michael Hughes

Re: Too Many Users

by Michael Hughes -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

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...

In reply to Tim Hunt

Re: Too Many Users

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

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.

 

I'm sorry for getting mad about this, but this just seems so unlogical. 100 users max search result.

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.

--------- Please, THINK BIG!

Average of ratings: Useful (1)
In reply to Richard van Iwaarden

Re: Too Many Users

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

I created a tracker for this, please vote:

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

In reply to Richard van Iwaarden

Re: Too Many Users

by Andreas Stoeffer -
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 smile Cheers Andreas
In reply to Andreas Stoeffer

Re: Too Many Users

by Dixie Harrison -

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.

 

 

In reply to Dixie Harrison

Re: Too Many Users

by Derek Chirnside -

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

I've added an FAQ here: http://docs.moodle.org/24/en/Accounts_FAQ#The_search_box_for_users_if_limited_to_100_displayed_users._Can_I_change_this.3F

-Derek

 

 

In reply to Derek Chirnside

Re: Too Many Users

by Ray Morris -

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
  • Moodle 101
  • GUI design 201
  • Into to Web Interfaces

 

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.

In reply to Ray Morris

Re: Too Many Users

by Dixie Harrison -

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!  cool

In reply to Richard van Iwaarden

Re: Too Many Users

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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.

In reply to Tim Hunt

Re: Too Many Users

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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 wink

In reply to Howard Miller

Re: Too Many Users

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

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.

In reply to Richard van Iwaarden

Re: Too Many Users

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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

In reply to Howard Miller

Re: Too Many Users

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

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.

In reply to Richard van Iwaarden

Re: Too Many Users

by Richard Price -

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.

In reply to Educational Technology Leaders LLC

Re: Too Many Users

by Matt Ladwig -

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. 

In reply to Matt Ladwig

Re: Too Many Users

by Dixie Harrison -

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  

In reply to Doug Moody

Re: Too Many Users

by Anna Etincelles -

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!

In reply to Anna Etincelles

Re: Too Many Users

by Melanie Scott -
Picture of Particularly helpful Moodlers

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.

In reply to Melanie Scott

Re: Too Many Users

by Anna Etincelles -

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!

In reply to Anna Etincelles

Re: Too Many Users

by Melanie Scott -
Picture of Particularly helpful Moodlers

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.

In reply to Monica Franz

Increase Size of user on moodle

by Lalit Thakur -

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