Don't print empty intros

This commit is contained in:
moodler 2004-08-23 12:35:13 +00:00
parent a8449f8c71
commit bb6f1955a1
2 changed files with 9 additions and 3 deletions

View File

@ -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 "<br />\n";
echo "<form name=\"passwordform\" method=\"post\" action=\"attempt.php?id=$cm->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

View File

@ -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()) {