From: nfreear Date: Thu, 1 Mar 2007 11:13:37 +0000 (+0000) Subject: Fixes MDL-6548 "... block should use lists" - blocks: blog tags, news items, recent... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5489fce7f72139813ca15edfe8308e21d926c285;p=moodle.git Fixes MDL-6548 "... block should use lists" - blocks: blog tags, news items, recent activity - forum. --- diff --git a/blocks/blog_tags/block_blog_tags.php b/blocks/blog_tags/block_blog_tags.php index ed94a3d903..f69aa8bc55 100644 --- a/blocks/blog_tags/block_blog_tags.php +++ b/blocks/blog_tags/block_blog_tags.php @@ -121,6 +121,8 @@ class block_blog_tags extends block_base { usort($etags, "blog_tags_sort"); /// Finally we create the output + /// Accessibility: markup as a list. + $this->content->text .= "\n\n"; } return $this->content; diff --git a/blocks/news_items/block_news_items.php b/blocks/news_items/block_news_items.php index 03a81946cd..a95612bbb8 100644 --- a/blocks/news_items/block_news_items.php +++ b/blocks/news_items/block_news_items.php @@ -79,21 +79,24 @@ class block_news_items extends block_base { $strftimerecent = get_string('strftimerecent'); $strmore = get_string('more', 'forum'); + /// Accessibility: markup as a list. + $text .= "\n\n"; $this->content->text = $text; diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 3137e7e8f7..d0e356b265 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -869,10 +869,12 @@ function forum_print_recent_activity($course, $isteacher, $timestart) { $mygroupid = mygroupid($course->id); $groupmode = array(); /// To cache group modes + $count = 0; foreach ($logs as $log) { //Get post info, I'll need it later if ($post = forum_get_post_from_log($log)) { //Create a temp valid module structure (course,id) + $tempmod = new object; $tempmod->course = $log->course; $tempmod->id = $post->forum; //Obtain the visible property from the instance @@ -905,7 +907,7 @@ function forum_print_recent_activity($course, $isteacher, $timestart) { } if (! $heading) { - print_headline(get_string('newforumposts', 'forum').':'); + print_headline(get_string('newforumposts', 'forum').':', 3); $heading = true; $content = true; } @@ -913,7 +915,12 @@ function forum_print_recent_activity($course, $isteacher, $timestart) { $subjectclass = ($log->action == 'add discussion') ? ' bold' : ''; - echo '
'. + //Accessibility: markup as a list. + if ($count < 1) { + echo "\n
'; + echo "\"\n"; } } + echo "\n"; return $content; } @@ -4645,4 +4653,4 @@ function forum_convert_to_roles($forum, $forummodid, $teacherroles=array(), -?> +?> \ No newline at end of file