From 7a0d8e725c15caae4004fe3fc118f4bb61e3d55d Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 18 Mar 2015 22:29:02 +1300 Subject: [PATCH] MDL-48096 scorm: Make exit activity link return to correct section --- mod/scorm/player.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); }