From 5db0cffcf6703d0e74b83f13b68f58881cce66b5 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Mon, 26 Mar 2007 03:06:45 +0000 Subject: [PATCH] MDL-8922: Had to modify another bunch of files to fix a simple problem: when a config block contains a form, the previous form needs to be closed properly (it was, but there were non-matching closing divs etc...). --- blocks/moodleblock.class.php | 2 -- blocks/rss_client/block_rss_client.php | 4 ++-- blocks/rss_client/config_instance.html | 5 ++--- blocks/rss_client/styles.php | 4 +++- lib/blocklib.php | 2 +- theme/standard/styles_layout.css | 7 ++++++- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index b17aa72e27..a5d1169715 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -577,10 +577,8 @@ class block_base { if (is_file($CFG->dirroot .'/blocks/'. $this->name() .'/config_instance.html')) { print_simple_box_start('center', '', '', 5, 'blockconfiginstance'); - print_location_comment(__FILE__,__LINE__); include($CFG->dirroot .'/blocks/'. $this->name() .'/config_instance.html'); print_simple_box_end(); - print_location_comment(__FILE__,__LINE__); } else { notice(get_string('blockconfigbad'), str_replace('blockaction=', 'dummy=', qualified_me())); } diff --git a/blocks/rss_client/block_rss_client.php b/blocks/rss_client/block_rss_client.php index 8c57700d48..5ff215808a 100644 --- a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php @@ -235,7 +235,7 @@ $item['link'] = str_replace('&', '&', $item['link']); - $returnstring .= '
  • \n"; + $returnstring .= '
  • \n"; if ($display_description && !empty($item['description'])) { $item['description'] = break_up_long_words($item['description'], 30); @@ -285,4 +285,4 @@ } } -?> \ No newline at end of file +?> diff --git a/blocks/rss_client/config_instance.html b/blocks/rss_client/config_instance.html index 982098f98c..8c6395b891 100644 --- a/blocks/rss_client/config_instance.html +++ b/blocks/rss_client/config_instance.html @@ -168,13 +168,12 @@ print_box_start(); print "\n"; } else { global $act, $url, $rssid, $preferredtitle, $shared; - print ''; // Closes off page form - + print ''; // Closes off page form $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id); print_box_start(); rss_display_feeds($id, $USER->id, '', $context); rss_print_form($act, $url, $rssid, $preferredtitle, $shared, $id, $context); - print_box_end(); + // Do NOT print_box_end() here, this is taken care of by blocks/moodleblock.class.php:582 } ?> diff --git a/blocks/rss_client/styles.php b/blocks/rss_client/styles.php index 2394a78047..35298cfd20 100644 --- a/blocks/rss_client/styles.php +++ b/blocks/rss_client/styles.php @@ -20,7 +20,9 @@ } .blockconfigtable #rssfeeds { - width: 100%; + margin-left: auto; + margin-right: auto; + background-color: blue; } .blockconfigtable #rssfeeds td.actions { diff --git a/lib/blocklib.php b/lib/blocklib.php index e083d82ae6..ca481f62f3 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -456,7 +456,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid, if ($blockobject === false) { break; } - + // First of all check to see if the block wants to be edited if(!$blockobject->user_can_edit()) { break; diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 1582ae6c84..499adc8b3d 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -1227,10 +1227,15 @@ a.skip-block, .skip-block { margin-top: 5px; } -#rss_table { +#rssfeeds { margin-left: auto; margin-right: auto; } + +#block_rss { + text-align: center; +} + /*** *** Blogs ***/ -- 2.39.5