The central "content" region on My Home / user profile pages also needs to
be initialised in lib/ajax/blocks.php in order to allow blocks to be
dropped into that region successfully. Some tweaks were also necessary in
order to correct the "content" region's structure in order for drag-drop
to function on this region on these pages.
Non-standard block regions (including the central "content" region
used by My Home and user profile pages) were causing the temporary empty
block region used as a drop target to sometimes appear in the wrong place.
The call to init_requirements_data (which includes the block drag-drop JS)
happens at a late enough stage in page generation that we can simply
pass the context ID through to the JS, so that it can be sent as part of
the AJAX request. This prevents lib/ajax/blocks.php from having to try
to guess the context from the other bits of information it receives, so
block drag-drop should now work everywhere without issues.
Currently we have two options for custom profile fields 'Unique' and 'Required'
If value s not entered for unique and not required field then we should allow
duplicate empty values. If value is entered then we should check for unique input.
In case field is unique and required then it should be always checked as required
field can't be empty.
Fixed 5 Moodle pages that does not display the course short name even if "Display extended course names" setting is on. In fixing this, search.php also included related minor code to change to minimise DB calls to improve performance.
user_filter_yesno extends user_filter_simpleselect, so if user bulk action filter has both
user_filter_simpleselect and user_filter_yesno, they use the same filter name but counter is
different as they are different classes. Hence using different filter name will avoid confilts
It seems that Chrome orders fields of objects in order of array key.
Therefore we must stop using user.id in the PHP arrays, and instead
ensure that we use sequential numbers.
This commit fixes the user selector.
The problem is to do when you pause a bit, so a search starts, and then
type a bit more before the search finishes. It was behaving like this:
1. Type a bit, then pause.
2. First search request sent.
3. Type a bit more, then pause.
4. Second search request sent.
5. First search request completes.
6. You try to select one result.
7. Second search request comples, overwriting what you are selecting.
This fix works by cancelling the first request before sending the
second.