Is there any way to remove the warning "Ace editor not ready. Perhaps reload page?" as shown in the screenshot below
Well, one way to get rid of it is to turn off the Ace editor, i.e. set the UI to None in the question or its prototype.
But ... you should only be seeing that message very rarely, usually only after a version upgrade. After an upgrade Moodle takes typically 10 - 20 seconds to minimise all files in the Ace editor, so it's unavailable during that time. Once minimised it's cached and should be served in plenty of time. If you refresh the page, after say 30 seconds, is the message still there?
I have seen one case where a very slow server (a tiny microcontroller in a box with no heat sink) was unable to minimise the editor before the request timed out, so that message never went away. What are the specs on your server?
We have the same problem with our moodle-installation. I tried your instructions but it does not help. The ace.js-file is pending for a long time (with every request) and it ends up with a HTTP 500-error. I checked folder permissions and I set it to 777.
Do you have an idea? Many thanks in advance!
I assume from what you're saying that Ace never loads correctly, is that right?
Please tell me a bit about your server (CPU type, number of cores, memory size, disk size). AFAIK most users don't have this problem so there must be something unusual about your server - can you think of anything yourself? [**EDIT** Please also tell me what versions of both Moodle and CodeRunner you're running.]
I also assume the problem occurs with multiple different browsers (at least Chrome and Firefox), while either editing or previewing a question. Please confirm.
Since I can't replicate the problem myself, you'll need to tell me more about the exact symptoms if I'm to help. So please do the following:
- Using the Chrome browser, open a Preview window for a CodeRunner question. It will presumably display the "Ace editor not ready" message. Then open a DevTools window for that preview page by typing SHIFT+CTRL+I. Select the Network pane in the DevTools window then go back to the Preview window and reload the page (CTRL+R). Make a screen dump of the entire DevTools window. It should look something like the first of the attached files.
- Click the ace.js line in the DevTools window and in the right-hand pane, select the Timing panel (from the Headers/Preview/Response/Cookies/Timing menu along the top). Make a screen copy of the relevant information as in the second of the attached files.
If what you're seeing is a timeout in the loading of ace.js, you could also try switching to the Firefox browser and increasing the value of network.http.connection-timeout in about:config. It defaults to 90 seconds. Try doubling it and reloading the page.