Fixed course theme MDL-10833

This commit is contained in:
moodler
2007-08-13 13:36:52 +00:00
parent 76655d6ff1
commit f12621d332
+2 -1
View File
@@ -14,13 +14,14 @@
$cancel = optional_param( 'cancel' );
$launch = optional_param( 'launch' );
require_login();
if (!empty($id)) {
require_login($id);
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $id))) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
require_login();
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}