My university had a system like this. They also had all the tests and the expected answers in a file at …/tests.txt and …/results.txt u could read both files look at the command line args passed to ur code find what line in the tests file they passed and return that same line number from the results file. 100% on every single item. They pulled me into a meeting to complain about it but granted me the marks anyways cos I was technically correct according to the marking criteria. Needless to say they fixed the access perms and rewrote the marking criteria for the next year.
Yeah this is a bad idea if not done extremely carefully cos rce. There is CodeRunner as a moodle plugin. If u wanna roll ur own then u would wanna use something like Firecracker for secure execution.






No. But its based on chromium so it has better dev tools than Firefox. That’s about all it has going for it.