From 19ca7ac3b6d8ce6907d330f99c91db61be3e41d3 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 29 Jul 2004 16:31:00 +0000 Subject: [PATCH] Display a notice about going to restore a newer backup file. Bug 1675 (http://moodle.org/bugs/bug.php?op=show&bugid=1675) --- backup/restore_precheck.html | 10 ++++++++++ lang/en/moodle.php | 1 + 2 files changed, 11 insertions(+) diff --git a/backup/restore_precheck.html b/backup/restore_precheck.html index 72cfa5d8a73..ba65a2c43bf 100644 --- a/backup/restore_precheck.html +++ b/backup/restore_precheck.html @@ -109,6 +109,16 @@ echo ""; echo ""; + //We compare Moodle's versions + if ($CFG->version < $info->backup_moodle_version && $status) { + $message->serverversion = $CFG->version; + $message->serverrelease = $CFG->release; + $message->backupversion = $info->backup_moodle_version; + $message->backuprelease = $info->backup_moodle_release; + print_simple_box(get_string('noticenewerbackup','',$message), "center", "70%", "$THEME->cellheading2", "20", "noticebox"); + + } + //Now we print in other table, the backup and the course it contains info if ($info and $course_header and $status) { //First, the course info diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 79c06834ee3..72d17bb224a 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -692,6 +692,7 @@ $string['noteachersyet'] = 'No teachers in this course yet'; $string['notenrolled'] = '$a is not enrolled in this course.'; $string['noteuserschangednonetocourse'] = 'Note: course users need to be restored when restoring user data. This setting has been changed for you.'; $string['nothingnew'] = 'Nothing new since your last login'; +$string['noticenewerbackup'] = 'This backup file has been created with Moodle $a->backuprelease ($a->backupversion) and it\'s newer than your currently installed Moodle $a->serverrelease ($a->serverversion). This could cause some inconsistencies because backwards compatibility of backup files cannot be guarantied.'; $string['notincluded'] = 'Not included'; $string['notingroup'] = 'Sorry, but you need to be part of a group to see this activity.'; $string['nousersmatching'] = 'No users matching \'$a\' were found';