We have found that commenting this out in the file mod/lesson/view.php removes this message from all users.
// Check to see if end of lesson was reached.
if ((isset($lastpageseen) && ($lastpageseen != LESSON_EOL))) {
if (($DB->count_records('lesson_attempts', array('lessonid' => $lesson->id, 'userid' => $USER->id, 'retry' => $retries)) > 0)
|| $DB->count_records('lesson_branch', array("lessonid" => $lesson->id, "userid" => $USER->id, "retry" => $retries)) > 0) {
echo $lessonoutput->header($lesson, $cm, '', false, null, get_string('leftduringtimedsession', 'lesson'));
if ($lesson->timelimit) {
if ($lesson->retake) {
$continuelink = new single_button(new moodle_url('/mod/lesson/view.php',
array('id' => $cm->id, 'pageid' => $lesson->firstpageid, 'startlastseen' => 'no')),
get_string('continue', 'lesson'), 'get');
echo html_writer::div($lessonoutput->message(get_string('leftduringtimed', 'lesson'), $continuelink),
'center leftduring');
} else {
$courselink = new single_button(new moodle_url('/course/view.php',
array('id' => $PAGE->course->id)), get_string('returntocourse', 'lesson'), 'get');
echo html_writer::div($lessonoutput->message(get_string('leftduringtimednoretake', 'lesson'), $courselink),
'center leftduring');
}
} else {
echo $lessonoutput->continue_links($lesson, $lastpageseen);
}
echo $lessonoutput->footer();
exit();
}
}
However, I don’t know how to just limit the to Guest users. Would anyone know?
Maybe you just need to have:
if (‘userid’ == $GUEST)-->comment out,
else--> leave it.
I don’t know if the condition in the IF statement I have given you is correct.
I hope helps to you.