///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
}
/**********************************
$ratings->assesspublic = $data->assesspublic;
$ratings->allow = (($data->assessed != 2 or isteacher($data->course)) && !isguest());
if ($ratings->allow) {
- echo '<p /><form name="form" method="post" action="rate.php">';
echo '<div class="ratings" align="center">';
+ echo '<form name="form" method="post" action="rate.php">';
$useratings = true;
if ($useratings) {
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo "<input type=\"submit\" value=\"".get_string("sendinratings", "data")."\" />";
}
- echo '</div>';
echo "</form>";
+ echo '</div>';
}
}
}
echo '<input type="hidden" name="rid" value="'.$record->id.'" />';
echo '<textarea name="commentcontent"></textarea>';
- echo '<br><input type="submit" value="'.get_string('addcomment','data').'" />';
+ echo '<br /><input type="submit" value="'.get_string('addcomment','data').'" />';
echo '</form></div>';
}
$user = get_record('user','id',$comment->userid);
- echo '<div align="center"><table cellspacing="0" width ="50%" class="forumpost">';
+ echo '<table cellspacing="0" align="center" width="50%" class="datacomment forumpost">';
echo '<tr class="header"><td class="picture left">';
print_user_picture($comment->userid, $data->course, $user->picture);
echo '</div>';
- echo '</td></tr></table><div>'."\n\n";
+ echo '</td></tr></table>'."\n\n";
}
/// Print the page header
$PAGE->print_header($course->shortname.': %fullname%', '', $meta);
- echo '<table id="layout-table"><tr>';
- if (!empty($CFG->showblocksonmodpages) &&
- (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) {
- echo '<td style="width: '.$blocks_preferred_width.'px;" id="left-column">';
- blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
- echo '</td>';
+/// If we have blocks, then print the left side here
+ if (!empty($CFG->showblocksonmodpages)) {
+ echo '<table id="layout-table"><tr>';
+ if ((blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) {
+ echo '<td style="width: '.$blocks_preferred_width.'px;" id="left-column">';
+ blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+ echo '</td>';
+ }
+ echo '<td id="middle-column">';
}
- echo '<td id="middle-column">';
-
print_heading(format_string($data->name));
// Do we need to show a link to the RSS feed for the records?
data_print_preference_form($data, $perpage, $search, $sort, $order);
}
+/// If we have blocks, then print the left side here
+ if (!empty($CFG->showblocksonmodpages)) {
+ echo '</td>'; // Middle column
+ if ((blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing())) {
+ echo '<td style="width: '.$blocks_preferred_width.'px;" id="right-column">';
+ blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
+ echo '</td>';
+ }
+ echo '</table>';
+ }
+
print_footer($course);
?>