[R] R question type in Moodle
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Wed Dec 16 00:58:34 CET 2009
On Tue, Dec 15, 2009 at 8:05 PM, David Kane <dave at kanecap.com> wrote:
> Moodle (www.moodle.org) is an open source course management system, a
> competitor to Blackboard. I am writing several hundred R questions
> that will be used within the quiz module in Moodle. Unfortunately,
> Moodle does not have a built in question type for R. You can read
> about the different questions types in Moodle here:
>
> http://moodle.org/mod/data/view.php?d=13&perpage=40&search=Question+Type&sort=0&order=DESC&advanced=0&filter=1&advanced=1&f_44=&f_45=&f_46=Question+Type
>
> Note the Junit question type. Given that, it should be easy (?) to
> make an R question type. Here are the instructions:
>
> http://docs.moodle.org/en/Development:Question_type_plugin_how_to
>
> Question: Has anyone made an R question type for Moodle? If not, would
> anyone be interested in collaborating with me on the project?
The tricky bit is going to be the security model. It seems that java
can run in a security sandbox with the various -Djava.security
options. Otherwise how do you stop your students doing 'system("rm -rf
/")'?
My approach to testing programming code is that it should never be
run on the server - the server should send test case data, the client
(ie the user who wrote the thing) runs it, and returns the results.
The server then compares the results with what it thinks is the right
answer.
I have written such a client in R, as a proof of concept, but then
the people interested in automatic testing then went on to say they
wanted the automatic system to decide if the code was good code style
or bad code style. At that point I decided they had unrealistic
expectations and got on with stuff I felt could be achieved in my
lifetime. They then decided humans had to see the code to grade its
style, and those same humans could check if there was any nasty code
(system("rm -rf /")) and run the examples themselves. Fair enough.
Barry
More information about the R-help
mailing list