We have a few universities which have grade syncing problems when using our Moodle plugin.
We don't know what's happening because the code has a very generic try-catch that throws a very generic error when it catches any error.
Solution
Remove the try-catch to let Moodle handle the error.
Instead of displaying the very generic "could not update report" error, it now displays the entire error with its stack-trace.
Problem
We have a few universities which have grade syncing problems when using our Moodle plugin. We don't know what's happening because the code has a very generic try-catch that throws a very generic error when it catches any error.
Solution
Remove the try-catch to let Moodle handle the error. Instead of displaying the very generic "could not update report" error, it now displays the entire error with its stack-trace.