Skip to content

Commit

Permalink
MDL-38489 SCORM: obtain correct section number when getting course_url
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Sep 18, 2013
1 parent b98dcd7 commit d6d0c4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod/scorm/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$action = optional_param('action', '', PARAM_ALPHA);

if (!empty($id)) {
if (! $cm = get_coursemodule_from_id('scorm', $id)) {
if (! $cm = get_coursemodule_from_id('scorm', $id, 0, true)) {
print_error('invalidcoursemodule');
}
if (! $course = $DB->get_record("course", array("id"=>$cm->course))) {
Expand All @@ -39,7 +39,7 @@
if (! $course = $DB->get_record("course", array("id"=>$scorm->course))) {
print_error('coursemisconf');
}
if (! $cm = get_coursemodule_from_instance("scorm", $scorm->id, $course->id)) {
if (! $cm = get_coursemodule_from_instance("scorm", $scorm->id, $course->id, true)) {
print_error('invalidcoursemodule');
}
} else {
Expand Down Expand Up @@ -88,7 +88,7 @@
$courseformat = course_get_format($course)->get_course();
$sectionid = '';
if (isset($courseformat->coursedisplay) && $courseformat->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {
$sectionid = $cm->section;
$sectionid = $cm->sectionnum;
}

$PAGE->requires->data_for_js('scormplayerdata', Array('launch' => $launch,
Expand Down

0 comments on commit d6d0c4e

Please sign in to comment.