Skip to content

Commit

Permalink
Merge pull request #20 from Lesterhuis-Training-en-Consultancy/86by49…
Browse files Browse the repository at this point in the history
…k6p-upgrade-moodle45

86by49k6p upgrade moodle45
  • Loading branch information
luukverhoeven authored Nov 20, 2024
2 parents 44d4737 + bd78e85 commit 7a904b7
Show file tree
Hide file tree
Showing 11 changed files with 1,687 additions and 34 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Types of changes
* **Fixed** for any bug fixes.
* **Security** in case of vulnerabilities.

## Version (4.5.0) - 2024-09-10
- Upgraded and refactored for Moodle 4.5

## Version (4.4.0) - 2024-04-05
- Upgraded and refactored for Moodle 4.4

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ Special thanks to Gemma Lesterhuis ([Lesterhuis Training & Consultancy](https://
* Author: Luuk Verhoeven, [ldesignmedia.nl](https://ldesignmedia.nl/)
* Author: Gemma Lesterhuis, [Lesterhuis Training & Consultancy](https://ltnc.nl/)
* Min. required: Moodle 3.9.x
* Max. Required: Moodle 4.1.x
* Max. Required: Moodle 4.5.x
* Supports PHP: 7.4 - 8.1

![Moodle39](https://img.shields.io/badge/moodle-3.9-brightgreen.svg)
![Moodle310](https://img.shields.io/badge/moodle-3.10-brightgreen.svg)
![Moodle402](https://img.shields.io/badge/moodle-4.2-brightgreen.svg)
![Moodle403](https://img.shields.io/badge/moodle-4.3-brightgreen.svg)
![Moodle404](https://img.shields.io/badge/moodle-4.4-brightgreen.svg)
![Moodle405](https://img.shields.io/badge/moodle-4.5-brightgreen.svg)

![PHP7.4](https://img.shields.io/badge/PHP-7.2-blue.svg)
![PHP8.0](https://img.shields.io/badge/PHP-8.0-blue.svg)
Expand Down
2 changes: 1 addition & 1 deletion amd/build/canvas.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/canvas.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions amd/build/spectrum.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions amd/build/spectrum.min.js.map

Large diffs are not rendered by default.

29 changes: 10 additions & 19 deletions amd/src/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
**/
/* global fabric */
/* eslint no-unused-expressions: "off", no-console:off, no-invalid-this:"off",no-script-url:"off", block-scoped-var: "off" */
define(['jquery', 'core/notification'], function($, notification) {
define(['jquery', 'core/notification', 'mod_gcanvas/spectrum'], function ($, notification) {
'use strict';

/**
Expand Down Expand Up @@ -978,27 +978,18 @@ define(['jquery', 'core/notification'], function($, notification) {
* Init
* @param {object} args
*/
initialise: function(args) {
initialise: function (args) {

// Load spectrum javascript form here.
$.getScript(M.cfg.wwwroot + "/mod/gcanvas/javascript/spectrum.js").done(function() {
// Load the args passed from PHP.
setOptions(args);

// Load the args passed from PHP.
setOptions(args);
// Set internal debug console.
setDebug(opts.debugjs);

// Set internal debug console.
setDebug(opts.debugjs);

$.noConflict();
$(document).ready(function() {
debug.log('Canvas Module v1.2');
canvasModule.init();
});
}).fail(function(jqxhr, settings, exception) {
// Display loading issue in console.
debug.log(jqxhr);
debug.log(settings);
debug.log(exception);
$.noConflict();
$(document).ready(function () {
debug.log('Canvas Module v1.2');
canvasModule.init();
});
}
};
Expand Down
1,662 changes: 1,662 additions & 0 deletions amd/src/spectrum.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion javascript/spectrum.js

This file was deleted.

9 changes: 1 addition & 8 deletions thirdpartylibs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
<license>MIT</license>
<licenseversion></licenseversion>
</library>
<library>
<location>javascript/spectrum.js</location>
<name>spectrum.js</name>
<version>1.8.0</version>
<license>MIT</license>
<licenseversion></licenseversion>
</library>
<library>
<location>css/spectrum.css</location>
<name>spectrum.css</name>
Expand All @@ -28,4 +21,4 @@
<license>Graphics licensed under CC-BY</license>
<licenseversion>4.0</licenseversion>
</library>
</libraries>
</libraries>
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_gcanvas';
$plugin->release = '4.4.1';
$plugin->version = 2024051000;
$plugin->release = '4.5.0';
$plugin->version = 2024091000;
$plugin->requires = 2020061500;
$plugin->supported = [39, 404];
$plugin->supported = [39, 405];
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 7a904b7

Please sign in to comment.