Lesterhuis-Training-en-Consultancy / moodle-mod_gcanvas

Moodle - Canvas Game
Other
4 stars 1 forks source link

Links on canvas not working #7

Closed FrankyJust closed 5 years ago

FrankyJust commented 5 years ago

I've installed the plugin and added it as an activity in a course. The canvas screen shows up, but none of the options / menu's / links are working. Only when I click on the 'Edit help text' there is an editor showing up. Have I missed something? Installed it on Moodle 3.6 with theme Boost. (PS: the course is slowly loading when the canvas is added to it)

luukverhoeven commented 5 years ago

Hi FrankyJust,

Strange I tried to reproduce those issue, but on my test environment everything seems working correctly: https://www.dropbox.com/s/q33zamtgezi5swk/2019-05-10_09-24-20.mp4?dl=0

Did you install the latest version from Moodle.org? https://moodle.org/plugins/download.php/19497/mod_gcanvas_moodle36_2019050705.zip

Which browser do you use?

FrankyJust commented 5 years ago

Hi Luuk,

I've installed it first on a local machine with server MAMP (iMac), browser Safari, Moodle 3.6.1. Checked it on this machine also under browser Firefox, also not working.

Installed plugin then on a test server where Moodle 3.6.2 is installed, same problems, links are not working.

No errors on installation. Also the horizontal rule is not showing up. Both environments I've installed latest version of your plugin.

I've also checked your video on Dropbox, but I don't see any things that I've missed so far. I've noticed that your test environment is MDL 3.5, is it also actually tested on MDL 3.6? Maybe this could be an issue.

I've checked browser console for errors: (1): a resource spectrum.js seems not been loaded (2): [Error] SyntaxError: Unexpected token '<' appendChild (view.php:1:535) p (jquery-3.2.1.min.js:1:535) globalEval (jquery-3.2.1.min.js:1:2583) text script (jquery-3.2.1.min.js:1:81138) Qb (jquery-3.2.1.min.js:1:74285) A (jquery-3.2.1.min.js:1:77813) (anonymous function) (jquery-3.2.1.min.js:1:80416)

Hope that you can find out what could be the problem.

Franky

FrankyJust commented 5 years ago

Hi Luuk,

I've got it to work now by temporarily changing the relative URL to an absolute URL in the canvas.min.js file (amd/build). The spectrum.js file isn't loading with the relative URL, which prevents the colorpicker icon to be loaded in the sidemenu, etc.. So it isn't a Moodle version issue. Hope you can solve this issue.

Franky

FrankyJust commented 5 years ago

Using relative url: ../../mod/gcanvas/javascript/spectrum.js does the job here. Small other thing: in file canvas.mustach there is for the colorpicker-icon the same tooltip used as for the trash-icon. BTW, congrats with this nice plugin!

luukverhoeven commented 5 years ago

Hi Franky,

Thanks for looking into the issue. This helps a lot. Can you check the latest version on GitHub? https://github.com/MFreakNL/moodle-mod_gcanvas/archive/master.zip

It should fix loading spectrum.js

FrankyJust commented 5 years ago

Hi Luuk,

I've checked latest version, issue not loading spectrum.js is solved, and also the correct tooltip on color picker-icon is now available. Thx for adjustments.

Franky

luukverhoeven commented 5 years ago

👍 good to hear. Updated the release on Moodle.org to 1.0.6