connection between jobe server and moodle server

connection between jobe server and moodle server

de către danushka somasiri-
Număr de răspunsuri: 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?

"

Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către 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.

Ca răspuns la Richard Lobb

Re: connection between jobe server and moodle server

de către 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?
Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către danushka somasiri-
Thanks Richard Lobb . It is working after filling this variables Ideone server user ,Ideone server password
Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către danushka somasiri-
Richard , Can you please explain how to add databases for sql questions in code runner plugin in the moodle.
Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către 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.
Ca răspuns la Richard Lobb

Re: connection between jobe server and moodle server

de către danushka somasiri-
How can we upload sql db to questions?
Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către Richard Lobb-
You just drop the sqlite3 database file into the Support files section in the question authoring form.
Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către danushka somasiri-
Hi,
I cannot find db files in the above link only xml file.
Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către 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.
Ca răspuns la danushka somasiri

Re: connection between jobe server and moodle server

de către 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.