From 236d839ff12fb638ec88ad18b35b4b02e546da5d Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 5 Apr 2006 08:19:09 +0000 Subject: [PATCH] Fixed some pretty major HTML errors :-) bug 5089 --- mod/data/lib.php | 15 ++++++++------- mod/data/view.php | 28 ++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/mod/data/lib.php b/mod/data/lib.php index d7c6c1f353..a07e1ccac1 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -884,10 +884,11 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re ///actual replacement of the tags $newtext = preg_replace($patterns, $replacement, $data->{$template}); + $options->para=false; if ($return) { - return format_text($newtext); + return format_text($newtext, FORMAT_HTML, $options); } else { - echo format_text($newtext); //prints the template with tags replaced + echo format_text($newtext, FORMAT_HTML, $options); //prints the template with tags replaced } /********************************** @@ -964,8 +965,8 @@ function data_print_ratings($data, $record) { $ratings->assesspublic = $data->assesspublic; $ratings->allow = (($data->assessed != 2 or isteacher($data->course)) && !isguest()); if ($ratings->allow) { - echo '

'; echo '
'; + echo ''; $useratings = true; if ($useratings) { @@ -997,8 +998,8 @@ function data_print_ratings($data, $record) { echo ''; echo ""; } - echo '
'; echo "
"; + echo ''; } } } @@ -1116,7 +1117,7 @@ function data_print_comments($data, $record, $page=0) { echo ''; echo ''; - echo '
'; + echo '
'; echo ''; } @@ -1130,7 +1131,7 @@ function data_print_comment($data, $comment, $page=0) { $user = get_record('user','id',$comment->userid); - echo '
'; + echo '
'; echo '
'; print_user_picture($comment->userid, $data->course, $user->picture); @@ -1169,7 +1170,7 @@ function data_print_comment($data, $comment, $page=0) { echo ''; - echo '
'."\n\n"; + echo ''."\n\n"; } diff --git a/mod/data/view.php b/mod/data/view.php index fa90edd054..d44994ca6c 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -164,17 +164,18 @@ /// Print the page header $PAGE->print_header($course->shortname.': %fullname%', '', $meta); - echo ''; - if (!empty($CFG->showblocksonmodpages) && - (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) { - echo ''; +/// If we have blocks, then print the left side here + if (!empty($CFG->showblocksonmodpages)) { + echo '
'; - blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); - echo '
'; + if ((blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) { + echo ''; + } + echo ''; // Middle column + if ((blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing())) { + echo ''; + } + echo '
'; + blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); + echo ''; } - echo ''; - print_heading(format_string($data->name)); // Do we need to show a link to the RSS feed for the records? @@ -424,5 +425,16 @@ data_print_preference_form($data, $perpage, $search, $sort, $order); } +/// If we have blocks, then print the left side here + if (!empty($CFG->showblocksonmodpages)) { + echo ''; + blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT); + echo '
'; + } + print_footer($course); ?> -- 2.39.5