connection between jobe server and moodle server

connection between jobe server and moodle server

by danushka somasiri -
Number of replies: 10

I have installed both code runner plugin in the moodle and separately configured jobe server but when I test the questions from moodle server it gives error "

Failed to run tests

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

"

In reply to danushka somasiri

Re: connection between jobe server and moodle server

by Richard Lobb -
This usually occurs because the Moodle server can't access the Jobe server, e.g. because
  1. the Jobe server URL is incorrect in the CodeRunner admin settings panel, or
  2. the network configuration (e.g. firewall) doesn't allow the Moodle server to send HTTP packets to the Jobe server, or
  3. the Jobe server isn't working properly (have you run its testsubmit.py script?).

Does your Moodle server work with the default University of Canterbury Jobe server?

If you can login as an admin on the Moodle server, a good first test is to copy simpletest.py from Jobe onto Moodle, change line 14 (JOBE_SERVER = ...) to point to your own Jobe server, and run the script with the command

python3 simpletest.py

For more comprehensive testing the testsubmit.py program can also be used in a similar way.

In reply to Richard Lobb

Re: connection between jobe server and moodle server

by danushka somasiri -
the Jobe server isn't working properly (have you run its testsubmit.py script?
yes it is working
http://<serverip>/jobe/index.php/restapi/languages also working:
[["c","9.4.0"],["cpp","9.4.0"],["java","11.0.15"],["nodejs","10.19.0"],["octave","5.2.0"],["pascal","3.0.4"],["php","7.4.3"],["python3","3.8.10"]]

# python3 simpletest.py
Supported languages:
c: 9.4.0
cpp: 9.4.0
java: 11.0.15
nodejs: 10.19.0
octave: 5.2.0
pascal: 3.0.4
php: 7.4.3
python3: 3.8.10

Running python...
Successful run

Output:
Message is Hello Jobe!



Running C++
Successful run


Do I need to change any configuration in rest.php?
In reply to danushka somasiri

Re: connection between jobe server and moodle server

by danushka somasiri -
Thanks Richard Lobb . It is working after filling this variables Ideone server user ,Ideone server password
In reply to danushka somasiri

Re: connection between jobe server and moodle server

by danushka somasiri -
Richard , Can you please explain how to add databases for sql questions in code runner plugin in the moodle.
In reply to danushka somasiri

Re: connection between jobe server and moodle server

by Richard Lobb -
sql questions require an sqlite3 database file as one of the "Support files". See https://coderunner.org.nz/mod/quiz/attempt.php?attempt=1495&cmid=194 - you can download two working sql questions from there.
In reply to Richard Lobb

Re: connection between jobe server and moodle server

by danushka somasiri -
How can we upload sql db to questions?
In reply to danushka somasiri

Re: connection between jobe server and moodle server

by Richard Lobb -
You just drop the sqlite3 database file into the Support files section in the question authoring form.
In reply to danushka somasiri

Re: connection between jobe server and moodle server

by danushka somasiri -
Hi,
I cannot find db files in the above link only xml file.
In reply to danushka somasiri

Re: connection between jobe server and moodle server

by Richard Lobb -
That xml file is a Moodle XML question export. All support files are included in such exports. You need to import that XML file into your Moodle question bank then open it for editing. Then open the "Support files" section of the editing form. You'll see the database file there. Also, open the Question type details section of the form to see how SQL questions work.
In reply to danushka somasiri

Re: connection between jobe server and moodle server

by Richard Lobb -
This doesn't sound right. The ideone server was an alternative sandbox to Jobe but has become largely defunct. You shouldn't be using that - you should be using Jobe.

You should have Enable jobesandbox checked, the jobe server set to your own Jobe server's URL or host IP address, enable ideonesandbox unchecked, ideone user and password both empty.