Moodle slow for 2 users only

Re: Moodle slow for 2 users only

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

In terms of how you fix this, you probably need to make some new admin_setting_... classes. For example, to output hte JavaScript, you need to subclass something, and output the JS from the _html method.

When you need to do something expensive to load the choices for a select menu, there is a way to do lazy-loading, so the choices are only set up on pages where the select will acutally be shown. There are two examples here: https://github.com/moodle/moodle/blob/master/mod/quiz/settingslib.php#L160