Skip to content

Commit

Permalink
Restore option allowed to teachers too.
Browse files Browse the repository at this point in the history
The course_id is passed to restore.php as a parameter
  • Loading branch information
stronk7 committed Aug 2, 2003
1 parent 47c3f0d commit 2bd19d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 2bd19d6

Please sign in to comment.