mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
Completed mods to allow teachers to make backups
This commit is contained in:
parent
9c1ae5ae32
commit
bd38123e98
@ -67,9 +67,9 @@
|
||||
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> ->
|
||||
<a href=\"backup.php\">$strcoursebackup</a> -> $course->fullname ($course->shortname)");
|
||||
} else {
|
||||
print_header("$site->shortname: $strcoursebackup", $site->fullname,
|
||||
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> ->
|
||||
<a href=\"backup.php\">$strcoursebackup</a> -> $course->fullname ($course->shortname)");
|
||||
print_header("$course->shortname: $strcoursebackup", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
$strcoursebackup");
|
||||
}
|
||||
|
||||
//Print form
|
||||
|
@ -4,11 +4,17 @@
|
||||
//Check login
|
||||
require_login();
|
||||
|
||||
//Check admin
|
||||
if (!isadmin()) {
|
||||
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
if (!empty($course->id)) {
|
||||
if (!isteacher($course->id)) {
|
||||
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
} else {
|
||||
if (!isadmin()) {
|
||||
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Check site
|
||||
if (!$site = get_site()) {
|
||||
error("Site not found!");
|
||||
|
@ -4,11 +4,17 @@
|
||||
//Check login
|
||||
require_login();
|
||||
|
||||
//Check admin
|
||||
if (!isadmin()) {
|
||||
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
if (!empty($course->id)) {
|
||||
if (!isteacher($course->id)) {
|
||||
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
} else {
|
||||
if (!isadmin()) {
|
||||
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Check site
|
||||
if (!$site = get_site()) {
|
||||
error("Site not found!");
|
||||
|
@ -4,11 +4,17 @@
|
||||
//Check login
|
||||
require_login();
|
||||
|
||||
//Check admin
|
||||
if (!isadmin()) {
|
||||
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
if (!empty($course->id)) {
|
||||
if (!isteacher($course->id)) {
|
||||
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
} else {
|
||||
if (!isadmin()) {
|
||||
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Check site
|
||||
if (!$site = get_site()) {
|
||||
error("Site not found!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user