I don't know if this could help, I had a similar error message a couple of days ago
count_records_sql() expects the first field to contain non-negative number from COUNT(), '' found instead
and that was solved by my Moodle admin updating the Hotpot plugin.
Hi Antonio and Patrick,
thanks for letting me know about this issue. I have made a small adjustment to the "attempt/renderer.php" script which I think will fix this issue.
Please could you download the latest version of the HotPot module and let me know if it works better for you.