Like many of you we've been encountering a 'No Questions Found' error when returning to a quiz in progress; a problem we first noticed in Moodle 2.4.4 and that has cropped up again in 2.6.
It appears the problem occurs when the quiz is multi-page, and Moodle directs a returning user to a quiz page number that doesn't exist.
For our purposes it made sense to simply send a user to the first page of the quiz and allow them to navigate to whichever page they want after that.
Our fix (for both moodle 2.4 and 2.6) involves a small edit to /mod/quiz/attempt.php, around line 98.
Simply replace:
// Check.
if (empty($slots)) {
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'noquestionsfound');
}
With:
// Check.
if (empty($slots)) {
$page = 1;
$slots = $attemptobj->get_slots($page);
}
Now you'll go to page 1 regardless of whether Moodle is incorrectly returning the number of pages in a quiz or not. This problem has been driving our users crazy - I hope it helps others experiencing the same thing.