A user emailed me the following questions, relating to Java, which I thought I would answer on the forum.
Couple of observations:
(1) Can you show me the code that was being submitted please? I can't replicate the problem. Is that a verbatim quote of the error message?
You can get a message of a vaguely similar form if you submit a program that doesn't match the following perl regular expression:
'/(^|\W)public\s+class\s+(\w+)[^{]*\{.*?public\s+static\s+void\s+main\s*\(\s*String/ms'
That pattern is used to determine what name to give the file before compiling it. It the pattern match fails the program is named prog.java and you should see a warning
WARNING: can't determine main class, so source file has been named 'prog.java', which probably won't compile.
This isn't a totally reliable way to determine the main class name but if people know that's the form of answer expected for a java_program question they should soon get the hang of it. The following program code works fine for me, as an example.
public class Twaddle { public static void main(String[] args) { System.out.println("Hello world!"); } }
(2) I've never used that setting. I just had a quick play and it seemed to work fine for me in Chrome but Firefox did some weird things. Since the problems probably involve some combination of the Ace editor, the particular browser JavaScript engine and the Moodle JavaScript code that provides the functionality, it's almost certainly outside of my control. But you might want to look into using Chrome. The only other suggestion I can make is that you can try turning off the Ace editor (click Customise in the question editing page, then set Input UI to "None" for the student answer). But you then lose all the nice code-editing capabilities of course.
(3) 2500 students submitting code in Java sounds wildly optimistic to me, by a factor of around 10. A single Java compile-and-run of a trivial program takes around 1 CPU sec so you're look at 45 CPU minutes to handle all those students submitting just a single question. I doubt the base Moodle system can handle it either. See this thread for more discussion of this topic.
Richard