Overriding attached files with support files?

Overriding attached files with support files?

by Martin Goodfellow -
Number of replies: 1

Hi all,

I've run into a problem and I wondered if there's any way round it? I had some Java CodeRunner questions running where students were required to upload additional files. Unfortunately, some of the students forgot to upload these which meant their tests failed. I tried going back in and editing the questions to add these files as support files and ran a dry run of a regrade. This worked but then would change the results of the students who did remember to upload the files or (harder to detect) the students who uploaded the files but managed to accidentally introduce errors into them by adding things like package statements. Is there anyway the student files can be ignored (where they exist) and instead just use my support files? I tried editing the questions to disallow additional files but I guess since their answer has already been entered that if they've uploaded a file it will still be there in the background even though it no longer appears in their answer?

To give an example:

Students have to add code to the answer box.

They also have to add Person.java as an additional file. If I upload Person.java as a support file is there anyway I can run a regrade to use my file? I'm guessing it will either not allow both files to exist in the same directory with the same name or if it does allow it, it will cause an error due to the naming conflict and not run the tests?

Is there anyway round this?

Thanks,

Martin

In reply to Martin Goodfellow

Re: Overriding attached files with support files?

by Richard Lobb -
I can't think of an easy solution here. If it were a Java function or Java class question type you could customise the question and add code to the template to replace the student's submitted file with a (renamed) copy of an author-supplied file. But this sounds like a Java program question type where the template is just {{ STUDENT_ANSWER }} and I can't see how to tweak that to do such things.
 
I don't think I've ever tried adding a support file that's named the same as the student file, but I should think you're right that the question will be marked wrong. You could try, just to be sure, though.
 
If you're really keen and have sufficient CodeRunner knowledge, you could edit the question to use instead a Python script of the sort used in the multilanguage question type: that could set up whatever environment you wanted before compiling and running the student code. But unless this is a very large class, that's probably not worth the effort.