From: stronk7 Date: Sat, 2 Aug 2003 10:08:57 +0000 (+0000) Subject: Restore option allowed to teachers too. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2bd19d60cf54f5da83e784909acf239b53161216;p=moodle.git Restore option allowed to teachers too. The course_id is passed to restore.php as a parameter --- diff --git a/files/index.php b/files/index.php index bc43c73df8..23d6c405e9 100644 --- a/files/index.php +++ b/files/index.php @@ -515,7 +515,7 @@ echo "
"; $restore_path = "../backup/restore.php"; notice_yesno (get_string("areyousuretorestorethis"), - $restore_path."?file=".$id.$wdir."/".$file, + $restore_path."?id=".$id."&file=".$id.$wdir."/".$file, "index.php?id=$id&wdir=$wdir&action=cancel"); } else { displaydir($wdir); @@ -745,7 +745,7 @@ function displaydir ($wdir) { } else if ($icon == "zip.gif") { $edittext = "$strunzip "; $edittext .= "$strlist "; - if (!empty($CFG->backup_version) && isadmin()) { + if (!empty($CFG->backup_version) && isteacher($id)) { $edittext .= "$strrestore "; } } else {