bug?: Moodle 3.7 + Coderunner plugin 3.6.1

bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Georg Damm -
Number of replies: 7

Attempting a coderuner-quiz reports the error:

Coding error detected, it must be fixed by a programmer: The theme has 
already been set up for this page ready for output. Therefore, you can 
no longer change the theme, or anything that might affect what the 
current theme is, for example, the course.

Attempting the question again (continue -> Dashboard -> ...-> continue last attempt) reports:

An unexpected error occurred. The sandbox may be down. Try again shortly.

Is this a problem of my fresh container

https://github.com/bitnami/bitnami-docker-moodle/blob/master/docker-compose.yml

with imported courses or a bug in coderunner?

Best Regards

Georg

In reply to Georg Damm

Re: bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Richard Lobb -

The message about the theme being already set up is issued by a function in the moodle framework (pagelib.php) when it attempts to initialise the page. I've never seen it before and I don't know what would cause it, but I'm virtually certain it's nothing to do with CodeRunner.

The second message (about the sandbox being down) is issued by CodeRunner but it normally just means that either the Jobe sandbox settings for CodeRunner don't point to a working Jobe server or there is a network issue preventing access to that server. Again, I don't think it's a bug.

I just fired up a container using the link you gave, installed both Adaptive Adapted for CodeRunner and CodeRunner itself from the Moodle plugin repository and was able to create and run a CodeRunner question using the default settings (which point at the University of Canterbury's test Jobe server - not for production use, but clearly working OK right now). [As an aside, the container didn't appear to be serving up the Ace editor correctly, so I had to run with a raw text area. I'll look into that, but it's certainly not the problem you were having.]

In reply to Richard Lobb

Re: bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Georg Damm -

Thanks for looking into that.

I can confirm, that this works for new questions.

Before upgrading to moodle 3.7 I made mackups of my courses and restored these after the upgrade. Testing the questions gives the error messsage

An unexpected error occurred. The sandbox may be down. Try again shortly.
In reply to Georg Damm

Re: bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Richard Lobb -

That's not a situation I've seen before. I've restored several Moodle 3.6 course backups onto a Moodle 3.7 course with no issues. I just tried restoring one into the Bitnami Docker container you are using and again had no problems.

I'd ideally like to have the same information that the Moodle bug tracker requests, namely:

A detailed description of this issue. Please include: FULL STEPS that developers should take to reproduce the problem ...

At minimum, are you able to provide me with a small course backup file that gives the symptoms you describe when you import it into your containerised Moodle?
In reply to Richard Lobb

Re: bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Georg Damm -

I installed moodle 3.6 and restored my courses. Everything works as expected. If you're interested I can send you the backup of a course by pm. 

Maybe the  qbehaviour_adaptive_adapted_for_coderunner plugin was not ready for moodle 3.7?

In reply to Georg Damm

Re: bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Richard Lobb -

If there's a bug I'd like to know about it. I'm running Moodle 3.7 on my development system without issues. I'll email you privately for access to you course backup if it's not too large.

Thanks for reporting.

In reply to Richard Lobb

Re: bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Richard Lobb -

Thanks for making your course available, Georg. I imported it into my Moodle 3.7 development system and ran a couple of CodeRunner questions in two different quizzes. No problems. I also imported it into a Bitnami Moodle 3.7 docker container and again everything worked, except for the problem with the Ace editor that I mentioned earlier (see below). So I'm not sure what happened when you imported your course into the Moodle 3.7container  but I'm inclined to suspect that something somewhere was corrupted, since you had a Coding Exception coming from the Moodle framework as well.

I'm curious to know if you're having any problem with the Ace editor in your Bitnami Moodle container? I've tracked my problem to the Moodle minify program, which gets stuck when applying a massive regular-expression match to the Ace editor source code. I'm not sure why the same problem isn't occurring in my Moodle 3.7 development system. As a workaround for the problem in the container, I've added the line

$CFG->jsrev = -1;

to config.php in the container. This suppresses the minification of the JavaScript which almost certainly has performance implications elsewhere but does get Ace working again.

In reply to Richard Lobb

Re: bug?: Moodle 3.7 + Coderunner plugin 3.6.1

by Georg Damm -

Thanks for looking into the issue.

I had problems with the ace editor in older containers, because it was'nt *always* loading. In new bitnami containers (moodle >= 3.6) it stopped working.