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.
In our department, where thousands of students use CodeRunner every day, the message comes up only fairly rarely, usually after system upgrades or when a computer is running CodeRunner for the first time. As far as I know, it always go away when the page is reloaded; the Ace editor is then running properly. If this is not the case for you I need to know more about your environment.
I asked the previous guy the following question but never received a response:
"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.]"
Also, in your case, I see you had the problem when running quizzes on coderunner.org.nz, so could you clarify, please, if the problem there also persists when you reload the page. And if so I would also like to know the specs of the user laptop, what operating system and what browser you are running.
I can't fix a problem if I don't have information about it.
Many thanks for that, Gary. Very helpful. Your machine sounds top-of-the-line so the problem can't be its performance. Just to confirm though: you are getting the message with that machine when running a quiz on this machine (coderunner.org.nz), even when you refresh the page? Because that's very strange indeed.
I could possibly come up with theories that would explain the problems on your own server but I'd first like to understand how problems can occur on our server.
I suggest we take this conversation off-line until we've found a solution. I'm going to email your directly.
Thanks for helping out