Plugin availability per category/course/role

Plugin availability per category/course/role

by Denys Hyde -
Number of replies: 3

If this question had been raised before, I apologise, as I haven't found an answer.

I need to be able to restrict the availability of this question type/plugin to certain Moodle category or course or user role. I know that some plugins honour user role permissions, but I can't see that CodeRunner is one of them.

Can you tell me if CodeRunner's availability can be restricted following the above criteria? Thank you!

In reply to Denys Hyde

Re: Plugin availability per category/course/role

by Richard Lobb -

I'm the plugin's primary developer and I'm confident that there's no code in it to restrict availability on a course/category/role basis. So unless there's some Moodle-wide capability I don't know about, then your answer is no, sorry.

Though I'm a bit curious as to why you'd want such a capability?

In reply to Richard Lobb

Re: Plugin availability per category/course/role

by Denys Hyde -
Hi! Our faculty uses Moodle that is served centrally by the university. So far, we are the only ones that use the CodeRunner plugin, therefore we run a Jobe server locally in the faculty. The idea was that each faculty would run their own Jobe server (like we do) to satisfy the requirements for their own software stack/language support. Given that it's not possible with a single centrally hosted Moodle instance to refer to multiple Jobe servers, we were thinking of limiting access to CodeRunner to our faculty users only until there is an appetite for it in other faculties, which would prompt the central IT team to consider hosting a Jobe server centrally.
In reply to Denys Hyde

Re: Plugin availability per category/course/role

by Richard Lobb -

Ah, thank you for the explanation. Interesting.

There might be a somewhat devious way of achieving what you want, but it would be workable only if nearly all your questions use your own custom question type(s) rather than the standard built-in types. 

There is a rarely used somewhat experimental feature that allows you to set a different jobe server from the default in any question or question prototype. So you could change your own question types to use your departmental jobe server, which you do in the Advanced Customisation panel by setting the Sandbox parameters field to something like {"jobeserver": "our.jobe.server"}). You could then tell IT to set the standard CodeRunner jobe server back to its default value (jobe2.cosc.canterbury.ac.nz). Then all other departments would be using that default jobe server, which would soon start complaining about over-use. All your questions (assuming you stick to using your own question types) would continue to use your departmental jobe server.

I doubt it's worth the effort, but it's an interesting thought experiment.