From: mark-nielsen Date: Sat, 29 Dec 2007 20:59:09 +0000 (+0000) Subject: Merging fix for MDL-12610 from MOODLE_19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a46bb28882cfbabc875d41dc3fd97daecca4fd07;p=moodle.git Merging fix for MDL-12610 from MOODLE_19_STABLE --- diff --git a/mod/lesson/edit.php b/mod/lesson/edit.php index b9d1c2032e..a267e1b7ed 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 "\n"; echo format_text($answer->answer, FORMAT_MOODLE, $options); echo "\n"; - echo "''.".get_string("matchesanswer", "lesson")." $i: \n"; + echo "".get_string("matchesanswer", "lesson")." $i: \n"; echo "\n"; echo format_text($answer->response, FORMAT_MOODLE, $options); echo "\n";