diff --git a/mod/scorm/player.php b/mod/scorm/player.php index 1d5408d492f..fefe460cac2 100644 --- a/mod/scorm/player.php +++ b/mod/scorm/player.php @@ -155,7 +155,10 @@ $completion->set_module_viewed($cm); // Print the page header. if (empty($scorm->popup) || $displaymode == 'popup') { - $exitlink = html_writer::link($CFG->wwwroot.'/course/view.php?id='.$scorm->course, $strexit, array('title' => $strexit)); + // Redirect back to the correct section if one section per page is being used. + $exiturl = course_get_url($course, $cm->sectionnum); + + $exitlink = html_writer::link($exiturl, $strexit, array('title' => $strexit)); $PAGE->set_button($exitlink); }