print '<div class="oublog-posted-by">' . get_string('moderated_postername', 'oublog', s($comment->authorname)) . ($canaudit ? ' (' . s($comment->authorip) . ')' : '') . '</div>';
            print '<div class="oublog-comment-content">' . $comment->message . '</div>';
            // You can only approve/reject it once; and we don't let admins
            // approve/reject (because there's no way of tracking who did it
            // and it displays the post owner as having approved it)...
            if ($comment->approval == OUBLOG_MODERATED_UNSET && $post->userid == $USER->id) {
                print '<form action="approve.php" method="post"><div>' . '<input type="hidden" name="sesskey" value="' . sesskey() . '" />' . '<input type="hidden" name="mcomment" value="' . $comment->id . '" />';
                if (count($moderated) == 1) {
                    // Track if this is the last comment so we can jump to the
                    // top of the page instead of the moderating bit
                    print '<input type="hidden" name="last" value="1" />';
                }
                print '<input type="submit" name="bapprove" value="' . get_string('moderated_approve', 'oublog') . '" /> ';
                print '<input type="submit" name="breject" value="' . get_string('moderated_reject', 'oublog') . '" />';
                print '</div></form>';
            }
            // End of comment
            print '</div>';
        }
        // End of comments awaiting approval
        print '</div>';
    }
}
// End correct indentation
echo '</div>';
if (class_exists('ouflags') && ou_get_is_mobile()) {
    ou_print_mobile_navigation(null, $blogdets, $postid);
}
/// Finish the page
echo '<div class="clearfix"></div>';
print_footer($course);
// Print information allowing the user to log in if necessary, or letting
// them know if there are no posts in the blog
if (isguestuser() && $USER->id == $user) {
    print '<p class="oublog_loginnote">' . get_string('guestblog', 'oublog', 'bloglogin.php?returnurl=' . urlencode($returnurl)) . '</p>';
} else {
    if (!isloggedin() || isguestuser()) {
        print '<p class="oublog_loginnote">' . get_string('maybehiddenposts', 'oublog', 'bloglogin.php?returnurl=' . urlencode($returnurl)) . '</p>';
    } else {
        if (!$posts) {
            print '<p class="oublog_noposts">' . get_string('noposts', 'oublog') . '</p>';
        }
    }
}
/// Log visit and bump view count
// UPDATE `mdl_log` SET `url` = CONCAT('/view.php?id=',mdl_log.cmid) WHERE `module` LIKE 'oublog' AND `action` LIKE 'view'
add_to_log($course->id, "oublog", "view", '/view.php?id=' . $id, $oublog->id, $cm->id);
$views = oublog_update_views($oublog, $oubloginstance);
// Show dashboard feature if enabled, if course blog
if (class_exists('ouflags') && !$oublog->global) {
    require_once $CFG->dirroot . '/local/externaldashboard/external_dashboard.php';
    external_dashboard::print_favourites_button($cm);
}
/// Finish the page
echo "<div class=\"clearer\"></div><div class=\"oublog-views\">{$strviews} {$views}</div></div>";
if (class_exists('ouflags')) {
    completion_set_module_viewed($course, $cm);
}
if (class_exists('ouflags') && ou_get_is_mobile()) {
    ou_print_mobile_navigation($id, $blogdets, null, $user);
}
print_footer($course);