Question Authors' Forum

CodeRunner problem in checking specific question type options

Picture of Mohammad Oghli
CodeRunner problem in checking specific question type options
by Mohammad Oghli - Thursday, 21 December 2017, 8:13 PM

Hello EveryOne

I have a problem after installing CodeRunner in our university moodle to test it 

The problem occurred only in specific question type 

Example we try to create  java_method question and when testing it in preview mode it didn't compile the code 

it returns this error :
Unexpected error while executing your code. The sandbox server may be down or overloaded. Perhaps try again shortly?

Code Runner question type problem

also I tried java_class, c_function, cpp_function and it didn't work. 

when I try java_program it worked and the code is compiled and tested.

apparently only the program question type is working and the others options for some reasons it didn't work.

Any suggested help or solution for this problem would be very appreciated.

Picture of Martin Zwerschke
Re: CodeRunner problem in checking specific question type options
by Martin Zwerschke - Friday, 22 December 2017, 5:32 AM

Hi Mohammad Oghli ,

the error message says, that a "sandbox server" can  not be reached.

Installing the moodle plugin "coderunner" is not enough to be able to let tests run.

There also has to be a "sandbox", that is a server, that runs the student's programs and gives back the output.

By default (in Moodle administration settings for the coderunner plugin just an example sandbox is selected.

This is the "jobe" server (job execution server) of the canterbury university.

But this one only accepts a few execution calls and is not intended for regular use, just for testing.

You have to install such a "jobe server" yourself (better not on the moodle server, but on a server that can be reached from the moodle server.)

Also be sure not to select "ideonesandbox" for it does not work in the actual coderunner version. (Richard has corrected it for the next version.)

But idesandbox is depreciated anyway - it is not a free service anymore, but costs monthy license fees.


Picture of Mohammad Oghli
Re: CodeRunner problem in checking specific question type options
by Mohammad Oghli - Sunday, 24 December 2017, 12:01 PM

Thanks a lot Martin

in order to to let coderunner work with full features and run all questions types tests I need to install a jobe server in a separate server and set the substring of this server in Moodle administration setting.

Picture of Richard Lobb
Re: CodeRunner problem in checking specific question type options
by Richard Lobb - Sunday, 24 December 2017, 4:54 PM

Just to clarify - the default install is set up to use the Jobe test server, This should work with all normal question types, but it can (rarely) become overloaded. The error messages you're getting suggest that your Moodle server is not actually connecting to the Jobe server at all, except perhaps once (by luck?!) when you were trying the Java Program question type. I can't think of any situation that would consistently lead to the Java Program question type working correctly and all other question types failing. I suggest you try again and see if the symptoms are the same. If the Java Program question continues to work while other question types fail, we'll need to look more closely into the problem, but I think it's unlikely.

If all question types give you that message, then either the site administration settings are wrong for the CodeRunner plugin (check that the Jobe server and Jobe API key settings both have their default values) or your Moodle server is unable to access Jobe2 (firefall or network overload?).

Certainly, as Martin said, you will need to install your own Jobe server if you wish to make use of CodeRunner on a production server.