]> git.mjollnir.org Git - moodle.git/commitdiff
Added the 'Restore' option near the 'Backup' one to course list.
authorstronk7 <stronk7>
Fri, 15 Aug 2003 08:50:35 +0000 (08:50 +0000)
committerstronk7 <stronk7>
Fri, 15 Aug 2003 08:50:35 +0000 (08:50 +0000)
See bug 616. Closed. It needs Martin confirmation.

course/category.php

index 39ea3ca9a924e0245210cb6a16a1a4a75e50dc4e..0744a656c0cb8b2eacfef55d5ecd2fbc3c738a23 100644 (file)
         $stredit     = get_string("edit");
         $strdelete   = get_string("delete");
         $strbackup   = get_string("backup");
+        $strrestore  = get_string("restore");
         $strmoveup   = get_string("moveup");
         $strmovedown = get_string("movedown");
         $strupdate   = get_string("update");
     
                     echo "<a title=\"$strbackup\" href=\"../backup/backup.php?id=$course->id\"><img".
                          " src=\"$pixpath/t/backup.gif\" height=11 width=11 border=0></a> ";
-    
+
+                    //Only showed if "backupdata" dir exists    
+                    if (is_dir("$CFG->dataroot/$course->id/backupdata")) {
+                        echo "<a title=\"$strrestore\" href=\"../files/index.php?id=$course->id&wdir=/backupdata\"><img".
+                             " src=\"$pixpath/t/restore.gif\" height=11 width=11 border=0></a> ";
+                    }
             
                     if ($up) {
                         echo "<a title=\"$strmoveup\" href=\"category.php?id=$category->id&moveup=$course->id\"><img".