diff --git a/mod/lesson/view.php b/mod/lesson/view.php index f03e3fa18e3..d16981ef4ab 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -51,6 +51,10 @@ } } + $formatoptions = NULL; + $formatoptions->noclean = true; // Don't clean text + $formatoptions->para = false; // no

+ /************** navigation **************************************/ if ($action == 'navigation') { // display individual pages and their sets of answers @@ -181,7 +185,9 @@ } } print_heading($page->title); - print_simple_box(format_text($page->contents), 'center'); + + print_simple_box(format_text($page->contents, FORMAT_HTML, $formatoptions), 'center'); + echo "
\n"; // get the answers in a set order, the id order if ($answers = get_records("lesson_answers", "pageid", $page->id, "id")) { @@ -207,8 +213,7 @@ echo ""; echo "id}\">"; echo ""; - $options->para = false; // no

- echo format_text(trim($answer->answer), FORMAT_MOODLE, $options); + echo format_text(trim($answer->answer), FORMAT_MOODLE, $formatoptions); echo ""; } echo ''; @@ -229,8 +234,7 @@ echo "id}\">"; } echo ""; - $options->para = false; // no

- echo format_text(trim($answer->answer), FORMAT_MOODLE, $options); + echo format_text(trim($answer->answer), FORMAT_MOODLE, $formatoptions); echo ""; $i++; } @@ -500,7 +504,9 @@ } echo "\n"; echo "\n"; - print_simple_box(format_text($page->contents), "center"); + + print_simple_box(format_text($page->contents, FORMAT_HTML, $formatoptions), 'center'); + echo "\n"; // get the answers in a set order, the id order if ($answers = get_records("lesson_answers", "pageid", $page->id, "id")) {