-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grade caching code merged into development branch #205
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uses a Moolde file cache to store results of checked questions. The key is made up of the question id, template id, random seed, student answser and attachements (if any).
Code still under development.
Code still under development.
Mainly replacing calls to grade_response to grade_response($response, false, false) instead of grade_response($response, usecache:false)
May still need to change behat_coderunner.php to make it more general. That is make it possible to change the jobeserver address in different situations, eg, when running in docker locally or docker in CI tests on github.
…ents. Removed unneccesary Given jobe sandbox enabled lines. Removed the hack in jobesandbox.php in prep for merging with branch that has fixed the problem of reverting back to coderunner's default jobe2 server (jobe2.cosc.canterbury.ac.nz) during bhat tests.
…ents. Removed unneccesary Given jobe sandbox enabled lines. Removed the hack in jobesandbox.php in prep for merging with branch that has fixed the problem of reverting back to coderunner's default jobe2 server (jobe2.cosc.canterbury.ac.nz) during bhat tests.
…come class to adhere to new PHP8.2 standard. Also fixed minor bug caused by missed merge conflict
…still use the cached outcome. That is, something has to change in the actual job being run to force a real regrade.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I've merged the grade caching code into the development branch post fixes to the behat testing.
The cache uses an md5 of the serialized $runspec as the key and the serialized outcome as the value. If a job has the same $runspec then the outcome from the cache will be used.
Note: If any JobeServer settings are changed, eg, installing a new version of Python or a new module then the Coderunner cache should be purged as run results may now be different.
There are a few other minor fixes and style tweaks (eg, to keep php8.2+ happy).
Note, this code is for testing on a real server and isn't ready for full release, eg, it doesn't have anything in settings.php (turning cache reading/writing on/off is done in jobesandbox.php via constants - so we can revert to an older commit without version complications).
Cheers,
Paul