how do get question specific code installed and usable from a grading template

how do get question specific code installed and usable from a grading template

by Jim Newton -
Number of replies: 4

What is the model with the moodle in general of getting question specific or course specific code installed and accessible from the CodeRunner custom templates?  There are several examples (in the documentation) of the python code using python libraries to execute programs and manipulate their output, but there's no discussion about how to get those external programs installed into the execution path so they are accessible in the subprocess.


Does this mean I need to install my own Jobe instance?  Or does this differ from one moodle installation to another?  Or is it impossible for security reasons?

In reply to Jim Newton

Re: how do get question specific code installed and usable from a grading template

by Richard Lobb -

Yes, you should install your own Jobe server. As per the documentation:

In its initial configuration, CodeRunner is set to use a University of Canterbury Jobe server to run jobs. You are welcome to use this during initial testing, but it is not intended for production use. Authentication and authorisation on that server is via an API-key and the default API-key given with CodeRunner imposes a limit of 100 per hour over all clients using that key, worldwide. If you decide that CodeRunner is useful to you, please set up your own Jobe sandbox as described in Sandbox configuration below.

In reply to Richard Lobb

Re: how do get question specific code installed and usable from a grading template

by Jim Newton -

Thanks for the answer.  

But there is still something even more confusing now than before.   Is it really the responsibility of the question author to install a Jobe server?   That was not clear in the documentation either.  It seems to me that asking question authors to set up the CodeRunner system requires them to have access to the Moodle machine which they do not have.  Typically (at least at our school) it is the system administrator who sets up the moodle and who has made CodeRunner available.  The professors who are creating courses and quizzes do not have access to that installation.

In reply to Jim Newton

Re: how do get question specific code installed and usable from a grading template

by Tim Hunt -

The question author is not expected to install Jobe.

The system adminstrator who set up Moodle and mode CodeRunner avaialable should have installed Jobe as part of installing CodeRunner. (However, Most Moodel plugins don't require you to install extra bits, just the plugin, so it is an understandable mistake for someone to make.)

By the way, Richard, I noticed this docs page start to be authored: https://docs.moodle.org/dev/Check_API. I think this is something they are working on for Moodle 3.9. Anyway, in future, this might be the best way to check that Jobe in configured when people install CodeRunner.

In reply to Tim Hunt

Re: how do get question specific code installed and usable from a grading template

by Jim Newton -

@Tim Hunt, One example of what I want to do its to check Scala Code which my students will have submitted via an attached file.   Someone must install Scala and the associated libraries.  I am under the hope that I can ask my system administrator to do this.  I am hoping that I am not required to build a Jobe with all my Scala installation installed.