diff --git a/mod/lesson/edit.php b/mod/lesson/edit.php index b9d1c2032ef..a267e1b7ed4 100644 --- a/mod/lesson/edit.php +++ b/mod/lesson/edit.php @@ -73,10 +73,17 @@ while ($pageid != 0) { $page = $pages[$pageid]; - + + if ($page->qtype == LESSON_MATCHING) { + // The jumps for matching question type is stored + // in the 3rd and 4rth answer record. + $limitfrom = $limitnum = 2; + } else { + $limitfrom = $limitnum = ''; + } + $jumps = array(); - if($answers = get_records_select("lesson_answers", "lessonid = $lesson->id and pageid = $pageid")) { - + if($answers = get_records_select("lesson_answers", "lessonid = $lesson->id and pageid = $pageid", 'id', '*', $limitfrom, $limitnum)) { foreach ($answers as $answer) { $jumps[] = lesson_get_jump_name($answer->jumpto); } @@ -213,7 +220,7 @@ echo "