From b96da4eaef9efab48a4eea9ece75f026a60821fb Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Fri, 9 Oct 2015 08:58:33 +0100 Subject: [PATCH] MDL-51302 scorm: do not use invalid course urls Previous behaviour of setting an empty sectionid was incorrect and we were doing work which course_get_url() does for us. --- mod/scorm/view.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mod/scorm/view.php b/mod/scorm/view.php index fd98432af92..61ca3204914 100644 --- a/mod/scorm/view.php +++ b/mod/scorm/view.php @@ -91,14 +91,10 @@ if (!empty($scorm->popup)) { // Redirect back to the section with one section per page ? $courseformat = course_get_format($course)->get_course(); - $sectionid = ''; - if (isset($courseformat->coursedisplay) && $courseformat->coursedisplay == COURSE_DISPLAY_MULTIPAGE) { - $sectionid = $cm->sectionnum; - } if ($courseformat->format == 'singleactivity') { $courseurl = $url->out(false, array('preventskip' => '1')); } else { - $courseurl = course_get_url($course, $sectionid)->out(false); + $courseurl = course_get_url($course, $cm->sectionnum)->out(false); } $PAGE->requires->data_for_js('scormplayerdata', Array('launch' => $launch, 'currentorg' => $orgidentifier,