diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 19af16c31d8..afbbebff5ce 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -81,7 +81,9 @@ print_heading($quiz->name); print_heading(get_string("attempt", "quiz", $attemptnumber)); - print_simple_box(format_text($quiz->intro), "CENTER"); + if (trim(strip_tags($quiz->intro))) { + print_simple_box(format_text($quiz->intro), "CENTER"); + } echo "
\n"; echo "
id\">\n"; @@ -244,7 +246,9 @@ } print_heading(get_string("attempt", "quiz", $attemptnumber)); - print_simple_box(format_text($quiz->intro), "CENTER"); + if (trim(strip_tags($quiz->intro))) { + print_simple_box(format_text($quiz->intro), "CENTER"); + } /// Add the javascript timer in the title bar if the closing time appears close diff --git a/mod/quiz/view.php b/mod/quiz/view.php index 32506308922..0e358d87697 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -65,7 +65,9 @@ print_heading($quiz->name); - print_simple_box(format_text($quiz->intro), "CENTER"); + if (trim(strip_tags($quiz->intro))) { + print_simple_box(format_text($quiz->intro), "CENTER"); + } if (isguest()) {