Closed mudrd8mz closed 8 years ago
I agree, admins tend not read README files and missing script files shouldn't produce a coding error. I updated the plugin description at moodle.org and forwarded the error description to the developer to fix it.
This has been fixed with version 2015111402 in the MOODLE_28_STABLE branch and version 2015120106 in the MOODLE_29_STABLE branch. When the highchart.js Library is missing an instruction to install it is displayed instead of a coding error.
I'm just seeing this issue while searching for more information about Highcharts and including/using it in a Moodle installation. What do you think about the following idea?
The settings page for the plug-in, that can show after installation, contains an upload field in which the .js files can be uploaded. This field is mandatory. The plug-in can then reference the files from the File API. This enables a to use the plug-in on closed hosting environments; like the Moodle cloud.
But ... if I remember correctly, Moodle cloud does not allow you to install additional plugins that would use Highcharts. Or am I missing something?
According to the FAQ (https://moodle.com/cloud/faq/) MoodleCloud doesn't allow to install additional plugins at all.
In general: How do you install a plugin without filesystem access? And if you have filesystem access its easy to copy the two Highchart files into the plugin directory. Also in a safe setup the php process is usually not (and should not be) allowed to write into the Moodle source directory. The JavaScript files would therefore have to be uloaded to moodledata. Besides that I don't feel comfortable with the idea to allow anyone, even admins, to upload JavaScript files via the GUI.
I forwarded this question to the plugin developer. He also doesn't see any reliable and safe way to install the Highchart files via the GUI.
Thanks Markus for the update. I can confirm that the exception is gone and instructions are quite clear now. I found http://code.highcharts.com/ a good place to download the files from. Maybe you can consider to let users download the minified versions of the scripts into their production servers.
Yes, good idea. I forwarded your suggestion to the developer to include this info in the instructions.
As a result of issue #3, the admin now has to download Highcharts on their own. I tried and I believe this must be much better communicated and processed in terms of UI.
Firstly, such a requirement should be mentioned on the plugin page in the plugins directory. Many (if not most) admins never read README - especially when installing plugins via the inbuilt installer. So it is better to keep the README contents and the full description of the plugin in the plugin directory same.
It took me a while to locate the file exporting.src.js within the ZIP. In fact, what I intuitively did was that I unzipped the upstream file Highcharts-4.2.3.zip directly inside your js folder. But yeah, I should have read the README more carefully.
I definitely believe that missing JS files should not lead to coding error detected.
Can you try and detect the case and provide the admin with a nicer page that would lead them step by step through the process of adding the required libraries there?
I think the goal here is to make the installation procedure as easy as possible, even with the post-installation requirement.