Skip to content

Commit

Permalink
Merge branch 'main' into phpunit-mdl-version
Browse files Browse the repository at this point in the history
  • Loading branch information
kabalin authored Oct 18, 2024
2 parents b2a90e3 + f95f336 commit 52140dd
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 50 deletions.
2 changes: 1 addition & 1 deletion docs/apis/core/dml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ try {
// Assuming the both inserts work, we get to the following line.
$transaction->allow_commit();

} catch(Exception $e) {
} catch (Exception $e) {
$transaction->rollback($e);
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/apis/plugintypes/ai/placement.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $action = new \core_ai\aiactions\generate_image(
// Send the action to the AI manager.
$manager = \core\di::get(\core_ai\manager::class);
$response = $manager->process_action($action);
````
```

- The process_action() method will then return a response object (instance of `responses\response_base`).
- It is up to the Placement to check for success (or not) of the response and pass the result back to the
Expand Down
16 changes: 16 additions & 0 deletions docs/apis/plugintypes/ai/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,19 @@ For example, the `aiprovider_openai` plugin provides settings for the user and g
));
$settings->hide_if('aiprovider_openai/userratelimit', 'aiprovider_openai/enableuserratelimit', 'eq', 0);
```

## Minimal configuration

Each provider will need to specify what it takes to achieve minimal configuration. The parent method `is_provider_configured()` will
return `false` by default and will need to be overwritten by the child class.

The `is_provider_configured()` must return `true` for UI component visibility and functionality.

For example, the `aiprovider_azureai` provider checks values are set for `$this->apikey` and `$this->apiendpoint` and returns
the result.

```php
public function is_provider_configured(): bool {
return !empty($this->apikey) && !empty($this->apiendpoint);
}
```
2 changes: 1 addition & 1 deletion docs/apis/plugintypes/filter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Each plugin is in a separate subdirectory and consists of a number of _mandatory

Some of the important files for the filter plugintype are described below. See the [common plugin files](../commonfiles) documentation for details of other files which may be useful in your plugin.

### filter.php
### classes/text_filter.php

import Filter from '!!raw-loader!./_examples/filter.php';

Expand Down
26 changes: 13 additions & 13 deletions docs/guides/javascript/comboboxsearch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,53 +175,53 @@ Manually open and close the dropdown rather than purely relying on Bootstrap.

Ensure that nodes that are susceptible to change are up-to-date when we need them.

#### registerClickHandlers()
#### registerClickHandlers() {#registerClickHandlers}

Handle our base case of click handlers i.e. opening and closing the dropdown. This can be further extended in callers for any special handling.

#### registerKeyHandlers()
#### registerKeyHandlers() {#registerKeyHandlers}

Handle our base case of keyboard handlers i.e. opening and closing the dropdown, accessibility handling. This can be further extended in callers for any special handling.

#### registerInputHandlers()
#### registerInputHandlers() {#registerInputHandlers}

Register the text input handlers for the search input and debounce the input so that we don't need to fire a bunch of calls as the user is still typing.
<!-- cspell:ignore filterrenderpipe -->
#### filterrenderpipe()

Combine the filter and render methods into a single method to be called by the input handlers as a QoL shorthand call.

#### renderAndShow()
#### renderAndShow() {#renderAndShow}

Given we need to update the display, ensure we have the latest dataset and render it.

#### keyUpDown()
#### keyUpDown() {#keyUpDown}

Given the user is navigating the dropdown with the keyboard, handle the common up and down arrow key cases.

#### clickHandler()
#### clickHandler() {#clickHandler}

Used within [registerClickHandlers](#registerClickHandlers()) to handle the common click cases like selecting results, closing the dropdown, etc.
Used within [registerClickHandlers](#registerClickHandlers) to handle the common click cases like selecting results, closing the dropdown, etc.

#### keyHandler()
#### keyHandler() {#keyHandler}

Used within [registerKeyHandlers](#registerKeyHandlers()) to handle the common keyboard cases like navigating nodes, closing the dropdown, etc.
Used within [registerKeyHandlers](#registerKeyHandlers) to handle the common keyboard cases like navigating nodes, closing the dropdown, etc.

#### selectNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will select the node that the user has navigated to.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will select the node that the user has navigated to.

#### moveToFirstNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the first node in the dropdown.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the first node in the dropdown.

#### moveToLastNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the last node in the dropdown.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the last node in the dropdown.

#### moveToNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the node that is passed in.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the node that is passed in.

### Required functions to implement

Expand Down
8 changes: 6 additions & 2 deletions general/releases/4.1/4.1.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ import { ReleaseNoteIntro } from '@site/src/components/ReleaseInformation';
<!-- cspell:enable -->

## Security fixes

A number of security related issues were resolved. Details of these issues will be released after a period of approximately one week to allow system administrators to safely update to the latest version.
<!-- cspell:disable -->
- [MSA-24-0045](https://moodle.org/mod/forum/discuss.php?d=462874) - Users' names returned in messaging error message
- [MSA-24-0046](https://moodle.org/mod/forum/discuss.php?d=462876) - IDOR in edit/delete RSS feed
- [MSA-24-0047](https://moodle.org/mod/forum/discuss.php?d=462877) - Some users can delete audiences of other reports
- [MSA-24-0050](https://moodle.org/mod/forum/discuss.php?d=462880) - IDOR when fetching report schedules
<!-- cspell:enable -->
8 changes: 6 additions & 2 deletions general/releases/4.2/4.2.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ import { ReleaseNoteIntro } from '@site/src/components/ReleaseInformation';
<ReleaseNoteIntro releaseName={frontMatter.moodleVersion} />

## Security fixes

A number of security related issues were resolved. Details of these issues will be released after a period of approximately one week to allow system administrators to safely update to the latest version.
<!-- cspell:disable -->
- [MSA-24-0045](https://moodle.org/mod/forum/discuss.php?d=462874) - Users' names returned in messaging error message
- [MSA-24-0046](https://moodle.org/mod/forum/discuss.php?d=462876) - IDOR in edit/delete RSS feed
- [MSA-24-0047](https://moodle.org/mod/forum/discuss.php?d=462877) - Some users can delete audiences of other reports
- [MSA-24-0050](https://moodle.org/mod/forum/discuss.php?d=462880) - IDOR when fetching report schedules
<!-- cspell:enable -->
8 changes: 6 additions & 2 deletions general/releases/4.3/4.3.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,9 @@ import { ReleaseNoteIntro } from '@site/src/components/ReleaseInformation';
<!-- cspell:enable -->

## Security fixes

A number of security related issues were resolved. Details of these issues will be released after a period of approximately one week to allow system administrators to safely update to the latest version.
<!-- cspell:disable -->
- [MSA-24-0045](https://moodle.org/mod/forum/discuss.php?d=462874) - Users' names returned in messaging error message
- [MSA-24-0046](https://moodle.org/mod/forum/discuss.php?d=462876) - IDOR in edit/delete RSS feed
- [MSA-24-0047](https://moodle.org/mod/forum/discuss.php?d=462877) - Some users can delete audiences of other reports
- [MSA-24-0050](https://moodle.org/mod/forum/discuss.php?d=462880) - IDOR when fetching report schedules
<!-- cspell:enable -->
10 changes: 8 additions & 2 deletions general/releases/4.4/4.4.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,11 @@ import { ReleaseNoteIntro } from '@site/src/components/ReleaseInformation';
<!-- cspell:enable -->

## Security fixes

A number of security related issues were resolved. Details of these issues will be released after a period of approximately one week to allow system administrators to safely update to the latest version.
<!-- cspell:disable -->
- [MSA-24-0045](https://moodle.org/mod/forum/discuss.php?d=462874) - Users' names returned in messaging error message
- [MSA-24-0046](https://moodle.org/mod/forum/discuss.php?d=462876) - IDOR in edit/delete RSS feed
- [MSA-24-0047](https://moodle.org/mod/forum/discuss.php?d=462877) - Some users can delete audiences of other reports
- [MSA-24-0048](https://moodle.org/mod/forum/discuss.php?d=462878) - IDOR when accessing list of course badges
- [MSA-24-0049](https://moodle.org/mod/forum/discuss.php?d=462879) - IDOR when accessing list of badge recipients
- [MSA-24-0050](https://moodle.org/mod/forum/discuss.php?d=462880) - IDOR when fetching report schedules
<!-- cspell:enable -->
Original file line number Diff line number Diff line change
Expand Up @@ -175,53 +175,53 @@ Manually open and close the dropdown rather than purely relying on Bootstrap.

Ensure that nodes that are susceptible to change are up-to-date when we need them.

#### registerClickHandlers()
#### registerClickHandlers() {#registerClickHandlers}

Handle our base case of click handlers i.e. opening and closing the dropdown. This can be further extended in callers for any special handling.

#### registerKeyHandlers()
#### registerKeyHandlers() {#registerKeyHandlers}

Handle our base case of keyboard handlers i.e. opening and closing the dropdown, accessibility handling. This can be further extended in callers for any special handling.

#### registerInputHandlers()
#### registerInputHandlers() {#registerInputHandlers}

Register the text input handlers for the search input and debounce the input so that we don't need to fire a bunch of calls as the user is still typing.
<!-- cspell:ignore filterrenderpipe -->
#### filterrenderpipe()

Combine the filter and render methods into a single method to be called by the input handlers as a QoL shorthand call.

#### renderAndShow()
#### renderAndShow() {#renderAndShow}

Given we need to update the display, ensure we have the latest dataset and render it.

#### keyUpDown()
#### keyUpDown() {#keyUpDown}

Given the user is navigating the dropdown with the keyboard, handle the common up and down arrow key cases.

#### clickHandler()
#### clickHandler() {#clickHandler}

Used within [registerClickHandlers](#registerClickHandlers()) to handle the common click cases like selecting results, closing the dropdown, etc.
Used within [registerClickHandlers](#registerClickHandlers) to handle the common click cases like selecting results, closing the dropdown, etc.

#### keyHandler()
#### keyHandler() {#keyHandler}

Used within [registerKeyHandlers](#registerKeyHandlers()) to handle the common keyboard cases like navigating nodes, closing the dropdown, etc.
Used within [registerKeyHandlers](#registerKeyHandlers) to handle the common keyboard cases like navigating nodes, closing the dropdown, etc.

#### selectNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will select the node that the user has navigated to.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will select the node that the user has navigated to.

#### moveToFirstNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the first node in the dropdown.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the first node in the dropdown.

#### moveToLastNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the last node in the dropdown.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the last node in the dropdown.

#### moveToNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the node that is passed in.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the node that is passed in.

### Required functions to implement

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,53 +175,53 @@ Manually open and close the dropdown rather than purely relying on Bootstrap.

Ensure that nodes that are susceptible to change are up-to-date when we need them.

#### registerClickHandlers()
#### registerClickHandlers() {#registerClickHandlers}

Handle our base case of click handlers i.e. opening and closing the dropdown. This can be further extended in callers for any special handling.

#### registerKeyHandlers()
#### registerKeyHandlers() {#registerKeyHandlers}

Handle our base case of keyboard handlers i.e. opening and closing the dropdown, accessibility handling. This can be further extended in callers for any special handling.

#### registerInputHandlers()
#### registerInputHandlers() {#registerInputHandlers}

Register the text input handlers for the search input and debounce the input so that we don't need to fire a bunch of calls as the user is still typing.
<!-- cspell:ignore filterrenderpipe -->
#### filterrenderpipe()

Combine the filter and render methods into a single method to be called by the input handlers as a QoL shorthand call.

#### renderAndShow()
#### renderAndShow() {#renderAndShow}

Given we need to update the display, ensure we have the latest dataset and render it.

#### keyUpDown()
#### keyUpDown() {#keyUpDown}

Given the user is navigating the dropdown with the keyboard, handle the common up and down arrow key cases.

#### clickHandler()
#### clickHandler() {#clickHandler}

Used within [registerClickHandlers](#registerClickHandlers()) to handle the common click cases like selecting results, closing the dropdown, etc.
Used within [registerClickHandlers](#registerClickHandlers) to handle the common click cases like selecting results, closing the dropdown, etc.

#### keyHandler()
#### keyHandler() {#keyHandler}

Used within [registerKeyHandlers](#registerKeyHandlers()) to handle the common keyboard cases like navigating nodes, closing the dropdown, etc.
Used within [registerKeyHandlers](#registerKeyHandlers) to handle the common keyboard cases like navigating nodes, closing the dropdown, etc.

#### selectNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will select the node that the user has navigated to.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will select the node that the user has navigated to.

#### moveToFirstNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the first node in the dropdown.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the first node in the dropdown.

#### moveToLastNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the last node in the dropdown.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the last node in the dropdown.

#### moveToNode()

When used in conjunction with [keyUpDown](#keyUpDown()) and other similar functions, this function will move the user to the node that is passed in.
When used in conjunction with [keyUpDown](#keyUpDown) and other similar functions, this function will move the user to the node that is passed in.

### Required functions to implement

Expand Down

0 comments on commit 52140dd

Please sign in to comment.