Permalink
Browse files

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.
  • Loading branch information...
danpoltawski committed Oct 9, 2015
1 parent e6311ee commit 63ba497c2989e7f37bb92f67a008990af27e7735
Showing with 1 addition and 5 deletions.
  1. +1 −5 mod/scorm/view.php
View
@@ -90,14 +90,10 @@
// 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,

0 comments on commit 63ba497

Please sign in to comment.