trampgeek / moodle-qtype_coderunner

CodeRunner: A moodle quiz question type that runs student-submitted program code in a sandbox to check if it satisfies a given set of tests.
GNU General Public License v2.0
207 stars 120 forks source link

CodeRunner processes all attempt history instead of only the last attempt, causing overload and unexpected grading behavior #219

Closed Marihp closed 3 weeks ago

Marihp commented 3 weeks ago

Problem Description: In CodeRunner, I have observed that instead of evaluating only the last attempt, the system processes all previous attempts. This results in unnecessary system overload and leads to unexpected grading behavior.

Expected Behavior: Only the last attempt should be evaluated to prevent overload and ensure accurate grading.

Current Behavior: Currently, the system processes all attempts made by the user, which slows down the grading process and can result in incorrect evaluations.

Steps to Reproduce:

Submit multiple attempts for a question evaluated by CodeRunner. Check the system load or the grading result. Notice that the system processes all attempts instead of just the last one. Impact: This issue can cause unexpected grading behavior and slow down the user experience when submitting multiple attempts.

trampgeek commented 3 weeks ago

CodeRunner questions run in Adaptive mode, with a Check button that allows users to check their code. This must happen immediately, so they can correct errors and resubmit for a penalty that's set by the question author. You surely aren't suggesting that clicks on the Check button should be ignored, are you?

You can if you wish hide the Check button, which will mean the student's code is graded when they finally submit their quiz attempt or the quiz closes. That is however contrary to the spirit of "Authentic assessment" that CodeRunner tries to provide. It means that students with correct code apart from some trivial syntax error get no marks and no opportunity to correct their errors. Also, it probably increases the risk of server overload, since all submissions by all students who have not explicitly made their final submission will get graded when the quiz closes - a veritable flood of submissions.

Also please note that the grade a student gets for a series of submissions depends on the whole history of submissions, not just the last one. So it wouldn't be possible to grade just the final submission without changing the semantics of grading (e.g. the meaning of a penalty regime and the rule that a student's mark can never decrease when a wrong submission follows a correct one).

If you are having server overload problems, you almost certainly need to increase your server capacity (e.g. with multiple semicolon-separated Jobe servers) and/or set questions that make fewer demands on the server.

Closing, as not an issue with CodeRunner.

Marihp commented 1 week ago

Thanks a lot! 💯