Permalink
Browse files

SCORM MDL-28016 - fix redirect call to use proper moodle_url

  • Loading branch information...
danmarsden committed Jun 29, 2011
1 parent 7fde489 commit 444ff001a1a8fc3a2bb6d2789ebfcd01453fa344
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/scorm/locallib.php
View
@@ -696,7 +696,8 @@ function scorm_course_format_display($user,$course) {
} else {
if (has_capability('moodle/course:update', $context)) {
// Create a new activity
- redirect($CFG->wwwroot.'/course/mod.php?id='.$course->id.'&section=0&sesskey='.sesskey().'&add=scorm');
+ $url = new moodle_url('/course/mod.php', array('id'=>$course->id, 'section'=>'0', 'sesskey'=>sesskey(),'add'=>'scorm'));
+ redirect($url);
} else {
echo $OUTPUT->notification('Could not find a scorm course here');
}

0 comments on commit 444ff00

Please sign in to comment.