andrewnicols
Repos
215
Followers
57
Following
5

Source of the Moodle Developer Resources and Documentation

21
112

Events

MDL-76376 scorm: fix PHP8 TypeError (null is not Countable)

MDL-77541 customfield_select: final removal of deprecated 310 method.

MDL-69124 course: final removal of deprecated 310 method.

MDL-70687 session: Redis session lock exp = max exec time

If for any reason a Redis session lock is not being released, all subsequent requests will wait to acquire the lock, forcing them to time out eventually. This will happen till the original lock finally expires after the session timeout.

This sets the Redis session lock expiry time to whatever is lower, either the PHP execution time max_execution_time, if the value was defined in the php.ini or the globally configured sessiontimeout. Setting it to the lower of the two will not make things worse it if the execution timeout is longer than the session timeout. For the PHP execution time, once the PHP execution time is over, we can be sure that the lock is no longer actively held so that the lock can expire safely. Although at lib/classes/php_time_limit.php::raise(int), Moodle can progressively increase the maximum PHP execution time, this is limited to the max_execution_time value defined in the php.ini. For the session timeout, we assume it is safe to consider the lock to expire once the session itself expires. If we unnecessarily hold the lock any longer, it blocks other session requests.

Co-authored-by: Daniel Ziegenberg daniel@ziegenberg.at Signed-off-by: Daniel Ziegenberg daniel@ziegenberg.at

MDL-76926 libraries: upgrade lib/lti1p3 to patched v5.2.6

MDL-76926 libraries: update upgrade steps and 3rd party libs for lt1p3

MDL-76926 enrol_lti: remove guzzle shim code as guzzle now in core

MDL-77574 myoverview: wait until next button exists before clicking

MDL-73670 block: Remove hack to force returning the overview block

MDL-72124 question: Fix system-level URLs in question events

MDL-75746 mod_quiz: Fix backup and restore of quiz slots

MDL-77626 quiz statistics: Divide by zero if a random Q has max mark 0

MDL-77523 mod_data: textarea field should honor editor preferred format

MDL-76932 libraries: upgrade YUI lib to 3.18.1

MDL-76932 libraries: remove old YUI lib 3.17.2

MDL-76918 libraries: upgrade to version 1.3.1 of Rangy.

MDL-76997 admin: Option to reset course indentation

MDL-77666 contentbank: format category names for display.

MDL-76851 core_courseformat: bulk section and cm delete action

MDL-76851 core_courseformat: plugin custom editor strings

Most section related actions require the frontend to use alternative strings depending on the format plugin lang file. This patch adds overridden strings to the current setViewFormat course editor setup object.

Created at 4 hours ago

MDL-76866 editor_tiny: make tiny default editor

MDL-76866 editor_atto: Remove old install script

This install script has not been required for a number of years because we require the previous LTS for an LTS+1 upgrade. Once Atto was part of core after an LTS release, it was safe to remove this file.

This is now preventing Tiny from becoming default for new installs in some situations.

MDL-76866 mod_data: Editors should have data-fieldtype attrib

MDL-76866 mod_data: Disable the HTML editor to insert partial HTML

This test is adding table rows into an HTML editor and, quite rightly, is failing under TinyMCE.

This only worked under Atto because Atto does not perform any HTML validation. A user would not actually be able to insert the template content this way, and therefore the test is/was invalid.

This change disables the HTML editor before inserting the template content, which resembles the actions of a real user.

MDL-76866 mod_quiz: Use atto for grading test

This test is using xpaths for Atto specifically and is an Atto-specific test.

It needs to be rewritten to be editor-agnostic.

MDL-76866 calendar: Make test more specific

MDL-76866 repository_contentbank: Mark step as using atto editor

Created at 19 hours ago
delete branch
andrewnicols delete branch gh-readonly-queue/main/pr-591-b0e36dd04e07038541b7247f20b8f0fdbb80a358
Created at 19 hours ago
create branch
andrewnicols create branch adhocTaskFactory
Created at 1 day ago
pull request opened
docs: Add guidance on setting custom task data and user

When we wrote the task API we goofed by allowing just anyone set custom data. By setting custom data outside of the task consuming the data, we make the API harder to enforce:

  • the parameters may change but we'd never find out without combing through logs
  • formatting of the custom data is left to the caller

