Backup - mod lesson conversion: apply jumpto fix only to matching question types.
authorAparup Banerjee <aparup@moodle.com>
Thu, 16 Jun 2011 08:27:56 +0000 (16:27 +0800)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 16 Jun 2011 08:52:55 +0000 (10:52 +0200)
mod/lesson/backup/moodle1/lib.php

index a6e643d..e6e5d1d 100644 (file)
@@ -276,7 +276,7 @@ class moodle1_mod_lesson_handler extends moodle1_mod_handler {
 
         $numanswers = count($answers);
         if ($numanswers) { //if there are any answers (possible there are none!)
-            if ($numanswers > 3) {
+            if ($numanswers > 3 && $page->data['qtype'] == 5) { //fix only jumpto only for matching question types.
                 if ($answers[0]['jumpto'] !== '0' || $answers[1]['jumpto'] !== '0') {
                     if ($answers[2]['jumpto'] !== '0') {
                         $answers[0]['jumpto'] = $answers[2]['jumpto'];