mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
Merged from stable
This commit is contained in:
parent
857b798b90
commit
76112421d8
6
file.php
6
file.php
@ -32,7 +32,9 @@
|
|||||||
|
|
||||||
$courseid = (integer)$args[0];
|
$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) {
|
if ($course->category) {
|
||||||
require_login($courseid);
|
require_login($courseid);
|
||||||
@ -40,8 +42,6 @@
|
|||||||
require_login();
|
require_login();
|
||||||
}
|
}
|
||||||
|
|
||||||
// it's OK to get here if no course was specified
|
|
||||||
|
|
||||||
$pathname = "$CFG->dataroot$pathinfo";
|
$pathname = "$CFG->dataroot$pathinfo";
|
||||||
if ($pathargs = explode("?",$pathname)) {
|
if ($pathargs = explode("?",$pathname)) {
|
||||||
$pathname = $pathargs[0]; // Only keep what's before the '?'
|
$pathname = $pathargs[0]; // Only keep what's before the '?'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user