Permalink
Browse files

Restore option allowed to teachers too.

The course_id is passed to restore.php as a parameter
  • Loading branch information...
stronk7
stronk7 committed Aug 2, 2003
1 parent 47c3f0d commit 2bd19d60cf54f5da83e784909acf239b53161216
Showing with 2 additions and 2 deletions.
  1. +2 −2 files/index.php
View
@@ -515,7 +515,7 @@ function html_header($course, $wdir, $formfield=""){
echo "<BR>";
$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 = "<A HREF=\"index.php?id=$id&wdir=$wdir&file=$fileurl&action=unzip\">$strunzip</A>&nbsp;";
$edittext .= "<A HREF=\"index.php?id=$id&wdir=$wdir&file=$fileurl&action=listzip\">$strlist</A> ";
- if (!empty($CFG->backup_version) && isadmin()) {
+ if (!empty($CFG->backup_version) && isteacher($id)) {
$edittext .= "<A HREF=\"index.php?id=$id&wdir=$wdir&file=$filesafe&action=restore\">$strrestore</A> ";
}
} else {

0 comments on commit 2bd19d6

Please sign in to comment.