Merged from stable

This commit is contained in:
moodler 2004-09-07 14:13:19 +00:00
parent 857b798b90
commit 76112421d8

View File

@ -32,7 +32,9 @@
$courseid = (integer)$args[0];
$course = get_record("course", "id", $courseid);
if (!$course = get_record("course", "id", $courseid)) { // Course ID must be specified
error("Invalid course ID");
}
if ($course->category) {
require_login($courseid);
@ -40,8 +42,6 @@
require_login();
}
// it's OK to get here if no course was specified
$pathname = "$CFG->dataroot$pathinfo";
if ($pathargs = explode("?",$pathname)) {
$pathname = $pathargs[0]; // Only keep what's before the '?'