From d13403fb1babbe1a27647186e322e3ad6e7d92ae Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 10 May 2004 17:09:06 +0000 Subject: [PATCH] Some tweaks for formatting sideblock footers (esp upcoming events) --- blocks/calendar_upcoming/block_calendar_upcoming.php | 4 ++-- calendar/lib.php | 2 +- course/lib.php | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/blocks/calendar_upcoming/block_calendar_upcoming.php b/blocks/calendar_upcoming/block_calendar_upcoming.php index 504a83aa53..e9c7c12023 100644 --- a/blocks/calendar_upcoming/block_calendar_upcoming.php +++ b/blocks/calendar_upcoming/block_calendar_upcoming.php @@ -21,8 +21,8 @@ class CourseBlock_calendar_upcoming extends MoodleBlock { $this->content = New object; $this->content->text = ''; - $this->content->footer = '
'.get_string('gotocalendar', 'calendar').'...'; - $this->content->footer .= '
'.get_string('newevent', 'calendar').'...
'; + $this->content->footer = '
'.get_string('gotocalendar', 'calendar').'...'; + $this->content->footer .= '
'.get_string('newevent', 'calendar').'...'; if($this->course === NULL) { // Overrides: use no course at all diff --git a/calendar/lib.php b/calendar/lib.php index b77088882d..5aab0ff14f 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -778,7 +778,7 @@ function calendar_get_sideblock_upcoming($courses, $groups, $users, $daysinfutur } else { $content .= $events[$i]->name; } - $content .= '
'.$events[$i]->time.'
'; + $content .= '
'.$events[$i]->time.'
'; if ($i < $lines - 1) $content .= '
'; } diff --git a/course/lib.php b/course/lib.php index 398b97841f..21f62a0b6d 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1032,7 +1032,9 @@ function print_side_block($heading="", $content="", $list=NULL, $icons=NULL, $fo if ($content) { echo "$content"; - echo "$footer"; + if ($footer) { + echo "
$footer
"; + } } else { echo ""; if ($list) { @@ -1050,7 +1052,7 @@ function print_side_block($heading="", $content="", $list=NULL, $icons=NULL, $fo if ($icons) { echo ""; } - echo ""; + echo ""; echo ""; } echo "
 $footer
$footer
"; -- 2.39.5