diff --git a/backup/restorelib.php b/backup/restorelib.php
index <HASH>..<HASH> 100644
--- a/backup/restorelib.php
+++ b/backup/restorelib.php
@@ -1691,6 +1691,11 @@
 
         global $CFG, $db;
 
+        if (empty($CFG->enablerestorequiz)) {
+            print_simple_box ('Restore of quizzes temporary disabled <br />(under development)','center', '', 'red');
+            return true;
+        }
+
         $status = true;
         //Check it exists
         if (!file_exists($xml_file)) {
diff --git a/mod/quiz/restorelib.php b/mod/quiz/restorelib.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/restorelib.php
+++ b/mod/quiz/restorelib.php
@@ -1294,6 +1294,11 @@
 
         global $CFG;
 
+        if (empty($CFG->enablerestorequiz)) {
+            print_simple_box ('Restore of quizzes temporary disabled <br />(under development)','center', '', 'red');
+            return true;
+        }
+
         $status = true;
 
         //Get record from backup_ids
Disable temporary the restore of quiz questions and attempts
to avoid moodlers filling their DBs (not always test servers!)
with non-consistent data.

Can be enabled by setting $CFG->enablerestorequiz = true;

(while working on it both Gustav's team and I, obviously this will be
removed once stabilished)