Index: lang/en/backup.php
===================================================================
--- lang/en/backup.php	(revision 118)
+++ lang/en/backup.php	(working copy)
@@ -97,6 +97,13 @@
 $string['confirmnewcoursecontinuequestion'] = 'A temporary (hidden) course will be created by the course restoration process. To abort restoration click cancel. Do not close the browser while restoring.';
 $string['coursecategory'] = 'Category the course will be restored into';
 $string['courseid'] = 'Original ID';
+// CMDL-1532 Add final warning
+$string['courserestorecurrentadding'] = 'You are about to restore {$a->name1} to the current course, adding data to it!';
+$string['courserestorecurrentdeleting'] = 'You are about to restore {$a->name1} to the current course, deleting data from it first!!';
+$string['courserestoreexistingadding'] = 'You are about to restore {$a->name1} into course <a href="/course/view.php?id={$a->id}">{$a->name2}</a>, adding data to it!';
+$string['courserestoreexistingdeleting'] = 'You are about to restore {$a->name1} into course <a href="/course/view.php?id={$a->id}">{$a->name2}</a>, deleting data from it first!!';
+$string['courserestorenew'] = 'You are about to restore {$a->name1} to a new course!';
+// end CMDL-1532
 $string['coursesettings'] = 'Course settings';
 $string['coursetitle'] = 'Title';
 $string['currentstage1'] = 'Initial settings';
Index: backup/restore.php
===================================================================
--- backup/restore.php	(revision 118)
+++ backup/restore.php	(working copy)
@@ -63,6 +63,22 @@
 if (!$restore->is_independent() && $restore->enforce_changed_dependencies()) {
     echo $renderer->dependency_notification(get_string('dependenciesenforced','backup'));
 }
+// CMDL-1532 Add final warning
+if ($restore->get_stage() == restore_ui::STAGE_REVIEW) {
+    if ($rc->get_courseid()) {
+        // get recipient course shortoname
+        $sn = $DB->get_record('course', array('id'=>$rc->get_courseid()));
+        if ($rc->get_target() == RESTORETO_EXISTING_ADDING) $warning = "courserestoreexistingadding";
+        if ($rc->get_target() == RESTORETO_EXISTING_DELETING) $warning = "courserestoreexistingdeleting";
+    }
+
+    if ($rc->get_target() == RESTORETO_CURRENT_DELETING) $warning = "courserestorecurrentdeleting";
+    if ($rc->get_target() == RESTORETO_CURRENT_ADDING) $warning = "courserestorecurrentadding";
+    if ($rc->get_target() == RESTORETO_NEW_COURSE) $warning = "courserestorenew";
+
+    echo $renderer->dependency_notification(get_string($warning, 'backup', array('name1'=>$course->shortname, 'id'=>$sn->id, 'name2'=>$sn->shortname)));
+}
+// end CMDL-1532
 echo $renderer->progress_bar($restore->get_progress_bar());
 echo $restore->display($renderer);
 $restore->destroy();
Index: backup/util/includes/restore_includes.php
===================================================================
--- backup/util/includes/restore_includes.php	(revision 118)
+++ backup/util/includes/restore_includes.php	(working copy)
@@ -88,7 +88,10 @@
 require_once($CFG->dirroot . '/backup/util/ui/restore_ui.class.php');
 require_once($CFG->dirroot . '/backup/util/ui/restore_moodleform.class.php');
 require_once($CFG->dirroot . '/backup/util/ui/restore_ui_components.php');
-
+// CMDL-1532 Add final warning
+require_once($CFG->dirroot . '/backup/lib.php');
+// end CMDL-1532
+// 
 // And some moodle stuff too
 require_once($CFG->dirroot . '/tag/lib.php');
 require_once($CFG->dirroot . '/lib/gradelib.php');
