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.
This pull request updates the way that the cron jobs for uploading grades are triggered. This new method will work with Moodle 3.x
The old method watched for modifications to the moodle log file. The moodle logging mechanism has changed and no longer modifies the original log file hence the wwassignment cron job assumed no changes were made and it would not run. This new version watches the standard_logfile that is regularly updated by moodle.
To test (without setting debug flags). Create a moodle course with links to a webwork assignment.
Check that the grades for that webwork assignment are all 0. Then do some of the assignment problems (you can do this as a professor if you wish, but it should also be tested with students). Recheck the grade book. If the grades have not already been transferred you can speed up the process by typing
cd /opt/htdocs/moodle/admin/cli
php cron.php
in order to trigger the cron job from the command line.
There will be an item in the resulting listing that indicates that the the cron job for wwassignment has run (there should be no errors listed). The grades in the moodle gradebook should now be updated.
To see more detail you can set DEBUG and TRACE flags to 1 at the top of the file
wwassignment/locallib. The messages will appear in the php_error log file. You can find
it's location with
php -i |grep log
You can also uncomment lines that define LOG in webwork2/lib/WebworkSOAP.pm which will
print progress messages to the apache error_log