From: moodler Date: Sat, 16 Aug 2003 06:37:06 +0000 (+0000) Subject: Use isteacheredit instead of isteacher X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=63bcc9b55b3eb1ef15b6adcb6b5525b4c644603e;p=moodle.git Use isteacheredit instead of isteacher --- diff --git a/backup/backup.php b/backup/backup.php index 57781292a6..6aceeebbbe 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -12,7 +12,7 @@ require_login(); if (!empty($id)) { - if (!isteacher($id)) { + if (!isteacheredit($id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { diff --git a/backup/backup_check.html b/backup/backup_check.html index 08652ef9ac..e7228007cd 100644 --- a/backup/backup_check.html +++ b/backup/backup_check.html @@ -5,7 +5,7 @@ require_login(); if (!empty($course->id)) { - if (!isteacher($course->id)) { + if (!isteacheredit($course->id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { diff --git a/backup/backup_execute.html b/backup/backup_execute.html index e054be893b..1bafb0bf54 100644 --- a/backup/backup_execute.html +++ b/backup/backup_execute.html @@ -5,7 +5,7 @@ require_login(); if (!empty($course->id)) { - if (!isteacher($course->id)) { + if (!isteacheredit($course->id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { diff --git a/backup/backup_form.html b/backup/backup_form.html index 90e534131f..3703acfd14 100644 --- a/backup/backup_form.html +++ b/backup/backup_form.html @@ -5,7 +5,7 @@ require_login(); if (!empty($course->id)) { - if (!isteacher($course->id)) { + if (!isteacheredit($course->id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { diff --git a/backup/restore.php b/backup/restore.php index 1bd8fd4ae0..00edb182b7 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -18,7 +18,7 @@ require_login(); if (!empty($id)) { - if (!isteacher($id)) { + if (!isteacheredit($id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { diff --git a/backup/restore_check.html b/backup/restore_check.html index abe804a380..ca0fab06f4 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -99,7 +99,7 @@ //Check admin if (!empty($id)) { - if (!isteacher($id)) { + if (!isteacheredit($id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { diff --git a/backup/restore_execute.html b/backup/restore_execute.html index 4c5bf5012a..94154a5276 100644 --- a/backup/restore_execute.html +++ b/backup/restore_execute.html @@ -15,7 +15,7 @@ //Check admin if (!empty($id)) { - if (!isteacher($id)) { + if (!isteacheredit($id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { diff --git a/backup/restore_form.html b/backup/restore_form.html index c4566f357c..d39371b66c 100644 --- a/backup/restore_form.html +++ b/backup/restore_form.html @@ -23,7 +23,7 @@ //Check admin if (!empty($id)) { - if (!isteacher($id)) { + if (!isteacheredit($id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { @@ -84,7 +84,7 @@ } if (!isset($restore_restoreto)) { - if (isteacher($id) and !isadmin()) { + if (isteacheredit($id) and !isadmin()) { $restore_restoreto = 1; } if (isadmin()) { @@ -108,7 +108,7 @@ echo "

"; echo get_string("restoreto").":"; echo ""; - if (isteacher($id) and !isadmin()) { + if (isteacheredit($id) and !isadmin()) { $restore_restoreto_options[0] = get_string("currentcoursedeleting"); $restore_restoreto_options[1] = get_string("currentcourseadding"); } diff --git a/backup/restore_precheck.html b/backup/restore_precheck.html index e875f88c52..9ebcfc9d30 100644 --- a/backup/restore_precheck.html +++ b/backup/restore_precheck.html @@ -14,7 +14,7 @@ //Check admin if (!empty($id)) { - if (!isteacher($id)) { + if (!isteacheredit($id)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else {