Permalink
Browse files

MDL-32344 blog Adding a renderer to manage entries output

  • Loading branch information...
dmonllao committed Jul 24, 2012
1 parent 87e9331 commit 2591c7ae3d06968bcd86065919be353722176443
Showing with 420 additions and 277 deletions.
  1. +8 −1 blog/edit.php
  2. +140 −276 blog/locallib.php
  3. +272 −0 blog/renderer.php
View
@@ -105,6 +105,9 @@
}
$returnurl->param('userid', $userid);
+// Blog renderer
+$output = $PAGE->get_renderer('blog');
+
$strblogs = get_string('blogs','blog');
if ($action === 'delete'){
@@ -125,7 +128,11 @@
$PAGE->set_title("$SITE->shortname: $strblogs");
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
- $entry->print_html();
+
+ // Output the entry
+ $entry->prepare_render();
+ echo $output->render($entry);
+
echo '<br />';
echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'), new moodle_url('edit.php', $optionsyes),new moodle_url( 'index.php', $optionsno));
echo $OUTPUT->footer();
Oops, something went wrong.

0 comments on commit 2591c7a

Please sign in to comment.