Refactor workshop participant queries to improve performance.
This commit refactors how the authors/reviewers selectors are done in
mod_workshop. Previously this was trying to do all the work within SQL
so querying user roles and capabilities, with massive UNIONS for each
group on the course, which on big courses lead to SQL thousands of
lines long which broke the page, or took 5+ minutes to load.
This has been refactored to try and query only what is required
and then do capability checks within code instead of SQL.
The current code may have a bug. If users set the audio bit rate to
a non-supported value, such as 1000,
Firefox will display an error in the console,
while Chrome will create the recorded audio file successfully,
but it will have no sound. I tested this on Ubuntu 24.04.
The minimum bit rate threshold varies depending on the audio format.
During my tests with Firefox version 131.0.3, which uses
the audio/Ogg format, I found that the minimum supported value
is 24000. In Chrome 129.0.6668.70, which uses the audio/MP4 format,
the minimum supported value is 2400.
Due to these differences, I decided to change the input from
a text field to a select field, offering options that support both
Ogg and MP4 audio formats.
The database conversion for the old value has been provided in
the lib/db/upgrade.php. The script will find the closest match to
the current data and update it accordingly.
Use the new "counted recordset" DML API from 42664ee49a to obtain
the raw table data for reports. For those databases with defined
support for count window functions, this should give a performance
benefit by combining the count and main query into one request.
Popovers were not being closed when clicking elsewhere resulting in
multiple popovers open at the same time that cannot be closed. That
was happening because the trigger for popovers was set to "focus" and
"click" at the same time. This patch removes the "click" as trigger.
Also, adds the click event listener to show the popover and avoid the
problem described in MDL-82570, that caused this regression.
- Remove YUI drag and drop.
- Add new 'mod_feedback\external\questions\reorder' web service.
- Use SortableList JS component to refactor drag and drop, using
the new webservice.
- Update new SCSS styles
- Fix and create Behat scenarios
This is mainly for the benefit of multilang users.
As well as changing the database schema, it is also necessary to change
where this is inforced in PHP code (forms, web services). This was missed
when shortname was changed from 100 to 255 chars some time ago, but I have
fixed that here.
Note, I have not changed the legacy mnet code, since as far as I am aware
that is deprecated.
Changes search indexing so that (except for test scripts) each indexing
run indexes only items up to 5 seconds ago, and the following indexing
will start from the same point. This ensures all items are indexed,
even if an item is written to the database one or two seconds after its
timecreated value.
The display logic for including the title in the activity header was
such that the title would only display if both the theme default and the
layout option for 'notitle' were undefined or false. It was not possible
to a theme to have 'notitle' default to true, but have a layout override
that as false to display the title.
This change re-writes the is_title_allowed method to encapsulte the new
logic, first checking if the current layout has the option set and using
that, and if not falling back to the theme default if that is set. If
neither is set, the title is displayed.
This also tweaks moodle_page::magic_get_layout_options to ensure the
theme is initialised before trying to return the layout options.