Skip to content

Commit 2763389

Browse files
committed
Updates for 4.5 through 5.x
1 parent 472f872 commit 2763389

8 files changed

Lines changed: 21 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
php: ['8.2']
33-
moodle-branch: ['MOODLE_403_STABLE', 'MOODLE_404_STABLE']
33+
moodle-branch: ['MOODLE_405_STABLE', 'MOODLE_500_STABLE']
3434
database: [pgsql, mariadb]
3535

3636
steps:
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Initialise moodle-plugin-ci
5151
run: |
52-
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
52+
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
5353
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
5454
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
5555
sudo locale-gen en_AU.UTF-8

amd/build/embed.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/embed.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/embed.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import {get_string as getString} from 'core/str';
2525
import * as ModalEvents from 'core/modal_events';
2626
import Templates from 'core/templates';
27-
import * as Modal from 'core/modal_factory';
27+
import Modal from 'core/modal';
2828
import Config from 'core/config';
2929

3030
export const SketchEmbed = class {
@@ -47,7 +47,6 @@ export const SketchEmbed = class {
4747

4848
async displayDialogue() {
4949
Modal.create({
50-
type: Modal.types.DEFAULT,
5150
title: getString('sketchtitle', 'tiny_sketch'),
5251
body: Templates.render('tiny_sketch/sketch_iframe', {
5352
src: this.getIframeURL()

classes/plugininfo.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,8 @@
4040
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
4141
*/
4242
class plugininfo extends plugin implements plugin_with_buttons, plugin_with_menuitems, plugin_with_configuration {
43-
/**
44-
* Whether the plugin is enabled
45-
*
46-
* @param context $context The context that the editor is used within
47-
* @param array $options The options passed in when requesting the editor
48-
* @param array $fpoptions The filepicker options passed in when requesting the editor
49-
* @param editor $editor The editor instance in which the plugin is initialised
50-
* @return boolean
51-
*/
43+
44+
#[\Override]
5245
public static function is_enabled(
5346
context $context,
5447
array $options,
@@ -85,12 +78,12 @@ public static function get_available_menuitems(): array {
8578
}
8679

8780
/**
88-
* Get a list of the menu items provided by this plugin.
81+
* Get an array of options provided by this plugin.
8982
*
9083
* @param context $context The context that the editor is used within
9184
* @param array $options The options passed in when requesting the editor
9285
* @param array $fpoptions The filepicker options passed in when requesting the editor
93-
* @param editor $editor The editor instance in which the plugin is initialised
86+
* @param editor|null $editor The editor instance in which the plugin is initialised
9487
* @return array
9588
*/
9689
public static function get_plugin_configuration_for_context(
@@ -109,7 +102,7 @@ public static function get_plugin_configuration_for_context(
109102

110103
$data = [
111104
'params' => $params,
112-
'fpoptions' => $fpoptions
105+
'fpoptions' => $fpoptions,
113106
];
114107

115108
return [

classes/privacy/provider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16+
1617
/**
1718
* Privacy Subsystem implementation for tiny_sketch.
1819
*
@@ -36,7 +37,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3637
*
3738
* @return string
3839
*/
39-
public static function get_reason() : string {
40+
public static function get_reason(): string {
4041
return 'privacy:metadata';
4142
}
4243
}

lang/en/tiny_sketch.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919
*
2020
* @copyright 2023 Matt Davidson <davidso1@rose-hulman.com>
2121
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22+
* @package tiny_sketch
2223
*/
2324

25+
$string['forceaccessibility'] = 'Post sketch popup for accessibility';
26+
$string['forceaccessibility_desc'] = 'If enabled the sketch will be opened in the core media plugin after insert so that alt text can be added.';
27+
$string['helplinktext'] = 'Insert Sketch';
28+
$string['insert'] = 'Insert Sketch';
2429
$string['pluginname'] = 'Sketch';
2530
$string['privacy:metadata'] = 'The Sketch plugin does not save or export user data.';
26-
$string['sketchtitle'] = 'Sketch and Save';
2731
$string['sketch_description'] = 'Quick sketch in Moodle';
2832
$string['sketch_long_description'] = 'Draw and edit images inside any editor in Moodle';
29-
$string['forceaccessibility'] = 'Post sketch popup for accessibility';
30-
$string['forceaccessibility_desc'] = 'If enabled the sketch will be opened in the core media plugin after insert so that alt text can be added.';
31-
$string['insert'] = 'Insert Sketch';
32-
$string['helplinktext'] = 'Insert Sketch';
33+
$string['sketchtitle'] = 'Sketch and Save';

version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
defined('MOODLE_INTERNAL') || die();
2626

27-
$plugin->version = 2024091200; // The current plugin version (Date: YYYYMMDDXX).
28-
$plugin->release = '4.4.1'; // The plugin's latest Moodle version tested with.
29-
$plugin->requires = 2022112800; // Requires this Moodle version.
27+
$plugin->version = 2025062700; // The current plugin version (Date: YYYYMMDDXX).
28+
$plugin->release = '5.0.0'; // The plugin's latest Moodle version tested with.
29+
$plugin->requires = 2024100700; // Requires this Moodle version.
3030
$plugin->component = 'tiny_sketch';
3131
$plugin->maturity = MATURITY_STABLE;

0 commit comments

Comments
 (0)