We should really encourage use of a factory to create the task itself.

I think that scheduling should still happen outside of the factory, but the user configuration also belongs in the factory.

Created at 1 day ago

MDL-76376 scorm: fix PHP8 TypeError (null is not Countable)

MDL-77626 quiz statistics: Divide by zero if a random Q has max mark 0

MDL-76932 libraries: upgrade YUI lib to 3.18.1

MDL-76932 libraries: remove old YUI lib 3.17.2

MDL-77666 contentbank: format category names for display.

MDL-77032 grade: Collapsible grade categories in Gradebook setup

MDL-77670 course: Preserve course summary format

MDL-77659 core_reportbuilder: fix user profile fields phpunit tests

MDL-77691 behat: Add step to navigate to profile page directly

MDL-77643 tool_mobile: Return location settings

MDL-77692 reportbuilder: format custom field condition/filter names.

MDL-77380 block_myoverview: improve show toggle functionality test

MDL-77673 ddimageortext: keep JS data just for the mobile app

MDL-77705 reportbuilder: avoid re-using field alias between entities.

Ensure that when the user entity is added multiple times to a report, when there are custom profile fields, each of those gets a unique table alias per-entity.

Merge branch 'MDL-77032-master-1' of https://github.com/mihailges/moodle

Merge branch 'MDL-77673-master' of https://github.com/jleyva/moodle

MDL-76246 output: combobox support improvements

  • It was a mistake to assume the listbox is always within combobox.parentElement
  • Take into account that the popup of the combobox is not necessarily a listbox
  • Update combobox fix so that it also work with comboboxes that are not select-menu
  • Update combobox fix so that it also support editable comboboxes
  • Update click listener to take into account that the event's target might be one of the option element
  • Having a hidden input element for comboboxes was not an ARIA requirement and was added by us. I added data-input-element to the combobox element to specify the input element related to it.

MDL-76246 gradereport_user: Make the user search widget a combobox

Use instead of because cannot have children.

MDL-76246 gradereport_singleview: Make the user search widget a combobox

MDL-76246 gradereport_singleview: Grade item search widget to combobox

Created at 1 day ago

MDL-77576 more thoughts

Created at 1 day ago

MDL-77576 more thoughts

Created at 1 day ago

MDL-77576 more thoughts

Created at 1 day ago
create branch
andrewnicols create branch MDL-77773-401
Created at 1 day ago
create branch
andrewnicols create branch MDL-77773-master
Created at 1 day ago
delete branch
andrewnicols delete branch gh-readonly-queue/main/pr-577-c675619b8d799d11b4ff18098ed8f269b136b113
Created at 1 day ago
delete branch
andrewnicols delete branch gh-readonly-queue/main/pr-589-447752b4f753e27042f45e048a77e4adbe50dbef
Created at 1 day ago
delete branch
andrewnicols delete branch gh-readonly-queue/main/pr-588-8236f485f04bffd6adb7cc95d1ae72075a430b6e
Created at 1 day ago
delete branch
andrewnicols delete branch gh-readonly-queue/main/pr-569-e9be2a99999e8647730b247dd6b79cc62eb35dae
Created at 1 day ago
delete branch
andrewnicols delete branch gh-readonly-queue/main/pr-587-3d627834418519ef06941b15b4698d6879f833a0
Created at 1 day ago
opened issue
AllowDynamicProperties is ignored

Bug report

If a class has the [#AllowDynamicProperties] attribute, phpstan still warns about the use of those dynamic properties.

Code snippet that reproduces the problem

https://phpstan.org/r/840776cc-6b9b-4ff8-b680-58e44f24aacb

Expected output

PHPStan detected the use of dynamic properties, when it should not have done.

Did PHPStan help you today? Did it make you happy in any way?

It's been very useful for us. We're trying to adopt it across out huge codebase :)

Created at 1 day ago

More thoughts

Created at 2 days ago

MDL-77626 quiz statistics: Divide by zero if a random Q has max mark 0

MDL-76932 libraries: upgrade YUI lib to 3.18.1

MDL-76932 libraries: remove old YUI lib 3.17.2

MDL-77666 contentbank: format category names for display.

MDL-77032 grade: Collapsible grade categories in Gradebook setup

