ndunand / moodle-enrol_attributes

This plugin allows users to be enrolled according to any value stored in their user profile.
https://moodle.org/plugins/enrol_attributes
18 stars 22 forks source link

View/edit rules page doesn't work well when there are hundreds of rules #40

Closed jhutch1 closed 3 years ago

jhutch1 commented 3 years ago

We have a Moodle with about 400 rules which assign users to cohorts based on their job role and the physical location in which they work. Unfortunately, this means the view/edit rules page of the plugin is enormous, and it's a struggle to load and use it.

It might be worth adding some pagination to the view/edit rules page (maybe 50 rules per page by default?) for use cases like this.

ndunand commented 3 years ago

Apart from display hurdles like the ones you mention, I would think so many rules must have a huge performance impact... is that not the case?

jhutch1 commented 3 years ago

It probably does. The Moodle only sees about a hundred logins a day though, so even if each user is "heavier" than normal, the server's able to handle it fine.

ndunand commented 3 years ago

okay. Could you send a screenshot of the issue? I want to make sure I understand it correctly.

Make sure you blank out any personal information.

jhutch1 commented 3 years ago

Hmm, hard to do since the list of rules doesn't fit on a single screen. Since there are 400 rules and Moodle is trying to show them all at once, you end up with an extremely long list of rules on the /local/profilecohort/index.php?action=view screen.

ndunand commented 3 years ago

Alright, then this is not related to my module (enrol_attributes) but to this module : https://moodle.org/plugins/local_profilecohort from Ulm University.