- this fix allows the student to traverse the complete review paths. it only sets the continue button to go to the end of lesson when the page has no nextpage (last page).
if (isset($USER->modattempts[$lesson->id])) {
// make sure if the student is reviewing, that he/she sees the same pages/page path that he/she saw the first time
- if ($USER->modattempts[$lesson->id] == $page->id) { // remember, this session variable holds the pageid of the last page that the user saw
+ if ($USER->modattempts[$lesson->id] == $page->id && $page->nextpageid == 0) { // remember, this session variable holds the pageid of the last page that the user saw
$result->newpageid = LESSON_EOL;
} else {
$nretakes = $DB->count_records("lesson_grades", array("lessonid"=>$lesson->id, "userid"=>$USER->id));