MDL-77691 behat: Add step to navigate to profile page directly

MDL-77643 tool_mobile: Return location settings

MDL-77692 reportbuilder: format custom field condition/filter names.

MDL-77380 block_myoverview: improve show toggle functionality test

MDL-77673 ddimageortext: keep JS data just for the mobile app

MDL-77705 reportbuilder: avoid re-using field alias between entities.

Ensure that when the user entity is added multiple times to a report, when there are custom profile fields, each of those gets a unique table alias per-entity.

Merge branch 'MDL-77032-master-1' of https://github.com/mihailges/moodle

Merge branch 'MDL-77673-master' of https://github.com/jleyva/moodle

MDL-76246 output: combobox support improvements

  • It was a mistake to assume the listbox is always within combobox.parentElement
  • Take into account that the popup of the combobox is not necessarily a listbox
  • Update combobox fix so that it also work with comboboxes that are not select-menu
  • Update combobox fix so that it also support editable comboboxes
  • Update click listener to take into account that the event's target might be one of the option element
  • Having a hidden input element for comboboxes was not an ARIA requirement and was added by us. I added data-input-element to the combobox element to specify the input element related to it.

MDL-76246 gradereport_user: Make the user search widget a combobox

Use instead of because cannot have children.

MDL-76246 gradereport_singleview: Make the user search widget a combobox

MDL-76246 gradereport_singleview: Grade item search widget to combobox

MDL-76246 core_grades: Group search widget to combobox

MDL-76246 core_grades: Improve user search styling

Show profile image, and display email in a separate line

MDL-76246 core_grades: Remove url param from ws

Created at 2 days ago

Rename setings_data to instance_data

Created at 2 days ago

Rename core_comm tasks

Created at 2 days ago

Settings handler thoughts

Created at 2 days ago
create branch
andrewnicols create branch MDL-77576-master-thoughts
Created at 2 days ago

MDL-77740 editor_tiny: Set the Editor window from the iFrame element

This is a workaround for an upstream bug which I have not been able to reproduce outside of Moodle whereby the editor.contentWindow does not math the editor.iframeElement.contentWindow when it should.

This issue only seems to affect Firefox, and it may even be a bug in Firefox. It can only be reproduced when using a fresh browser which has never had a TinyMCE window open.

MDL-76866 editor_tiny: make tiny default editor

MDL-76866 editor_atto: Remove old install script

This install script has not been required for a number of years because we require the previous LTS for an LTS+1 upgrade. Once Atto was part of core after an LTS release, it was safe to remove this file.

This is now preventing Tiny from becoming default for new installs in some situations.

MDL-76866 mod_data: Editors should have data-fieldtype attrib

MDL-76866 mod_data: Disable the HTML editor to insert partial HTML

This test is adding table rows into an HTML editor and, quite rightly, is failing under TinyMCE.

This only worked under Atto because Atto does not perform any HTML validation. A user would not actually be able to insert the template content this way, and therefore the test is/was invalid.

This change disables the HTML editor before inserting the template content, which resembles the actions of a real user.

MDL-76866 mod_quiz: Use atto for grading test

This test is using xpaths for Atto specifically and is an Atto-specific test.

It needs to be rewritten to be editor-agnostic.

MDL-76866 calendar: Make test more specific

MDL-76866 repository_contentbank: Mark step as using atto editor

Created at 5 days ago
create branch
andrewnicols create branch MDL-77740-401
Created at 5 days ago
create branch
andrewnicols create branch MDL-77740-master
Created at 5 days ago

Replace mailhog with mailpit

mailpit (https://github.com/axllent/mailpit) is a more maintained mail test client with a straightforward api.

Merge pull request #258 from mattporritt/mailpit

Replace mailhog with mailpit

Created at 6 days ago
closed issue
Switch from mailhog to mailpit

Mailhog is not really maintained anymore. We should switch to something else. Mailpit is: https://github.com/axllent/mailpit Plus it has multiarch docker images, and we're experimenting using it internally to help automate mail sending as part of behat.

Created at 6 days ago
pull request closed
Replace mailhog with mailpit

mailpit (https://github.com/axllent/mailpit) is a more maintained mail test client with a straightforward api.

Fixes #257

Created at 6 days ago