diff --git a/mod/lesson/mediafile.php b/mod/lesson/mediafile.php index 9f089ce8f0a10..ac676da28dbee 100644 --- a/mod/lesson/mediafile.php +++ b/mod/lesson/mediafile.php @@ -23,12 +23,12 @@ require_login($course->id, false, $cm); - print_header(); - // get the mimetype $path_parts = pathinfo($lesson->mediafile); $mimetype = mimeinfo("type", $path_parts['basename']); + print_header($path_parts['basename']); // or should it pass "Media File" and not the name? + if (substr_count($lesson->mediafile, '//') == 1) { // OK, taking a leap of faith here. We are assuming that teachers are cool // and thus the mediafile is a url