MDL-48096 scorm: Make exit activity link return to correct section

This commit is contained in:
Dan Marsden 2015-03-18 22:29:02 +13:00
parent a149d6a177
commit 7a0d8e725c

View File

@ -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);
}