Skip to content

Commit

Permalink
Merge MOODLE_37_STABLE into master branch and adapt .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinymonk committed Jun 13, 2019
2 parents be72fa6 + 1ae9421 commit d6092b2
Show file tree
Hide file tree
Showing 23 changed files with 19,570 additions and 113 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ addons:
postgresql: "9.4"
apt:
packages:
- oracle-java8-installer
- oracle-java8-set-default
- oracle-java9-installer
- oracle-java9-set-default
- chromium-chromedriver

# This tells Travis CI to cache Composer's cache. Speeds up build times.
Expand All @@ -23,7 +23,6 @@ cache:
# here will create a separate build and run the tests against that version of PHP.
# WARNING, PHP7 only works in Moodle 3.0.1 or later!
php:
- 7.0
- 7.1

# This section sets up the environment variables for the build.
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
CHANGELOG
=========

3.7.0 (2019-06-04)
------------------
* #5981 Moodle 3.7 compatible version
* [FEATURE] #3888 Replace Highcharts with Chart.js


3.6.2 (2019-02-06)
------------------

* [FIXED] #5908 Using Highcharts 4.x causes weird mixing of percent/absolute values


3.6.1 (2018-12-07)
------------------

Expand Down
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,14 @@ chart changes can be seen immediately.
Requirements
------------

The plugin is available for Moodle 2.7+. This version is for Moodle 3.6.

The module requires the external [Highcharts JavaScript
library](<http://www.highcharts.com/products/highcharts>), available free of charge for
non-commercial use.
The plugin is available for Moodle 2.7+. This version is for Moodle 3.7.


Installation
------------

* Copy the module code directly to the *moodleroot/grade/report/gradedist* directory.

* Download version 4.x of the Highcharts library from <http://www.highcharts.com/download>. Copy
both, the core module *highcharts.src.js* from the *js* subdirectory and the *exporting.src.js*
module from the *js/modules* subdirectory into the directory *grade/report/gradedist/js*.

* Log into Moodle as administrator.

* Open the administration area (*http://your-moodle-site/admin*) to start the installation
Expand All @@ -73,9 +65,9 @@ following:

Documentation
-------------

https://www.academic-moodle-cooperation.org/en/module/grade-distribution/
You can find a cheat sheet for the plugin on the [AMC
website](http://www.academic-moodle-cooperation.org/en/modules/grade-distribution/) and a video
website](http://www.academic-moodle-cooperation.org/en/module/grade-distribution/) and a video
tutorial in german only in the [AMC YouTube
Channel](https://www.youtube.com/c/AMCAcademicMoodleCooperation).

Expand Down
2 changes: 1 addition & 1 deletion amd/build/config.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions amd/build/define_canvas-toBlob.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
define(["gradereport_gradedist/config","canvastoBlob"],function(a,b){return b});
1 change: 1 addition & 0 deletions amd/build/define_datalabels.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
define(["gradereport_gradedist/config","ChartDataLabels"],function(a,b){return b});
1 change: 1 addition & 0 deletions amd/build/define_filesaver.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
define(["gradereport_gradedist/config","filesaver"],function(a,b){return b});
1 change: 1 addition & 0 deletions amd/build/define_html2pdf.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
define(["gradereport_gradedist/config","html2pdf"],function(a,b){return b});
2 changes: 1 addition & 1 deletion amd/build/gradedist.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions amd/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ define([], function() {
window.requirejs.config({
paths: {
// Enter the paths to your required java-script files.
"highcharts_src": M.cfg.wwwroot + '/grade/report/gradedist/js/exporting.src',
"highcharts_min": M.cfg.wwwroot + '/grade/report/gradedist/js/exporting',
"filesaver": M.cfg.wwwroot + '/grade/report/gradedist/js/FileSaver',
"html2pdf": M.cfg.wwwroot + '/grade/report/gradedist/js/html2pdf.bundle.min',
"ChartDataLabels": M.cfg.wwwroot + '/grade/report/gradedist/js/chartjs-plugin-datalabels.min',
"canvastoBlob": M.cfg.wwwroot + '/grade/report/gradedist/js/canvas-toBlob',
},
shim: {
// Enter the "names" that will be used to refer to your libraries.
'highcharts_src': {exports: 'Highcharts'},
'highcharts_min': {exports: 'Highcharts'},
'filesaver': {exports: 'saveAs'},
'html2pdf': {exports: 'html2pdf'},
'ChartDataLabels': {exports: 'Chart'},
'canvastoBlob': {exports: 'saveAs'},
}
});
});
8 changes: 4 additions & 4 deletions amd/src/highcharts_min.js → amd/src/define_canvas-toBlob.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* highcharts_min.js
* canvas-toBlob.js
*
* @package gradereport_gradedist
* @author Andreas Krieger
Expand All @@ -23,10 +23,10 @@
*/

/**
* @module gradereport_gradedist/highcharts_min
* @module gradereport_gradedist/canvas-toBlob.js
*/


define(['gradereport_gradedist/config', 'highcharts_min'], function(unused, highcharts_min) {
return highcharts_min;
define(['gradereport_gradedist/config', 'canvastoBlob'], function(unused, canvastoBlob) {
return canvastoBlob;
});
Loading

0 comments on commit d6092b2

Please sign in to comment.