I have a 3.9 moodle in production.
I have a problem with one of the scheduled cron task (Answer sheet evaluation for the offlinequiz-plugin) that fails and gives an error writing to database.
I tried to figure whats exactly the problem and i see that in config-dist.php you can activate this to output the error and the query that the cron executes:
// Add SQL queries to the output of cron, just before their execution
$CFG->showcronsql = true;
// Force developer level debug and add debug info to the output of cron
$CFG->showcrondebugging = true;
After doing that i tried to execute the task and after that i cannot see diference between before and after activate the output and debug for the cron.
If I go to the site administraton, server, task, task logs and try to open the failed arttempt of the cron i can see the same as before (no query sentence and no query error only the text error writing on database):
Execute scheduled task: Answer sheet evaluation for the offlinequiz-plugin (mod_offlinequiz\task\page_evaluation_task)
... started 12:01:02. Current memory use 6.3MB. ... used 12 dbqueries ... used 0.0063009262084961 seconds Scheduled task failed: Answer sheet evaluation for the offlinequiz-plugin (mod_offlinequiz\task\page_evaluation_task),error writing to database
Where can i see the query output that the cron try to execute and the error? now i have $CFG->showcronsql = true and $CFG->showcrondebugging = true
in production (it seems no difference for the users).
While i'm writing this i'm downloading the project and the BBDD to try to debug the site in local, but if anyone ca tell me where can i see the sql output of the cron
will help me a lot because if i can see the query problem probably i can solve the error.
Regards.